![]() |
VR-Forces 4.0.4 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 ( 0. - 1.) | |
| virtual void | setNormalizedX (double nx) |
| Set the normalized X value. | |
| virtual double | normalizedY () const |
| Get the Y value normalized ( 0. - 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.
Default constructor.
| makVrv::DtMouseState::DtMouseState | ( | int | x, |
| int | y, | ||
| double | nx, | ||
| double | ny, | ||
| int | wheel, | ||
| MouseButton | buttonState, | ||
| MouseModifier | modState | ||
| ) |
Construct a mouse event.
| virtual makVrv::DtMouseState::~DtMouseState | ( | ) | [virtual] |
Destructor.
| makVrv::DtMouseState::DtMouseState | ( | const DtMouseState & | ) |
Copy constructor.
| DtMouseState& makVrv::DtMouseState::operator= | ( | const DtMouseState & | ) |
Assignment operator.
| virtual int makVrv::DtMouseState::x | ( | ) | const [virtual] |
Return the X-axis coorindate of the mouse.
| virtual void makVrv::DtMouseState::setX | ( | int | x | ) | [virtual] |
Set the X-axis value.
| virtual int makVrv::DtMouseState::y | ( | ) | const [virtual] |
Return the Y-axis coorindate of the mouse.
| virtual void makVrv::DtMouseState::setY | ( | int | y | ) | [virtual] |
Set the Y-axis value.
| virtual double makVrv::DtMouseState::normalizedX | ( | ) | const [virtual] |
Get the X value normalized ( 0. - 1.)
| virtual void makVrv::DtMouseState::setNormalizedX | ( | double | nx | ) | [virtual] |
Set the normalized X value.
| virtual double makVrv::DtMouseState::normalizedY | ( | ) | const [virtual] |
Get the Y value normalized ( 0. - 1.)
| virtual void makVrv::DtMouseState::setNormalizedY | ( | double | ny | ) | [virtual] |
Set the normalized Y value.
| virtual int makVrv::DtMouseState::wheel | ( | ) | const [virtual] |
Returns the wheel value of the mouse.
| virtual void makVrv::DtMouseState::setWheel | ( | int | wheel | ) | [virtual] |
Set the wheel value.
| virtual bool makVrv::DtMouseState::leftDown | ( | ) | const [virtual] |
Return state of the left button.
| virtual void makVrv::DtMouseState::setLeftDown | ( | bool | leftDown | ) | [virtual] |
Set the state of the left mouse button.
| virtual bool makVrv::DtMouseState::middleDown | ( | ) | const [virtual] |
Return state of the middle button.
| virtual void makVrv::DtMouseState::setMiddleDown | ( | bool | middleDown | ) | [virtual] |
Set the state of the middle mouse button.
| virtual bool makVrv::DtMouseState::rightDown | ( | ) | const [virtual] |
Return state of the right button.
| virtual void makVrv::DtMouseState::setRightDown | ( | bool | rightDown | ) | [virtual] |
Set the state of the right mouse button.
| virtual MouseButton makVrv::DtMouseState::buttonState | ( | ) | const [virtual] |
get the entire state vector instead of using the boolean accessors
| virtual void makVrv::DtMouseState::setButtonState | ( | MouseButton | buttonState | ) | [virtual] |
set the entire state vector instead of using the boolean mutators
| virtual bool makVrv::DtMouseState::altDown | ( | ) | const [virtual] |
Return if the alt modifier key was pressed with the mouse event.
| virtual void makVrv::DtMouseState::setAltDown | ( | bool | altDown | ) | [virtual] |
Set the alt (modifier) variable.
| virtual bool makVrv::DtMouseState::ctrlDown | ( | ) | const [virtual] |
Return if the ctrl modifier key was pressed with the mouse event.
| virtual void makVrv::DtMouseState::setCtrlDown | ( | bool | ctrlDown | ) | [virtual] |
Set the ctrl (modifier) variable.
| virtual bool makVrv::DtMouseState::shiftDown | ( | ) | const [virtual] |
Return if the shift modifier key was pressed with the mouse event.
| virtual void makVrv::DtMouseState::setShiftDown | ( | bool | shiftDown | ) | [virtual] |
Set the shift (modifier) variable.
| virtual MouseModifier makVrv::DtMouseState::modifiers | ( | ) | const [virtual] |
Get the entire modifier vector instead of using the boolean accessors.
| virtual void makVrv::DtMouseState::setModifiers | ( | MouseModifier | modifiers | ) | [virtual] |
Set the entire modifier vector instead of using the boolean mutators.
unsigned int makVrv::DtMouseState::myX [protected] |
unsigned int makVrv::DtMouseState::myY [protected] |
double makVrv::DtMouseState::myNormalizedX [protected] |
double makVrv::DtMouseState::myNormalizedY [protected] |
int makVrv::DtMouseState::myWheel [protected] |
MouseButton makVrv::DtMouseState::myButtonState [protected] |
MouseModifier makVrv::DtMouseState::myModifiers [protected] |