ALBA
Public Member Functions | Protected Attributes | List of all members
albaEventInteraction Class Reference

#include <albaEventInteraction.h>

Inheritance diagram for albaEventInteraction:
Inheritance graph
[legend]
Collaboration diagram for albaEventInteraction:
Collaboration graph
[legend]

Public Member Functions

 albaTypeMacro (albaEventInteraction, albaEventBase)
 
void Set2DPosition (double x, double y)
 
void Set2DPosition (const double pos[2])
 
void Get2DPosition (double pos[2])
 
void SetXYFlag (bool val)
 
bool GetXYFlag ()
 
void SetButton (int button)
 
int GetButton ()
 
void SetKey (unsigned char key)
 
unsigned char GetKey ()
 
albaMatrixGetMatrix ()
 
void SetMatrix (albaMatrix *matrix)
 
void SetModifier (unsigned long idx, bool value=true)
 
bool GetModifier (unsigned long idx)
 
void SetModifiers (unsigned long modifiers)
 
unsigned long GetModifiers ()
 
virtual void DeepCopy (const albaEventBase *event)
 
 albaEventInteraction (void *sender=NULL, albaID id=-1, int button=0, unsigned long modifiers=0)
 
 albaEventInteraction (void *sender, albaID id, albaMatrix *matrix, int button=0, unsigned long modifiers=0)
 
 albaEventInteraction (void *sender, albaID id, double x, double y, int button=0, unsigned long modifiers=0)
 
virtual ~albaEventInteraction ()
 
- Public Member Functions inherited from albaEventBase
 albaEventBase (void *sender=NULL, albaID id=ID_NO_EVENT, void *data=NULL, albaID channel=MCH_UP)
 
virtual ~albaEventBase ()
 
 albaTypeMacro (albaEventBase, albaObject)
 
 albaEventBase (const albaEventBase &c)
 
virtual void DeepCopy (const albaEventBase *alba_event)
 
void SetSender (void *sender)
 
void * GetSender ()
 
void SetId (albaID id)
 
albaID GetId ()
 
albaID GetChannel ()
 
void SetChannel (albaID channel)
 
void SetData (void *calldata)
 
void * GetData ()
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 

Protected Attributes

int m_Button
 
unsigned long m_Modifiers
 
unsigned char m_Key
 
double m_X
 
double m_Y
 
bool m_XYFlag
 
albaAutoPointer< albaMatrixm_Matrix
 
- Protected Attributes inherited from albaEventBase
void * m_Sender
 
void * m_Data
 
albaID m_Id
 
albaID m_Channel
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 

Additional Inherited Members

- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 

Detailed Description

Event class to transport a triggering button and a position from pointing devices.

Evant issue by 2D and 3D tracking devices in correspondace to MoveEvent, ButtonDownEvent and ButtonUpevent. 2D devices set the X and Y coordinates, while 3D devices set the pose matrix. The event can also store an optional button argument, used to store the button indexs when events for button down and button up are issued. Also an optional word of modifiers can be used.

See also
albaEventBase albaDeviceButtonsPadTracker MoveEvent ButtonDownEvent ButtonUpEvent

Definition at line 35 of file albaEventInteraction.h.

Constructor & Destructor Documentation

◆ albaEventInteraction() [1/3]

albaEventInteraction::albaEventInteraction ( void *  sender = NULL,
albaID  id = -1,
int  button = 0,
unsigned long  modifiers = 0 
)
inline

overloaded constructor

Definition at line 83 of file albaEventInteraction.h.

◆ albaEventInteraction() [2/3]

albaEventInteraction::albaEventInteraction ( void *  sender,
albaID  id,
albaMatrix matrix,
int  button = 0,
unsigned long  modifiers = 0 
)
inline

overloaded constructor

Definition at line 87 of file albaEventInteraction.h.

◆ albaEventInteraction() [3/3]

albaEventInteraction::albaEventInteraction ( void *  sender,
albaID  id,
double  x,
double  y,
int  button = 0,
unsigned long  modifiers = 0 
)
inline

