17#ifndef __albaEventInteraction_h
18#define __albaEventInteraction_h
63 unsigned char GetKey() {
return m_Key;}
84 albaEventBase(sender,id),m_Button(button),m_Modifiers(modifiers),m_Key(0),m_X(0),m_Y(0),m_XYFlag(false) {}
88 albaEventBase(sender,id),m_Button(button),m_Modifiers(modifiers),m_Key(0),m_Matrix(matrix),m_X(0),m_Y(0),m_XYFlag(false) {}
92 albaEventBase(sender,id),m_X(x),m_Y(y),m_XYFlag(true),m_Button(button),m_Modifiers(modifiers),m_Key(0) {}
long albaID
type for IDs inside ALBA
Hold a reference to a T instance.
Implementation of the message object for the Subject/Observer design pattern.
Event class to transport a triggering button and a position from pointing devices.
void Set2DPosition(const double pos[2])
Set screen position, for 2D tracking devices.
albaEventInteraction(void *sender, albaID id, albaMatrix *matrix, int button=0, unsigned long modifiers=0)
overloaded constructor
void SetMatrix(albaMatrix *matrix)
Set the pose matrix, for 3D tracking devices.
void SetKey(unsigned char key)
Set the optional key argument.
void SetModifiers(unsigned long modifiers)
Set the given modifiers value.
void SetModifier(unsigned long idx, bool value=true)
Set the given modifier value.
void Get2DPosition(double pos[2])
Get screen position, for 2D tracking devices.
virtual ~albaEventInteraction()
unsigned char m_Key
Optional Key.
double m_X
X coordinate, used by mouse device.
albaEventInteraction(void *sender=NULL, albaID id=-1, int button=0, unsigned long modifiers=0)
overloaded constructor
bool m_XYFlag
Used to signal a 2D coordinate is present.
virtual void DeepCopy(const albaEventBase *event)
Deep Copy of the object.
bool GetXYFlag()
get the flag for 2D coords
void Set2DPosition(double x, double y)
Set screen position, for 2D tracking devices.
unsigned long GetModifiers()
Get the given modifiers value.
albaAutoPointer< albaMatrix > m_Matrix
Pose matrix, used by 3D trackers.
albaEventInteraction(void *sender, albaID id, double x, double y, int button=0, unsigned long modifiers=0)
overloaded constructor
albaTypeMacro(albaEventInteraction, albaEventBase)
RTTI macro.
void SetXYFlag(bool val)
set the flag for 2D coords
double m_Y
Y coordinate, used by mouse device.
unsigned long m_Modifiers
Optional modifiers for the button.
void SetButton(int button)
Set the triggering button.
bool GetModifier(unsigned long idx)
Get the given modifier value.
int GetButton()
Get the triggering button.
albaMatrix * GetMatrix()
Get the pose matrix, for 3D tracking devices.
int m_Button
Optional button which triggered the event.
unsigned char GetKey()
Get the optional key argument.
albaMatrix - Time stamped 4x4 Matrix.