GLC_Axis Class Reference

GLC_Axis : 3d Widget axis use to translate objects. More...

#include <glc_axis.h>

Inheritance diagram for GLC_Axis:
GLC_3DWidget

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_Axis (const GLC_Point3d &center, GLC_3DWidgetManagerHandle *pWidgetManagerHandle=NULL)
 Construct a axis widget.
 GLC_Axis (const GLC_Axis &axis)
 Copy constructor.
virtual ~GLC_Axis ()
 Destructor.
Get Functions

GLC_Point3d center () const
 Return this axis center.
double axisLength () const
 Return this axis length.
Set Functions

virtual GLC_Axisoperator= (const GLC_Axis &axis)
 Copy the given cutting plane in this cutting plane and return a reference on this cutting plane.
virtual void updateWidgetRep ()
 Update widget representation.
void setAxisLength (double length)
 Set the axis length.
void setCenter (const GLC_Point3d &newCenter)
 Set Axis center.
Interaction Functions

virtual glc::WidgetEventFlag select (const GLC_Point3d &, GLC_uint id)
 This widget as been selected.
virtual glc::WidgetEventFlag unselect (const GLC_Point3d &, GLC_uint id)
 This widget as been unselected.
virtual glc::WidgetEventFlag mousePressed (const GLC_Point3d &, Qt::MouseButton, GLC_uint id)
 The mouse is over this widget and a mousse button is pressed.
virtual glc::WidgetEventFlag mouseReleased (Qt::MouseButton)
 The mouse is over this widget and a mousse button is released.
virtual glc::WidgetEventFlag mouseMove (const GLC_Point3d &, Qt::MouseButtons, GLC_uint id)
 This widget is selected and the mousse move with a pressed buttons.

Protected Member Functions

virtual void create3DviewInstance ()
 Create the 3DView instance of this 3d widget.
virtual void resetViewState ()
 Reset the view state of this 3DWidget.

Private Types

enum  Manipulator { NoneManipulator, X_AxisManipulator, Y_AxisManipulator, Z_AxisManipulator }

Private Member Functions

void moveManipulatorRep (const GLC_Point3d &pos)
 Move the manipulator 3D representation.

Private Attributes

GLC_Point3d m_Center
 The axis center.
double m_ScaleFactor
 The manipulator scale factor.
Manipulator m_CurrentManipulator
 Current manipulator enum.
GLC_AbstractManipulatorm_pCurrentManipulator
 The current manipulator of this cutting plane.
double m_AxisLength
 The axis length.
double m_AxisRadiusRatio
 The axis radius Ratio : Radius / Length.

Detailed Description

GLC_Axis : 3d Widget axis use to translate objects.

GLC_Axis

Definition at line 38 of file glc_axis.h.


Member Enumeration Documentation

enum GLC_Axis::Manipulator [private]
Enumerator:
NoneManipulator 
X_AxisManipulator 
Y_AxisManipulator 
Z_AxisManipulator 

Definition at line 40 of file glc_axis.h.


Constructor & Destructor Documentation

GLC_Axis::GLC_Axis ( const GLC_Point3d center,
GLC_3DWidgetManagerHandle pWidgetManagerHandle = NULL 
)

Construct a axis widget.

Definition at line 32 of file glc_axis.cpp.

GLC_Axis::GLC_Axis ( const GLC_Axis axis  ) 

Copy constructor.

Definition at line 44 of file glc_axis.cpp.

References GLC_AbstractManipulator::clone(), and m_pCurrentManipulator.

GLC_Axis::~GLC_Axis (  )  [virtual]

Destructor.

Definition at line 59 of file glc_axis.cpp.

References m_pCurrentManipulator.


Member Function Documentation

double GLC_Axis::axisLength (  )  const [inline]

Return this axis length.

Definition at line 73 of file glc_axis.h.

GLC_Point3d GLC_Axis::center ( void   )  const [inline]

Return this axis center.

Definition at line 69 of file glc_axis.h.