overloaded constructor

Definition at line 91 of file albaEventInteraction.h.

◆ ~albaEventInteraction()

virtual albaEventInteraction::~albaEventInteraction ( )
inlinevirtual

Definition at line 93 of file albaEventInteraction.h.

Member Function Documentation

◆ albaTypeMacro()

albaEventInteraction::albaTypeMacro ( albaEventInteraction  ,
albaEventBase   
)

RTTI macro.

◆ Set2DPosition() [1/2]

void albaEventInteraction::Set2DPosition ( double  x,
double  y 
)

Set screen position, for 2D tracking devices.

◆ Set2DPosition() [2/2]

void albaEventInteraction::Set2DPosition ( const double  pos[2])

Set screen position, for 2D tracking devices.

◆ Get2DPosition()

void albaEventInteraction::Get2DPosition ( double  pos[2])

Get screen position, for 2D tracking devices.

◆ SetXYFlag()

void albaEventInteraction::SetXYFlag ( bool  val)

set the flag for 2D coords

◆ GetXYFlag()

bool albaEventInteraction::GetXYFlag ( )

get the flag for 2D coords

◆ SetButton()

void albaEventInteraction::SetButton ( int  button)

Set the triggering button.

◆ GetButton()

int albaEventInteraction::GetButton ( )
inline

Get the triggering button.

Definition at line 58 of file albaEventInteraction.h.

◆ SetKey()

void albaEventInteraction::SetKey ( unsigned char  key)

Set the optional key argument.

◆ GetKey()

unsigned char albaEventInteraction::GetKey ( )
inline

Get the optional key argument.

Definition at line 63 of file albaEventInteraction.h.

◆ GetMatrix()

albaMatrix * albaEventInteraction::GetMatrix ( )

Get the pose matrix, for 3D tracking devices.

◆ SetMatrix()

void albaEventInteraction::SetMatrix ( albaMatrix matrix)

Set the pose matrix, for 3D tracking devices.

◆ SetModifier()

void albaEventInteraction::SetModifier ( unsigned long  idx,
bool  value = true 
)

Set the given modifier value.

◆ GetModifier()

bool albaEventInteraction::GetModifier ( unsigned long  idx)

Get the given modifier value.

◆ SetModifiers()

void albaEventInteraction::SetModifiers ( unsigned long  modifiers)

Set the given modifiers value.

◆ GetModifiers()

unsigned long albaEventInteraction::GetModifiers ( )
inline

Get the given modifiers value.

Definition at line 77 of file albaEventInteraction.h.

◆ DeepCopy()

virtual void albaEventInteraction::DeepCopy ( const albaEventBase event)
virtual

Deep Copy of the object.

Reimplemented from albaEventBase.

Member Data Documentation

◆ m_Button

int albaEventInteraction::m_Button
protected

Optional button which triggered the event.

Definition at line 97 of file albaEventInteraction.h.

◆ m_Modifiers

unsigned long albaEventInteraction::m_Modifiers
protected

Optional modifiers for the button.

Definition at line 98 of file albaEventInteraction.h.

◆ m_Key

unsigned char albaEventInteraction::m_Key
protected

Optional Key.

Definition at line 99 of file albaEventInteraction.h.

◆ m_X

double albaEventInteraction::m_X
protected

X coordinate, used by mouse device.

Definition at line 100 of file albaEventInteraction.h.

◆ m_Y

double albaEventInteraction::m_Y
protected

Y coordinate, used by mouse device.

Definition at line 101 of file albaEventInteraction.h.

◆ m_XYFlag

bool albaEventInteraction::m_XYFlag
protected

Used to signal a 2D coordinate is present.

Definition at line 102 of file albaEventInteraction.h.

◆ m_Matrix

albaAutoPointer<albaMatrix> albaEventInteraction::m_Matrix
protected

Pose matrix, used by 3D trackers.

Definition at line 104 of file albaEventInteraction.h.


The documentation for this class was generated from the following file: