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 42 of file glc_abstractmanipulator.h.
| GLC_AbstractManipulator::GLC_AbstractManipulator | ( | GLC_Viewport * | pViewport | ) |
Construct an abstract manipulator with the given viewport.
Definition at line 31 of file glc_abstractmanipulator.cpp.
References m_pViewport.
| GLC_AbstractManipulator::GLC_AbstractManipulator | ( | const GLC_AbstractManipulator & | abstractManipulator | ) |
Copy constructor.
Definition at line 40 of file glc_abstractmanipulator.cpp.
| GLC_AbstractManipulator::~GLC_AbstractManipulator | ( | ) | [virtual] |
Destructor.
Definition at line 49 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_CuttingPlane::GLC_CuttingPlane(), and GLC_CuttingPlane::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 53 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_CuttingPlane::mousePressed(), GLC_CuttingPlane::mouseReleased(), and GLC_CuttingPlane::select().
| void GLC_AbstractManipulator::exitManipulateState | ( | ) | [inline] |
Exit this manipulator of manipulate state.
Definition at line 93 of file glc_abstractmanipulator.h.
| bool GLC_AbstractManipulator::isInManipulateState | ( | ) | const [inline] |
Return true if this manipulator is in manipulate state.
Definition at line 65 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 61 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().
| const GLC_Point3d& GLC_AbstractManipulator::previousPosition | ( | ) | const [inline] |
Return a const reference on the previous position.
Definition at line 69 of file glc_abstractmanipulator.h.
Referenced by GLC_PullManipulator::doManipulate(), and GLC_CuttingPlane::mouseMove().
| void GLC_AbstractManipulator::setViewport | ( | GLC_Viewport * | pViewport | ) | [inline] |
Set the viewport of this manipulator.
Definition at line 97 of file glc_abstractmanipulator.h.
| GLC_Viewport* GLC_AbstractManipulator::viewportHandle | ( | ) | const [inline] |
Return the viewport of this manipulator.
Definition at line 73 of file glc_abstractmanipulator.h.
bool GLC_AbstractManipulator::m_IsInManipulateState [protected] |
Flag to know if this manipulator is in manipulate state.
Definition at line 123 of file glc_abstractmanipulator.h.
Referenced by enterManipulateState(), and manipulate().
The previous position.
Definition at line 120 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 114 of file glc_abstractmanipulator.h.
Referenced by GLC_PullManipulator::doManipulate(), enterManipulateState(), GLC_AbstractManipulator(), and manipulate().
GLC_Plane GLC_AbstractManipulator::m_SliddingPlane [protected] |
The currentSlidding plane.
Definition at line 117 of file glc_abstractmanipulator.h.
Referenced by GLC_PullManipulator::doManipulate(), and enterManipulateState().