void GLC_Axis::create3DviewInstance (  )  [protected, virtual]
glc::WidgetEventFlag GLC_Axis::mouseMove ( const GLC_Point3d pos,
Qt::MouseButtons  button,
GLC_uint  id 
) [virtual]
glc::WidgetEventFlag GLC_Axis::mousePressed ( const GLC_Point3d pos,
Qt::MouseButton  button,
GLC_uint  id 
) [virtual]

The mouse is over this widget and a mousse button is pressed.

Reimplemented from GLC_3DWidget.

Definition at line 141 of file glc_axis.cpp.

References glc::IgnoreEvent, and select().

glc::WidgetEventFlag GLC_Axis::mouseReleased ( Qt::MouseButton  button  )  [virtual]
void GLC_Axis::moveManipulatorRep ( const GLC_Point3d pos  )  [private]
GLC_Axis & GLC_Axis::operator= ( const GLC_Axis axis  )  [virtual]

Copy the given cutting plane in this cutting plane and return a reference on this cutting plane.

Definition at line 64 of file glc_axis.cpp.

References GLC_AbstractManipulator::clone(), m_Center, and m_pCurrentManipulator.

void GLC_Axis::resetViewState (  )  [protected, virtual]

Reset the view state of this 3DWidget.

Implements GLC_3DWidget.

Definition at line 276 of file glc_axis.cpp.

glc::WidgetEventFlag GLC_Axis::select ( const GLC_Point3d pos,
GLC_uint  id 
) [virtual]
void GLC_Axis::setAxisLength ( double  length  ) 

Set the axis length.

Definition at line 89 of file glc_axis.cpp.

References create3DviewInstance(), GLC_3DWidget::isEmpty(), m_AxisLength, and GLC_3DWidget::remove3DViewInstance().

void GLC_Axis::setCenter ( const GLC_Point3d newCenter  ) 

Set Axis center.

Definition at line 99 of file glc_axis.cpp.

References m_Center, and moveManipulatorRep().

glc::WidgetEventFlag GLC_Axis::unselect ( const GLC_Point3d ,
GLC_uint  id 
) [virtual]

This widget as been unselected.

Reimplemented from GLC_3DWidget.

Definition at line 184 of file glc_axis.cpp.

References glc::AcceptEvent, m_CurrentManipulator, m_pCurrentManipulator, and NoneManipulator.

void GLC_Axis::updateWidgetRep (  )  [virtual]

Update widget representation.

Reimplemented from GLC_3DWidget.

Definition at line 78 of file glc_axis.cpp.

References m_Center, m_ScaleFactor, moveManipulatorRep(), GLC_3DWidgetManagerHandle::viewportTangent(), and GLC_3DWidget::widgetManagerHandle().

Referenced by select().


Member Data Documentation

double GLC_Axis::m_AxisLength [private]

The axis length.

Definition at line 153 of file glc_axis.h.

Referenced by create3DviewInstance(), moveManipulatorRep(), and setAxisLength().

double GLC_Axis::m_AxisRadiusRatio [private]

The axis radius Ratio : Radius / Length.

Definition at line 156 of file glc_axis.h.

Referenced by create3DviewInstance().

The axis center.

Definition at line 141 of file glc_axis.h.

Referenced by mouseMove(), operator=(), setCenter(), and updateWidgetRep().

Current manipulator enum.

Definition at line 147 of file glc_axis.h.

Referenced by mouseReleased(), select(), and unselect().

The current manipulator of this cutting plane.

Definition at line 150 of file glc_axis.h.

Referenced by GLC_Axis(), mouseMove(), mouseReleased(), operator=(), select(), unselect(), and ~GLC_Axis().

double GLC_Axis::m_ScaleFactor [private]

The manipulator scale factor.

Definition at line 144 of file glc_axis.h.

Referenced by moveManipulatorRep(), and updateWidgetRep().


The documentation for this class was generated from the following files:

SourceForge.net Logo

©2005-2011 Laurent Ribon