GLC_TrackBallMover Class Reference

GLC_TrackBallMover : Track ball interactive manipulation. More...

#include <glc_trackballmover.h>

Inheritance diagram for GLC_TrackBallMover:

List of all members.

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 ()
Get Functions

virtual GLC_Moverclone () const
 Return a clone of the mover.
Set Functions

virtual void init (const GLC_UserInput &userInput)
 Initialized the mover.
virtual bool move (const GLC_UserInput &userInput)
 Move the camera.
void setRatio (double ratio)
 Set this mover screen ratio.

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.

Detailed Description

GLC_TrackBallMover : Track ball interactive manipulation.

Definition at line 35 of file glc_trackballmover.h.

Constructor & Destructor Documentation

GLC_TrackBallMover::GLC_TrackBallMover ( GLC_Viewport pViewport,
const QList< GLC_RepMover * > &  repsList = QList<GLC_RepMover*>() 

Default constructor.

Definition at line 29 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 38 of file glc_trackballmover.cpp.

GLC_TrackBallMover::~GLC_TrackBallMover (  )  [virtual]


Definition at line 45 of file glc_trackballmover.cpp.

Member Function Documentation

GLC_Mover * GLC_TrackBallMover::clone (  )  const [virtual]

Return a clone of the mover.

Implements GLC_Mover.

Definition at line 55 of file glc_trackballmover.cpp.

References GLC_TrackBallMover().

void GLC_TrackBallMover::init ( const GLC_UserInput userInput  )  [virtual]
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 118 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().

Referenced by init(), and move().

bool GLC_TrackBallMover::move ( const GLC_UserInput userInput  )  [virtual]
void GLC_TrackBallMover::setRatio ( double  ratio  ) 

Set this mover screen ratio.

Definition at line 100 of file glc_trackballmover.cpp.

References m_Ratio, GLC_Mover::m_RepMoverList, and GLC_RepTrackBallMover::setRatio().

Member Data Documentation

double GLC_TrackBallMover::m_Ratio [private]

The ratio of the trackball size.

Definition at line 89 of file glc_trackballmover.h.

Referenced by mapForTracking(), and setRatio().

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

©2005-2011 Laurent Ribon