GLC_CuttingPlane Class Reference

GLC_CuttingPlane : 3d cutting plane widget. More...

#include <glc_cuttingplane.h>

Inheritance diagram for GLC_CuttingPlane:
GLC_3DWidget

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_CuttingPlane (const GLC_Point3d &center, const GLC_Vector3d &normal, double l1, double l2, GLC_3DWidgetManagerHandle *pWidgetManagerHandle=NULL)
 Construct a 3d cutting plane widget.
 GLC_CuttingPlane (const GLC_CuttingPlane &cuttingPlane)
 Construct a 3d cutting plane with the given cutting plane.
virtual ~GLC_CuttingPlane ()
 Destructor.
Get Functions

GLC_Point3d center () const
 Return this cutting plane center.
GLC_Vector3d normal () const
 Return this cutting plane normal.
QColor color () const
 Return this plane color.
double opacity () const
 Return this plane opacity.
Set Functions

virtual GLC_CuttingPlaneoperator= (const GLC_CuttingPlane &cuttingPlane)
 Copy the given cutting plane in this cutting plane and return a reference on this cutting plane.
void updateLength (double l1, double l2)
 Update the lenght of this cutting plane.
void setColor (const QColor &color)
 Set this plane color.
void setOpacity (double opacity)
 Set this plane opacity.
virtual void updateWidgetRep ()
 Update widget representation.
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.

Private Types

enum  Manipulator { TranslationManipulator, RotationManipulator }

Private Member Functions

void moveManipulatorRep (const GLC_Point3d &pos)
 Move the manipulator 3D representation.
GLC_AbstractManipulatorrotationNavigator (int index)
 Create the rotation navigator of the given instance index.

Private Attributes

GLC_Point3d m_Center
 The cutting plane center.
GLC_Vector3d m_Normal
 The cutting plane Normal.
GLC_Matrix4x4 m_CompMatrix
 The cutting plane compostion matrix.
double m_L1
 The cutting plane size.
double m_L2
QColor m_Color
 The cutting plane color.
double m_Opacity
 The cutting plane opacity.
double m_ManipulatorOffsetFactor
 The manipulator offset.
double m_ScaleFactor
 The manipulator scale factor.
int m_SelectionIndex
 Index of the instance in selection.
Manipulator m_CurrentManipulator
 current manipulator enum
GLC_AbstractManipulatorm_pCurrentManipulator
 The current manipulator of this cutting plane.
GLC_Point3d m_CurrentNavigatorPosition
 The current manipulator position.

Detailed Description

GLC_CuttingPlane : 3d cutting plane widget.

GLC_CuttingPlane

Definition at line 40 of file glc_cuttingplane.h.


Member Enumeration Documentation

Enumerator:
TranslationManipulator 
RotationManipulator 

Definition at line 42 of file glc_cuttingplane.h.


Constructor & Destructor Documentation

GLC_CuttingPlane::GLC_CuttingPlane ( const GLC_Point3d center,
const GLC_Vector3d normal,
double  l1,
double  l2,
GLC_3DWidgetManagerHandle pWidgetManagerHandle = NULL 
)

Construct a 3d cutting plane widget.

Definition at line 35 of file glc_cuttingplane.cpp.

References create3DviewInstance(), m_CompMatrix, m_Normal, glc::PI, GLC_Matrix4x4::setMatRot(), glc::X_AXIS(), and glc::Z_AXIS().

GLC_CuttingPlane::GLC_CuttingPlane ( const GLC_CuttingPlane cuttingPlane  ) 

Construct a 3d cutting plane with the given cutting plane.

Definition at line 70 of file glc_cuttingplane.cpp.

References GLC_AbstractManipulator::clone(), and m_pCurrentManipulator.

GLC_CuttingPlane::~GLC_CuttingPlane (  )  [virtual]

Destructor.

Definition at line 92 of file glc_cuttingplane.cpp.

References m_pCurrentManipulator.


Member Function Documentation

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

Return this cutting plane center.

Definition at line 68 of file glc_cuttingplane.h.

QColor GLC_CuttingPlane::color (  )  const [inline]

Return this plane color.

Definition at line 76 of file glc_cuttingplane.h.

void GLC_CuttingPlane::create3DviewInstance (  )  [protected, virtual]
glc::WidgetEventFlag GLC_CuttingPlane::mouseMove ( const GLC_Point3d pos,
Qt::MouseButtons  button,
GLC_uint  id 
) [virtual]
glc::WidgetEventFlag GLC_CuttingPlane::mousePressed ( const GLC_Point3d pos,
Qt::MouseButton  button,
GLC_uint  id 
) [virtual]
glc::WidgetEventFlag GLC_CuttingPlane::mouseReleased ( Qt::MouseButton  button  )  [virtual]
void GLC_CuttingPlane::moveManipulatorRep ( const GLC_Point3d pos  )  [private]
GLC_Vector3d GLC_CuttingPlane::normal (  )  const [inline]

