#include <glc_userinput.h>
Public Member Functions | |
GLC_UserInput (int x=0, int y=0) | |
virtual | ~GLC_UserInput () |
Get Functions | |
int | x () const |
return the x position | |
int | y () const |
Return the y position. | |
double | normalyzeXTouchCenter () const |
Return normalyze x touch center. | |
double | normalyzeYTouchCenter () const |
Return normalyze x touch center. | |
GLC_Vector2d | translation () const |
Return the translation. | |
double | rotationAngle () const |
Return the rotation angle. | |
double | scaleFactor () const |
Return the scale factor. | |
bool | transformationIsSet () const |
Return true if the transformation has been set. | |
Set Functions | |
void | setPosition (int x, int y) |
Set the position. | |
void | setNormalyzeTouchCenterPosition (double x, double y) |
Set the normalyze position of the center of touch. | |
void | setTransformation (const GLC_Vector2d &translation, double rotation=0.0, double scaleFactor=1.0) |
Set the transformation. | |
void | setTranslation (const GLC_Vector2d &translation) |
Set translation. | |
void | setRotation (double rotation) |
Set rotation. | |
void | setScaleFactor (double scaleFactor) |
Set scaling. | |
Private Attributes | |
int | m_X |
the x position of the user input | |
int | m_Y |
The y position of the user input. | |
double | m_NormalyzeX |
double | m_NormalyzeY |
GLC_Vector2d | m_Translation |
Translation vector. | |
double | m_Rotation |
Rotation angle. | |
double | m_ScaleFactor |
Scale factor. | |
bool | m_TransformationIsSet |
Flag to know if a transformation has been set. |
Definition at line 32 of file glc_userinput.h.
GLC_UserInput::GLC_UserInput | ( | int | x = 0 , |
|
int | y = 0 | |||
) |
Definition at line 27 of file glc_userinput.cpp.
GLC_UserInput::~GLC_UserInput | ( | ) | [virtual] |
Definition at line 40 of file glc_userinput.cpp.
double GLC_UserInput::normalyzeXTouchCenter | ( | ) | const [inline] |
Return normalyze x touch center.
Definition at line 53 of file glc_userinput.h.
Referenced by GLC_TsrMover::init(), and GLC_TsrMover::move().
double GLC_UserInput::normalyzeYTouchCenter | ( | ) | const [inline] |
Return normalyze x touch center.
Definition at line 57 of file glc_userinput.h.
Referenced by GLC_TsrMover::init(), and GLC_TsrMover::move().
double GLC_UserInput::rotationAngle | ( | ) | const [inline] |
Return the rotation angle.
Definition at line 65 of file glc_userinput.h.
Referenced by GLC_TsrMover::move().
double GLC_UserInput::scaleFactor | ( | ) | const [inline] |
Return the scale factor.
Definition at line 69 of file glc_userinput.h.
Referenced by GLC_TsrMover::move().
void GLC_UserInput::setNormalyzeTouchCenterPosition | ( | double | x, | |
double | y | |||
) |
Set the normalyze position of the center of touch.
Definition at line 54 of file glc_userinput.cpp.
References m_NormalyzeX, and m_NormalyzeY.
void GLC_UserInput::setPosition | ( | int | x, | |
int | y | |||
) |
void GLC_UserInput::setRotation | ( | double | rotation | ) | [inline] |
Set rotation.
Definition at line 96 of file glc_userinput.h.
void GLC_UserInput::setScaleFactor | ( | double | scaleFactor | ) | [inline] |
Set scaling.
Definition at line 100 of file glc_userinput.h.
void GLC_UserInput::setTransformation | ( | const GLC_Vector2d & | translation, | |
double | rotation = 0.0 , |
|||
double | scaleFactor = 1.0 | |||
) |
Set the transformation.
Definition at line 60 of file glc_userinput.cpp.
References m_Rotation, m_ScaleFactor, m_TransformationIsSet, and m_Translation.
void GLC_UserInput::setTranslation | ( | const GLC_Vector2d & | translation | ) | [inline] |
Set translation.
Definition at line 92 of file glc_userinput.h.
bool GLC_UserInput::transformationIsSet | ( | ) | const [inline] |
Return true if the transformation has been set.
Definition at line 73 of file glc_userinput.h.
GLC_Vector2d GLC_UserInput::translation | ( | ) | const [inline] |
Return the translation.
Definition at line 61 of file glc_userinput.h.
Referenced by GLC_TsrMover::move().
int GLC_UserInput::x | ( | ) | const [inline] |
return the x position
Definition at line 45 of file glc_userinput.h.
Referenced by GLC_TurnTableMover::init(), GLC_TrackBallMover::init(), GLC_SetTargetMover::init(), GLC_PanMover::init(), GLC_FlyMover::init(), GLC_TurnTableMover::move(), GLC_TrackBallMover::move(), GLC_PanMover::move(), and GLC_FlyMover::move().
int GLC_UserInput::y | ( | ) | const [inline] |
Return the y position.
Definition at line 49 of file glc_userinput.h.
Referenced by GLC_ZoomMover::init(), GLC_TurnTableMover::init(), GLC_TrackBallMover::init(), GLC_SetTargetMover::init(), GLC_PanMover::init(), GLC_FlyMover::init(), GLC_ZoomMover::move(), GLC_TurnTableMover::move(), GLC_TrackBallMover::move(), GLC_PanMover::move(), and GLC_FlyMover::move().
double GLC_UserInput::m_NormalyzeX [private] |
Definition at line 115 of file glc_userinput.h.
Referenced by setNormalyzeTouchCenterPosition().
double GLC_UserInput::m_NormalyzeY [private] |
Definition at line 116 of file glc_userinput.h.
Referenced by setNormalyzeTouchCenterPosition().
double GLC_UserInput::m_Rotation [private] |
double GLC_UserInput::m_ScaleFactor [private] |
bool GLC_UserInput::m_TransformationIsSet [private] |
Flag to know if a transformation has been set.
Definition at line 129 of file glc_userinput.h.
Referenced by setTransformation().
GLC_Vector2d GLC_UserInput::m_Translation [private] |
Translation vector.
Definition at line 120 of file glc_userinput.h.
Referenced by setTransformation().
int GLC_UserInput::m_X [private] |
the x position of the user input
Definition at line 109 of file glc_userinput.h.
Referenced by setPosition().
int GLC_UserInput::m_Y [private] |
The y position of the user input.
Definition at line 112 of file glc_userinput.h.
Referenced by setPosition().