GLC_TrackBallMover : Track ball interactive manipulation. More...
#include <glc_trackballmover.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_TrackBallMover (GLC_Viewport *, const QList< GLC_RepMover * > &repsList=QList< GLC_RepMover * >()) | |
| Default constructor. | |
| GLC_TrackBallMover (const GLC_TrackBallMover &) | |
| Copy constructor. | |
| virtual | ~GLC_TrackBallMover () |
| Destructor. | |
Get Functions | |
| virtual GLC_Mover * | clone () const |
| Return a clone of the mover. | |
Set Functions | |
| virtual void | init (QMouseEvent *e) |
| Initialized the mover. | |
| virtual bool | move (QMouseEvent *e) |
| Move the camera. | |
Private Member Functions | |
| GLC_Vector3d | mapForTracking (double, double) const |
| Convert mouse View coordinate to tracking coordinate (Centred and betwen (-1,-1) and (1,1)). | |
Private Attributes | |
| double | m_Ratio |
| The ratio of the trackball size. | |
GLC_TrackBallMover : Track ball interactive manipulation.
Definition at line 37 of file glc_trackballmover.h.
| GLC_TrackBallMover::GLC_TrackBallMover | ( | GLC_Viewport * | pViewport, | |
| const QList< GLC_RepMover * > & | repsList = QList<GLC_RepMover*>() | |||
| ) |
Default constructor.
Definition at line 30 of file glc_trackballmover.cpp.
References GLC_RepMover::RepMoverInfo::m_MatrixInfo, GLC_Mover::m_MoverInfo, and GLC_RepMover::RepMoverInfo::m_VectorInfo.
Referenced by clone().
| GLC_TrackBallMover::GLC_TrackBallMover | ( | const GLC_TrackBallMover & | mover | ) |
Copy constructor.
Definition at line 39 of file glc_trackballmover.cpp.
| GLC_TrackBallMover::~GLC_TrackBallMover | ( | ) | [virtual] |
Destructor.
Definition at line 46 of file glc_trackballmover.cpp.
| GLC_Mover * GLC_TrackBallMover::clone | ( | ) | const [virtual] |
Return a clone of the mover.
Implements GLC_Mover.
Definition at line 56 of file glc_trackballmover.cpp.
References GLC_TrackBallMover().
| void GLC_TrackBallMover::init | ( | QMouseEvent * | e | ) | [virtual] |
Initialized the mover.
Implements GLC_Mover.
Definition at line 66 of file glc_trackballmover.cpp.
References GLC_Mover::initRepresentation(), GLC_RepMover::RepMoverInfo::m_MatrixInfo, GLC_Mover::m_MoverInfo, GLC_Mover::m_PreviousVector, GLC_RepMover::RepMoverInfo::m_VectorInfo, mapForTracking(), GLC_Vector3d::setVect(), and glc::Z_AXIS().
| GLC_Vector3d GLC_TrackBallMover::mapForTracking | ( | double | x, | |
| double | y | |||
| ) | const [private] |
Convert mouse View coordinate to tracking coordinate (Centred and betwen (-1,-1) and (1,1)).
Definition at line 106 of file glc_trackballmover.cpp.
References GLC_Vector3d::length(), GLC_Mover::m_pViewport, m_Ratio, GLC_Vector3d::setLength(), GLC_Vector3d::setZ(), GLC_Viewport::viewHSize(), GLC_Viewport::viewVSize(), GLC_Vector3d::x(), and GLC_Vector3d::y().
| bool GLC_TrackBallMover::move | ( | QMouseEvent * | e | ) | [virtual] |
Move the camera.
Implements GLC_Mover.
Definition at line 82 of file glc_trackballmover.cpp.
References GLC_Viewport::cameraHandle(), GLC_RepMover::RepMoverInfo::m_MatrixInfo, GLC_Mover::m_MoverInfo, GLC_Mover::m_PreviousVector, GLC_Mover::m_pViewport, mapForTracking(), GLC_Camera::orbit(), and GLC_Mover::updateRepresentation().
double GLC_TrackBallMover::m_Ratio [private] |
The ratio of the trackball size.
Definition at line 88 of file glc_trackballmover.h.
Referenced by mapForTracking().