Return this cutting plane normal.

Definition at line 72 of file glc_cuttingplane.h.

double GLC_CuttingPlane::opacity (  )  const [inline]

Return this plane opacity.

Definition at line 80 of file glc_cuttingplane.h.

GLC_CuttingPlane & GLC_CuttingPlane::operator= ( const GLC_CuttingPlane cuttingPlane  )  [virtual]

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

Definition at line 97 of file glc_cuttingplane.cpp.

References GLC_AbstractManipulator::clone(), m_Center, m_Color, m_CompMatrix, m_CurrentNavigatorPosition, m_L1, m_L2, m_Normal, m_Opacity, and m_pCurrentManipulator.

GLC_AbstractManipulator * GLC_CuttingPlane::rotationNavigator ( int  index  )  [private]

Create the rotation navigator of the given instance index.

Definition at line 390 of file glc_cuttingplane.cpp.

References m_CompMatrix, m_CurrentNavigatorPosition, GLC_Matrix4x4::rotationMatrix(), GLC_3DWidget::widgetManagerHandle(), glc::X_AXIS(), glc::Y_AXIS(), and glc::Z_AXIS().

Referenced by mousePressed().

glc::WidgetEventFlag GLC_CuttingPlane::select ( const GLC_Point3d pos,
GLC_uint  id 
) [virtual]
void GLC_CuttingPlane::setColor ( const QColor &  color  )  [inline]

Set this plane color.

Definition at line 97 of file glc_cuttingplane.h.

void GLC_CuttingPlane::setOpacity ( double  opacity  )  [inline]

Set this plane opacity.

Definition at line 101 of file glc_cuttingplane.h.

glc::WidgetEventFlag GLC_CuttingPlane::unselect ( const GLC_Point3d ,
GLC_uint  id 
) [virtual]
void GLC_CuttingPlane::updateLength ( double  l1,
double  l2 
)

Update the lenght of this cutting plane.

Definition at line 118 of file glc_cuttingplane.cpp.

References create3DviewInstance(), GLC_3DWidget::has3DWidgetManager(), m_L1, m_L2, and GLC_3DWidget::remove3DViewInstance().

void GLC_CuttingPlane::updateWidgetRep (  )  [virtual]

Member Data Documentation

The cutting plane center.

Definition at line 155 of file glc_cuttingplane.h.

Referenced by create3DviewInstance(), mouseMove(), and operator=().

QColor GLC_CuttingPlane::m_Color [private]

The cutting plane color.

Definition at line 167 of file glc_cuttingplane.h.

Referenced by create3DviewInstance(), and operator=().

The cutting plane compostion matrix.

Definition at line 161 of file glc_cuttingplane.h.

Referenced by GLC_CuttingPlane(), mouseMove(), moveManipulatorRep(), operator=(), and rotationNavigator().

current manipulator enum

Definition at line 182 of file glc_cuttingplane.h.

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

The current manipulator position.

Definition at line 188 of file glc_cuttingplane.h.

Referenced by mouseMove(), mousePressed(), mouseReleased(), operator=(), rotationNavigator(), select(), and updateWidgetRep().

double GLC_CuttingPlane::m_L1 [private]

The cutting plane size.

Definition at line 164 of file glc_cuttingplane.h.

Referenced by create3DviewInstance(), operator=(), and updateLength().

double GLC_CuttingPlane::m_L2 [private]

Definition at line 164 of file glc_cuttingplane.h.

Referenced by create3DviewInstance(), operator=(), and updateLength().

The manipulator offset.

Definition at line 173 of file glc_cuttingplane.h.

Referenced by moveManipulatorRep(), and updateWidgetRep().

The cutting plane Normal.

Definition at line 158 of file glc_cuttingplane.h.

Referenced by create3DviewInstance(), GLC_CuttingPlane(), mouseMove(), mouseReleased(), moveManipulatorRep(), operator=(), and select().

double GLC_CuttingPlane::m_Opacity [private]

The cutting plane opacity.

Definition at line 170 of file glc_cuttingplane.h.

Referenced by create3DviewInstance(), and operator=().

The current manipulator of this cutting plane.

Definition at line 185 of file glc_cuttingplane.h.

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

The manipulator scale factor.

Definition at line 176 of file glc_cuttingplane.h.

Referenced by moveManipulatorRep(), and updateWidgetRep().

Index of the instance in selection.

Definition at line 179 of file glc_cuttingplane.h.

Referenced by mouseMove(), mousePressed(), mouseReleased(), and unselect().


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

SourceForge.net Logo

©2005-2010 Laurent Ribon