![]() |
VR-Forces 4.3.1 Class Documentation
|
This class encapsulates the state associated with a mouse button event. More...
Public Types | |
| enum | MouseButton { NoButton = 0x0, LeftButton = 0x1, MiddleButton = 0x2, RightButton = 0x4 } |
| Describe which mouse button(s) are pressed or released. More... | |
| enum | MouseModifier { NoModifier = 0x0, AltModifier = 0x1, CtrlModifier = 0x2, ShiftModifier = 0x4 } |
| Describe which modifier(s) are pressed. More... | |
Public Member Functions | |
| DtMouseState () | |
| Default constructor. | |
| DtMouseState (int x, int y, double nx, double ny, int wheel, MouseButton buttonState, MouseModifier modState) | |
| Construct a mouse event. | |
| virtual | ~DtMouseState () |
| Destructor. | |
| DtMouseState (const DtMouseState &) | |
| Copy constructor. | |
| DtMouseState & | operator= (const DtMouseState &) |
| Assignment operator. | |
| virtual int | x () const |
| Return the X-axis coorindate of the mouse. | |
| virtual void | setX (int x) |
| Set the X-axis value. | |
| virtual int | y () const |
| Return the Y-axis coorindate of the mouse. | |
| virtual void | setY (int y) |
| Set the Y-axis value. | |
| virtual double | normalizedX () const |
| Get the X value normalized ( -1 .. 1) | |
| virtual void | setNormalizedX (double nx) |
| Set the normalized X value. | |
| virtual double | normalizedY () const |
| Get the Y value normalized ( -1 .. 1) | |
| virtual void | setNormalizedY (double ny) |
| Set the normalized Y value. | |
| virtual int | wheel () const |
| Returns the wheel value of the mouse. | |
| virtual void | setWheel (int wheel) |
| Set the wheel value. | |
| virtual bool | leftDown () const |
| Return state of the left button. | |
| virtual void | setLeftDown (bool leftDown) |
| Set the state of the left mouse button. | |
| virtual bool | middleDown () const |
| Return state of the middle button. | |
| virtual void | setMiddleDown (bool middleDown) |
| Set the state of the middle mouse button. | |
| virtual bool | rightDown () const |
| Return state of the right button. | |
| virtual void | setRightDown (bool rightDown) |
| Set the state of the right mouse button. | |
| virtual MouseButton | buttonState () const |
| get the entire state vector instead of using the boolean accessors | |
| virtual void | setButtonState (MouseButton buttonState) |
| set the entire state vector instead of using the boolean mutators | |
| virtual bool | altDown () const |
| Return if the alt modifier key was pressed with the mouse event. | |
| virtual void | setAltDown (bool altDown) |
| Set the alt (modifier) variable. | |
| virtual bool | ctrlDown () const |
| Return if the ctrl modifier key was pressed with the mouse event. | |
| virtual void | setCtrlDown (bool ctrlDown) |
| Set the ctrl (modifier) variable. | |
| virtual bool | shiftDown () const |
| Return if the shift modifier key was pressed with the mouse event. | |
| virtual void | setShiftDown (bool shiftDown) |
| Set the shift (modifier) variable. | |
| virtual MouseModifier | modifiers () const |
| Get the entire modifier vector instead of using the boolean accessors. | |
| virtual void | setModifiers (MouseModifier modifiers) |
| Set the entire modifier vector instead of using the boolean mutators. | |
Protected Attributes | |
| unsigned int | myX |
| unsigned int | myY |
| double | myNormalizedX |
| double | myNormalizedY |
| int | myWheel |
| MouseButton | myButtonState |
| MouseModifier | myModifiers |
This class encapsulates the state associated with a mouse button event.
| makVrv::DtMouseState::DtMouseState | ( | ) |
Default constructor.
| makVrv::DtMouseState::DtMouseState | ( | int | x, |
| int | y, | ||
| double | nx, | ||
| double | ny, | ||
| int | wheel, | ||
| MouseButton | buttonState, | ||
| MouseModifier | modState | ||
| ) |
Construct a mouse event.
|
virtual |
Destructor.
| makVrv::DtMouseState::DtMouseState | ( | const DtMouseState & | ) |
Copy constructor.
| DtMouseState& makVrv::DtMouseState::operator= | ( | const DtMouseState & | ) |
Assignment operator.
|
virtual |
Return the X-axis coorindate of the mouse.
|
virtual |
Set the X-axis value.
|
virtual |
Return the Y-axis coorindate of the mouse.
|
virtual |
Set the Y-axis value.
|
virtual |
Get the X value normalized ( -1 .. 1)
|
virtual |
Set the normalized X value.
|
virtual |
Get the Y value normalized ( -1 .. 1)
|
virtual |
Set the normalized Y value.
|
virtual |
Returns the wheel value of the mouse.
|
virtual |
Set the wheel value.
|
virtual |
Return state of the left button.
|
virtual |
Set the state of the left mouse button.
|
virtual |
Return state of the middle button.
|
virtual |
Set the state of the middle mouse button.
|
virtual |
Return state of the right button.
|
virtual |
Set the state of the right mouse button.
|
virtual |
get the entire state vector instead of using the boolean accessors
|
virtual |
set the entire state vector instead of using the boolean mutators
|
virtual |
Return if the alt modifier key was pressed with the mouse event.
|
virtual |
Set the alt (modifier) variable.
|
virtual |
Return if the ctrl modifier key was pressed with the mouse event.
|
virtual |
Set the ctrl (modifier) variable.
|
virtual |
Return if the shift modifier key was pressed with the mouse event.
|
virtual |
Set the shift (modifier) variable.
|
virtual |
Get the entire modifier vector instead of using the boolean accessors.
|
virtual |
Set the entire modifier vector instead of using the boolean mutators.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |