17#ifndef __albaInteractor_h
18#define __albaInteractor_h
long albaID
type for IDs inside ALBA
An agent is a computational object with a default I/O interface.
This abstract class manages function calls coming from devices and issue specific events to interacto...
Implementation of the message object for the Subject/Observer design pattern.
Event class to transport a triggering button and a position from pointing devices.
Abstract class for ALBA interactors This class provides base interface and features of ALBA continuou...
virtual void SetDevice(albaDevice *)
Set the current input device.
bool GetTestMode()
Get TestMode.
void SetStartInteractionEvent(albaID event)
Set the event used to trigger the start of an interaction session.
void SetStartButton(int btn)
Set the modifier that should start the interaction.
void SetButtonMode(int mode)
void SetIgnoreTriggerEvents(bool flag)
Enable/Disable trigger events processing.
ALBA_ID_DEC(INTERACTION_STOPPED)
Issued when interaction is stopped.
virtual int StopInteraction(albaDevice *device)
Stop the interaction, the optional argument force sending an event on the DefaultChannel advising the...
bool m_DeviceIsSet
true if the device has been set with SetDevice by other classes
virtual bool IsInteracting(albaDevice *device)
return true if the specified device is currently in a interaction session
void SetStopInteractionEvent(albaID event)
Set the event used to trigger the end of an interaction session.
void TestModeOn()
Turn On m_TestMode flag.
ALBA_ID_DEC(BUTTON_UP)
Issued when a button is released.
void SetProp(vtkProp3D *prop)
Set the prop to be transformed (optional and to be removed!!!)
albaID m_StopInteractionEvent
the event ID starting the interaction
virtual void SetVME(albaVME *vme)
Set the node to be transformed.
unsigned long m_Modifiers
modifiers of the button for starting the interaction
int GetIgnoreTriggerEvents(bool flag)
bool m_TestMode
Flag used with cppunitTest.
albaDevice * m_Device
Find the pocked VME at button down.
void IgnoreTriggerEventsOff()
virtual void OnButtonDown(albaEventInteraction *e)
albaVME * m_VME
the object being interacted (optional)
virtual bool IsInteracting()
return true if currently in a interaction session
unsigned long GetCurrentModifier()
return the modifers at start of interaction
int m_ButtonMode
Specify if working in single button or multi button mode.
albaView * m_View
the view this interactor is working on
albaID GetStartInteractionEvent()
Get the event used to trigger the start of an interaction session.
void SetButtonModeToSingleButton()
virtual int OnStopInteraction(albaEventInteraction *e)
Process m_StopInteractionEvent.
ALBA_ID_DEC(BUTTON_DOWN)
Issued when a button is pressed.
virtual void SetRendererAndView(vtkRenderer *ren, albaView *view)
Set/Get the renderer this interactor is attached to.
ALBA_ID_DEC(INTERACTION_STARTED)
Issued when interaction is started.
void ComputeWorldToDisplay(double x, double y, double z, double displayPt[3])
void SetButtonModeToMultiButton()
vtkRenderer * GetRenderer()
albaAbstractTypeMacro(albaInteractor, albaAgent)
vtkALBASmartPointer< vtkRenderer > m_Renderer
the renderer this interactor is working on
void TestModeOff()
Used to turn off m_TestMode flag.
int GetCurrentButton()
return the button which started the interaction
vtkALBASmartPointer< vtkProp3D > m_Prop
the prop being interacted (optional)
void IgnoreTriggerEventsOn()
int m_CurrentButton
the button that started the interaction
int m_ButtonsCounter
Take count of the number of button pressed.
void ComputeDisplayToWorld(double x, double y, double z, double worldPt[4])
int m_InteractionFlag
flag if interacting
int m_StartButton
the button that can start the interaction
virtual int StartInteraction(albaDevice *device)
Start the interaction, the optional argument force sending an event on the DefaultChannel advising th...
virtual ~albaInteractor()
unsigned long m_CurrentModifier
m_Modifiers state when interaction was started
void SetModifiers(int mod)
Set the modifier that should start the interaction.
albaID m_StartInteractionEvent
the event ID starting the interaction
albaID GetStopInteractionEvent()
Set the event used to trigger the end of an interaction session.
albaDevice * GetDevice()
Return the current input device.
virtual void OnButtonUp(albaEventInteraction *e)
virtual void OnEvent(albaEventBase *event)
Process events coming from input device.
int m_IgnoreTriggerEvents
flag to ignore start/stop interaction
virtual int OnStartInteraction(albaEventInteraction *e)
Process StartInteractionEvent.
albaMatrix - Time stamped 4x4 Matrix.
albaView is the base class for Views in alba.