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 ()
 
albaMatrix * GetMatrix ()
 
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)
 
bool FindPokedVme (albaView *view, albaDevice *device, albaVME *&pickedVme, albaInteractionBehavior *&pickedBehavior)
 
void GetPickedPosition (double pos[3])
 
void ResetPick ()
 
 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 albaObject * NewObjectInstance () const =0
 
virtual const albaTypeID & GetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 

Protected Attributes

bool m_PickDone
 
bool m_Picked
 
albaView * m_PickView
 
albaDevice * m_PickDevice
 
albaVME * m_PickedVme
 
albaInteractionBehavior * m_PickedBehavior
 
double m_PickedPosition [3]
 
int m_Button
 
unsigned long m_Modifiers
 
double m_X
 
double m_Y
 
bool m_XYFlag
 
albaAutoPointer< albaMatrix > m_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 albaTypeID & GetStaticTypeId ()
 
static albaObject * SafeDownCast (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 40 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 95 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 99 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 103 of file albaEventInteraction.h.

◆ ~albaEventInteraction()

virtual albaEventInteraction::~albaEventInteraction ( )
inlinevirtual

Definition at line 105 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 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 (the cached picking is not copied)

Reimplemented from albaEventBase.

◆ FindPokedVme()

bool albaEventInteraction::FindPokedVme ( albaView *  view,
albaDevice *  device,
albaVME *&  pickedVme,
albaInteractionBehavior *&  pickedBehavior 
)

Find the VME picked by the device at the event position on the given view.

The picking is performed only the first time, then the result is cached into the event and shared by all the interactors receiving it. Return true if a VME has been picked.

◆ GetPickedPosition()

void albaEventInteraction::GetPickedPosition ( double  pos[3])

Return the position picked by FindPokedVme, meaningful only if a VME has been picked.

◆ ResetPick()

void albaEventInteraction::ResetPick ( )

Discard the cached picking, to be called when the scene or the camera has been changed.

Member Data Documentation

◆ m_PickDone

bool albaEventInteraction::m_PickDone
protected

True if the picking has been performed for this event.

Definition at line 109 of file albaEventInteraction.h.

◆ m_Picked

bool albaEventInteraction::m_Picked
protected

True if the cached picking found a VME.

Definition at line 110 of file albaEventInteraction.h.

◆ m_PickView

albaView* albaEventInteraction::m_PickView
protected

View used by the cached picking.

Definition at line 111 of file albaEventInteraction.h.

◆ m_PickDevice

albaDevice* albaEventInteraction::m_PickDevice
protected

Device used by the cached picking.

Definition at line 112 of file albaEventInteraction.h.

◆ m_PickedVme

albaVME* albaEventInteraction::m_PickedVme
protected

Cached picked VME.

Definition at line 113 of file albaEventInteraction.h.

◆ m_PickedBehavior

albaInteractionBehavior* albaEventInteraction::m_PickedBehavior
protected

Cached behavior of the picked VME.

Definition at line 114 of file albaEventInteraction.h.

◆ m_PickedPosition

double albaEventInteraction::m_PickedPosition[3]
protected

Cached picked position.

Definition at line 115 of file albaEventInteraction.h.

◆ m_Button

int albaEventInteraction::m_Button
protected

Optional button which triggered the event.

Definition at line 117 of file albaEventInteraction.h.

◆ m_Modifiers

unsigned long albaEventInteraction::m_Modifiers
protected

Optional modifiers for the button.

Definition at line 118 of file albaEventInteraction.h.

◆ m_X

double albaEventInteraction::m_X
protected

X coordinate, used by mouse device.

Definition at line 119 of file albaEventInteraction.h.

◆ m_Y

double albaEventInteraction::m_Y
protected

Y coordinate, used by mouse device.

Definition at line 120 of file albaEventInteraction.h.

◆ m_XYFlag

bool albaEventInteraction::m_XYFlag
protected

Used to signal a 2D coordinate is present.

Definition at line 121 of file albaEventInteraction.h.

◆ m_Matrix

albaAutoPointer<albaMatrix> albaEventInteraction::m_Matrix
protected

Pose matrix, used by 3D trackers.

Definition at line 123 of file albaEventInteraction.h.


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