HEventInfo
-
class
HEventInfo The
HEventInfoclass stores and manages event information.HEventInfoencapusulates information associated with an event, including the type (timer, key press, or button), location in various coordinates systems, mouse state, and key press state. This is the primary MVO object that receives event information from the user interface.Index
Methods
Alt()Control()DownArrow()GetChar()GetCharRepCount()GetFlags()GetJoystickRotation()GetJoystickTranslation()GetMousePixelPos()GetMouseViewpointPos()GetMouseWheelDelta()GetMouseWindowPos()GetMouseWorldPos()GetTimerId()GetType()GetView()HEventInfo()LButton()LeftAlt()LeftArrow()LeftControl()LeftShift()MButton()RButton()RightAlt()RightArrow()RightControl()RightShift()SetFlags()SetKey()SetMouseWheelDelta()SetPixelPos()SetPoint()SetTimer()SetType()SetViewpointPos()SetWindowPos()SetWorldPos()Shift()UpArrow()
Variables
Methods
-
HEventInfo::HEventInfo(HBaseView *view) Constructs an
HEventInfoobject.Parameters
view: A pointer to theHBaseViewobject.
-
bool
HEventInfo::Control() const const
Returns
True if the control key is currently depressed.
-
bool
HEventInfo::Shift() const const
Returns
True if the shift key is currently depressed.
-
bool
HEventInfo::Alt() const const
Returns
True if the alt key is currently depressed.
-
bool
HEventInfo::LeftAlt() const const
Returns
True if the left alt key is depressed.
-
bool
HEventInfo::LeftControl() const const
Returns
True if the left control key is depressed.
-
bool
HEventInfo::LeftShift() const const
Returns
True if the left shift key is depressed.
-
bool
HEventInfo::RightAlt() const const
Returns
True if the right alt key is depressed.
-
bool
HEventInfo::RightControl() const const
Returns
True if the right control key is depressed.
-
bool
HEventInfo::RightShift() const const
Returns
True if the right shift key is depressed.
-
bool
HEventInfo::LButton() const const
Returns
True if the left mouse button is depressed.
-
bool
HEventInfo::MButton() const const
Returns
True if the middle mouse button is depressed.
-
bool
HEventInfo::RButton() const const
Returns
True if the right mouse button is depressed.
-
bool
HEventInfo::LeftArrow() const const
Returns
True if the left arrow key is depressed.
-
bool
HEventInfo::UpArrow() const const
Returns
True if the up arrow key is depressed.
-
bool
HEventInfo::RightArrow() const const
Returns
True if the right arrow key is depressed.
-
bool
HEventInfo::DownArrow() const const
Returns
True if the down arrow key is depressed.
-
HBaseView *
HEventInfo::GetView() const const
Returns
A pointer to theHBaseViewobject.
-
HPoint const &
HEventInfo::GetMousePixelPos() const const
Returns
The mouse position in pixel coordinates.
-
HPoint const &
HEventInfo::GetMouseWindowPos() const const
Returns
The mouse position in window coordinates.
-
HPoint const &
HEventInfo::GetMouseWorldPos() const const
Returns
The mouse position in world coordinates.
-
HPoint const &
HEventInfo::GetMouseViewpointPos() const const
Returns
The mouse position in viewpoint (camera) coordinates.
-
HPoint const &
HEventInfo::GetJoystickRotation() const const
Returns
The rotation data from the Joystick or 3D Mouse.
-
HPoint const &
HEventInfo::GetJoystickTranslation() const const
Returns
The translation data from the Joystick or 3D Mouse.
-
unsigned int
HEventInfo::GetChar() const const
Returns
The key character associated with a keypress event.
-
unsigned int
HEventInfo::GetCharRepCount() const const
Returns
The number of times the key press event was repeated.
-
unsigned int
HEventInfo::GetTimerId() const const
Returns
The Id number of the current timer event.
-
unsigned int
HEventInfo::GetFlags() const const
Returns
The MVO-specific bit flags like #MVO_LBUTTON for the special key events shift, control, and Left, Middle, and Right mouse buttons.
-
void
HEventInfo::SetType(HEventType NewType) This method sets the event type on the
HEventInfoobject.
-
HEventType
HEventInfo::GetType() const const
Returns
The event type associated to thisHEventInfo.
-
void
HEventInfo::SetPoint(HEventType NewType, int x, int y, unsigned int NewFlags) This method receives and stores mouse event information from the user interface and translates it for use by HOOPS functions.
Parameters
NewType: The type of event.
x: The X coordinate of the mouse event, in window space.
y: The Y coordinate of the mouse event, in window space.
NewFlags: The bitwise MVO flags for mouse buttons, shift and control Key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
void
HEventInfo::SetPixelPos(HEventType NewType, HPoint const &NewPoint, unsigned int NewFlags) This method receives and stores mouse event information in pixel coordinates and translates it for use by HOOPS functions.
Parameters
NewType: The type of event.
NewPoint: The point in pixel coordinates.
NewFlags: The bitwise MVO flags for mouse buttons, shift and control Key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
void
HEventInfo::SetWindowPos(HEventType NewType, HPoint const &NewPoint, unsigned int NewFlags) This method receives and stores mouse event information in window coordinates and translates it for use by HOOPS functions.
Parameters
NewType: The type of event
NewPoint: The point in window coordinates.
NewFlags: The bitwise MVO flags for mouse buttons, shift and control Key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
void
HEventInfo::SetWorldPos(HEventType NewType, HPoint const &NewPoint, unsigned int NewFlags) This method receives and stores mouse event information in world coordinates and translates it for use by HOOPS functions.
Parameters
NewType: The type of event.
NewPoint: The point in world coordinates.
NewFlags: The bitwise MVO flags for mouse buttons, shift and control Key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
void
HEventInfo::SetViewpointPos(HEventType NewType, HPoint const &NewPoint, unsigned int NewFlags) This method receives and stores mouse event information in viewpoint (camera) coordinates and translates it for use in by HOOPS functions.
Parameters
NewType: The type of event
NewPoint: The point in viewpoint coordinates.
NewFlags: The bitwise MVO flags for mouse buttons, shift and control Key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
void
HEventInfo::SetKey(HEventType NewType, unsigned int nChar, unsigned int nRepCnt, unsigned int NewFlags) This method receives and stores key event information from the user interface.
Parameters
NewType: The type of event.
nChar: The key character that is currently depressed.
nRepCnt: The number of times the event has been repeated.
NewFlags: The bitwise MVO flags for mouse buttons, shift and control Key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
void
HEventInfo::SetTimer(HEventType NewType, unsigned int nIDEvent) This method receives and stores timer event information from the user interface.
Parameters
NewType: The type of event.
nIDEvent: The timer ID number generated by the UI.
-
void
HEventInfo::SetMouseWheelDelta(int NewWheelDelta) This method sets the change value in the Mouse Wheel.
Parameters
NewWheelDelta: The new mouse wheel change value.
-
void
HEventInfo::SetFlags(int flags) This method sets the bitwise flags that indicates the state of the mouse buttons, shift and control keys.
Parameters
flags: The bitwise flags for mouse and key states. For example, if both the shift key and left mouse button are depressed, pass #MVO_SHIFT|#MVO_LBUTTON.
-
int
HEventInfo::GetMouseWheelDelta() const const
Returns
The change value of the mouse wheel position.
Variables
-
int const
HEventInfo::MAX_TOUCHES static
int constdefault = 10
-
int
HEventInfo::m_WheelDelta private
int
-
HPoint
HEventInfo::m_ptPixel private
-
HPoint
HEventInfo::m_ptWindow private
-
HPoint
HEventInfo::m_ptWorld private
-
HPoint
HEventInfo::m_ptViewpoint private
-
unsigned int
HEventInfo::m_Char private
unsigned int
-
unsigned int
HEventInfo::m_RepCount private
unsigned int
-
unsigned int
HEventInfo::m_TimerId private
unsigned int
-
float
HEventInfo::m_time private
float
-
unsigned int
HEventInfo::m_flags private
unsigned int
-
HEventType
HEventInfo::m_EventType private
-
HBaseView *
HEventInfo::m_pView private