GLC_AbstractManipulator : Base class for all manipulator. More...
#include <glc_abstractmanipulator.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_AbstractManipulator (GLC_Viewport *pViewport) | |
| Construct an abstract manipulator with the given viewport. | |
| GLC_AbstractManipulator (const GLC_AbstractManipulator &abstractManipulator) | |
| Copy constructor. | |
| virtual | ~GLC_AbstractManipulator () |
| Destructor. | |
Get Functions | |
| bool | isInManipulateState () const |
| Return true if this manipulator is in manipulate state. | |
| const GLC_Point3d & | previousPosition () const |
| Return a const reference on the previous position. | |
| GLC_Viewport * | viewportHandle () const |
| Return the viewport of this manipulator. | |
| virtual GLC_AbstractManipulator * | clone () const =0 |
| Clone the concrete manipulator. | |
Set Functions | |
| void | enterManipulateState (const GLC_Point3d &startPoint) |
| Put this manipulator in manipulate state. | |
| GLC_Matrix4x4 | manipulate (const GLC_Point3d &newPoint) |
| Manipulate this manipulator and return the moving matrix. | |
| void | exitManipulateState () |
| Exit this manipulator of manipulate state. | |
| void | setViewport (GLC_Viewport *pViewport) |
| Set the viewport of this manipulator. | |
Protected Member Functions | |
| virtual GLC_Matrix4x4 | doManipulate (const GLC_Point3d &newPoint, const GLC_Vector3d &projectionDirection)=0 |
| Manipulate the concret manipulator and return the moving matrix. | |
Protected Attributes | |
| GLC_Viewport * | m_pViewport |
| The viewport associated with this manipulator. | |
| GLC_Plane | m_SliddingPlane |
| The currentSlidding plane. | |
| GLC_Point3d | m_PreviousPosition |
| The previous position. | |
| bool | m_IsInManipulateState |
| Flag to know if this manipulator is in manipulate state. | |
GLC_AbstractManipulator : Base class for all manipulator.
Definition at line 40 of file glc_abstractmanipulator.h.
| GLC_AbstractManipulator::GLC_AbstractManipulator | ( | GLC_Viewport * | pViewport | ) |
Construct an abstract manipulator with the given viewport.
Definition at line 29 of file glc_abstractmanipulator.cpp.
References m_pViewport.
| GLC_AbstractManipulator::GLC_AbstractManipulator | ( | const GLC_AbstractManipulator & | abstractManipulator | ) |
Copy constructor.
Definition at line 38 of file glc_abstractmanipulator.cpp.
| GLC_AbstractManipulator::~GLC_AbstractManipulator | ( | ) | [virtual] |
Destructor.
Definition at line 47 of file glc_abstractmanipulator.cpp.
| virtual GLC_AbstractManipulator* GLC_AbstractManipulator::clone | ( | ) | const [pure virtual] |
Clone the concrete manipulator.
Implemented in GLC_PullManipulator, and GLC_RotationManipulator.
Referenced by GLC_Axis::GLC_Axis(), GLC_CuttingPlane::GLC_CuttingPlane(), GLC_CuttingPlane::operator=(), and GLC_Axis::operator=().
| virtual GLC_Matrix4x4 GLC_AbstractManipulator::doManipulate | ( | const GLC_Point3d & | newPoint, | |
| const GLC_Vector3d & | projectionDirection | |||
| ) | [protected, pure virtual] |
Manipulate the concret manipulator and return the moving matrix.
Implemented in GLC_PullManipulator, and GLC_RotationManipulator.
Referenced by manipulate().
| void GLC_AbstractManipulator::enterManipulateState | ( | const GLC_Point3d & | startPoint | ) |
Put this manipulator in manipulate state.
Definition at line 51 of file glc_abstractmanipulator.cpp.
References GLC_Viewport::cameraHandle(), GLC_Camera::forward(), m_IsInManipulateState, m_PreviousPosition, m_pViewport, m_SliddingPlane, and GLC_Vector3d::normalize().
Referenced by GLC_CuttingPlane::mouseMove(), GLC_Axis::mouseMove(), GLC_CuttingPlane::mousePressed(), GLC_CuttingPlane::mouseReleased(), GLC_CuttingPlane::select(), and GLC_Axis::select().
| void GLC_AbstractManipulator::exitManipulateState | ( | ) | [inline] |
Exit this manipulator of manipulate state.
Definition at line 91 of file glc_abstractmanipulator.h.
| bool GLC_AbstractManipulator::isInManipulateState | ( | ) | const [inline] |
Return true if this manipulator is in manipulate state.
Definition at line 63 of file glc_abstractmanipulator.h.
Referenced by GLC_PullManipulator::setPullingDirection().
| GLC_Matrix4x4 GLC_AbstractManipulator::manipulate | ( | const GLC_Point3d & | newPoint | ) |
Manipulate this manipulator and return the moving matrix.
Definition at line 59 of file glc_abstractmanipulator.cpp.
References GLC_Viewport::cameraHandle(), doManipulate(), GLC_Camera::eye(), GLC_Camera::forward(), m_IsInManipulateState, m_pViewport, GLC_Vector3d::normalize(), and GLC_Viewport::useOrtho().
Referenced by GLC_CuttingPlane::mouseMove(), and GLC_Axis::mouseMove().
| const GLC_Point3d& GLC_AbstractManipulator::previousPosition | ( | ) | const [inline] |
Return a const reference on the previous position.
Definition at line 67 of file glc_abstractmanipulator.h.
Referenced by GLC_PullManipulator::doManipulate(), GLC_CuttingPlane::mouseMove(), and GLC_Axis::mouseMove().
| void GLC_AbstractManipulator::setViewport | ( | GLC_Viewport * | pViewport | ) | [inline] |
Set the viewport of this manipulator.
Definition at line 95 of file glc_abstractmanipulator.h.
| GLC_Viewport* GLC_AbstractManipulator::viewportHandle | ( | ) | const [inline] |
Return the viewport of this manipulator.
Definition at line 71 of file glc_abstractmanipulator.h.
bool GLC_AbstractManipulator::m_IsInManipulateState [protected] |
Flag to know if this manipulator is in manipulate state.
Definition at line 121 of file glc_abstractmanipulator.h.
Referenced by enterManipulateState(), and manipulate().
The previous position.
Definition at line 118 of file glc_abstractmanipulator.h.
Referenced by GLC_RotationManipulator::doManipulate(), GLC_PullManipulator::doManipulate(), and enterManipulateState().
GLC_Viewport* GLC_AbstractManipulator::m_pViewport [protected] |
The viewport associated with this manipulator.
Definition at line 112 of file glc_abstractmanipulator.h.
Referenced by enterManipulateState(), GLC_AbstractManipulator(), and manipulate().
GLC_Plane GLC_AbstractManipulator::m_SliddingPlane [protected] |
The currentSlidding plane.
Definition at line 115 of file glc_abstractmanipulator.h.
Referenced by GLC_PullManipulator::doManipulate(), and enterManipulateState().