Stores data related to a user Action event.
Action events represent any type of mouse or touchscreen events issued by the user.
#include <event/YiActionEvent.h>
Public Attributes | |
int32_t | m_x |
int32_t | m_y |
int32_t | m_flippedY |
int32_t | m_wheelDelta |
ButtonType | m_button |
bool | m_isHoverType |
uint8_t | m_pointerID |
CYIRay | m_Ray |
glm::vec3 | m_localSpaceLocation |
![]() | |
uint64_t | m_eventTimeMs |
Phase | m_phase |
bool | m_canCancel |
bool | m_canBubble |
bool | m_canCapture |
bool | m_stopPropagation |
bool | m_handled |
|
strong |
CYIActionEvent::CYIActionEvent | ( | CYIEvent::Type | eventType | ) |
Constructs an action event from the given event type. Will assert if the type is not an action event.
|
default |
|
virtual |
|
overridevirtual |
Reimplemented from CYIEvent.
Reimplemented in CYIGestureEvent, and CYISwipeGestureEvent.
ButtonType CYIActionEvent::m_button |
The CYIActionEvent::ButtonType that was used.
int32_t CYIActionEvent::m_flippedY |
The y location of the event in flipped screen coordinates.
bool CYIActionEvent::m_isHoverType |
True if the action event is a hover event. An example would be a mouse over event.
glm::vec3 CYIActionEvent::m_localSpaceLocation |
Location of the event in local coordinates. This is determined by intersecting CYIActionEvent::m_Ray with the current target node's mesh, and is updated as the scene tree is traversed. This is 0 if the current target node has no mesh.
uint8_t CYIActionEvent::m_pointerID |
The pointer ID literally refers to a finger on a multi-touch device. Currently this is only supported by Android. For example: if two fingers are down on the tablet, the indexes 0 and 1 are assigned respectively. Then when the user lifts the first finger placed on the tablet the index for the remaining finger would be 1.
CYIRay CYIActionEvent::m_Ray |
The ray is used for picking. The ray is created from the screen coordinates of the event, but as the scene tree is traversed, the ray is tranformed into each node's local space.
int32_t CYIActionEvent::m_wheelDelta |
If the action is CYIEvent::Type::ActionWheel then this is the distance the wheel has rotated since the last CYIEvent::Type::ActionWheel event. A positive value indicates that the wheel was rotated forward. This is typically 0 for all other event types.
int32_t CYIActionEvent::m_x |
The x location of the event in screen coordinates.
int32_t CYIActionEvent::m_y |
The y location of the event in screen coordinates.