ALBA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
albaGizmoInterface Class Reference

#include <albaGizmoInterface.h>

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

Public Types

enum  MODALITY { G_LOCAL = 0 , G_GLOBAL }
 

Public Member Functions

void SetName (albaString name)
 
albaString GetName ()
 
virtual void SetInput (albaVME *vme)
 
albaVMEGetInput ()
 
void SetMediator (albaObserver *mediator)
 
albaObserverGetMediator ()
 
void SetAutoscale (bool autoscale)
 
bool GetAutoscale ()
 
void SetRenderWindowHeightPercentage (double percentage)
 
double GetRenderWindowHeightPercentage ()
 
void SetAlwaysVisible (bool alwaysVisible)
 
bool GetAlwaysVisible ()
 
void SetListener (albaObserver *listener)
 
albaObserverGetListener ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual void Show (bool show)
 
void SetModalityToLocal ()
 
void SetModalityToGlobal ()
 
int GetModality ()
 
virtual void SetAbsPose (albaMatrix *absPose)
 
virtual albaMatrixGetAbsPose ()
 
virtual albaGUIGetGui ()
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Member Functions

 albaGizmoInterface ()
 
virtual ~albaGizmoInterface ()
 
void SendTransformMatrix (albaMatrix *matrix, int eventId, long arg)
 
virtual void OnEventGizmoGui (albaEventBase *alba_event)
 
virtual void OnEventGizmoComponents (albaEventBase *alba_event)
 

Protected Attributes

albaObserverm_Mediator
 
albaString m_Name
 
albaVMEm_InputVME
 
int m_Modality
 
albaObserverm_Listener
 
albaVMEm_RefSysVME
 
bool m_Visibility
 
double m_RenderWindowHeightPercentage
 
bool m_AlwaysVisible
 
bool m_Autoscale
 

Friends

class albaGizmoInterfaceTest
 

Detailed Description

Base class for operations and views gizmos.

This class defines the interface for gizmos that can be plugged into a view or into an operation

See also
Todo:

Definition at line 45 of file albaGizmoInterface.h.

Member Enumeration Documentation

◆ MODALITY

Set the gizmo working modality.

Enumerator
G_LOCAL 
G_GLOBAL 

Definition at line 118 of file albaGizmoInterface.h.

Constructor & Destructor Documentation

◆ albaGizmoInterface()

albaGizmoInterface::albaGizmoInterface ( )
protected

◆ ~albaGizmoInterface()

virtual albaGizmoInterface::~albaGizmoInterface ( )
protectedvirtual

Member Function Documentation

◆ SetName()

void albaGizmoInterface::SetName ( albaString  name)
inline

Set the gizmo name.

Definition at line 51 of file albaGizmoInterface.h.

◆ GetName()

albaString albaGizmoInterface::GetName ( )
inline

Get the gizmo name.

Definition at line 55 of file albaGizmoInterface.h.

◆ SetInput()

virtual void albaGizmoInterface::SetInput ( albaVME vme)
virtual

◆ GetInput()

albaVME * albaGizmoInterface::GetInput ( )

◆ SetMediator()

void albaGizmoInterface::SetMediator ( albaObserver mediator)
inline

Set the orchestrator object: albaGizmo's are used togetheter in more complex objects like albaGizmoRotate, albaGizmoTranslate ,... The master gizmo act as mediator (see GOF mediator pattern) between single albaVMEGizmos.

The optional mediator ivar holds a reference to the orchestrator if needed by the client. For example see albaGizmoTranslate which act as mediator between 3 albaGizmoTranslateAxis and 3 albaGizmoTranslatePlane each one wrapping several albaVMEGizmo's

Definition at line 71 of file albaGizmoInterface.h.

◆ GetMediator()

albaObserver * albaGizmoInterface::GetMediator ( )
inline

Return the meditor object.

Definition at line 74 of file albaGizmoInterface.h.

◆ SetAutoscale()

void albaGizmoInterface::SetAutoscale ( bool  autoscale)
inline

Enable/Disable gizmo autoscaling (default is false ie no autoscaling): if autoscale is enabled the gizmo will maintain a fixed dimension trying to follow camera zoom.

Use SetRenderWindowHeightPercentage to set gizmo / renderWindowHeight fixed ratio

Definition at line 78 of file albaGizmoInterface.h.

◆ GetAutoscale()

bool albaGizmoInterface::GetAutoscale ( )
inline

Get if gizmo autoscaling is enabled.

Definition at line 81 of file albaGizmoInterface.h.

◆ SetRenderWindowHeightPercentage()

void albaGizmoInterface::SetRenderWindowHeightPercentage ( double  percentage)
inline

Set the size of the gizmo when autoscale is enabled.

The size is expressed as gizmoHeight / renderWindowHeight. Max size is 1 (gizmo height equal to the render window one). This setting has no effect when autoscale is off

Definition at line 85 of file albaGizmoInterface.h.

◆ GetRenderWindowHeightPercentage()

double albaGizmoInterface::GetRenderWindowHeightPercentage ( )
inline

Definition at line 86 of file albaGizmoInterface.h.

◆ SetAlwaysVisible()

void albaGizmoInterface::SetAlwaysVisible ( bool  alwaysVisible)
inline

Put the gizmo on the superimposed layer ie make it always visible (default to false)

Definition at line 89 of file albaGizmoInterface.h.

◆ GetAlwaysVisible()

bool albaGizmoInterface::GetAlwaysVisible ( )
inline

Definition at line 90 of file albaGizmoInterface.h.

◆ SetListener()

void albaGizmoInterface::SetListener ( albaObserver listener)

Set the event receiver object.

◆ GetListener()

albaObserver * albaGizmoInterface::GetListener ( )

◆ OnEvent()

virtual void albaGizmoInterface::OnEvent ( albaEventBase alba_event)
virtual

◆ Show()

virtual void albaGizmoInterface::Show ( bool  show)
virtual

◆ SetModalityToLocal()

void albaGizmoInterface::SetModalityToLocal ( )

(default) Modality to be used when gizmo reference frame is the input vme abs pose: using this modality gizmo abs pose will change during the interaction.

See albaGizmoTranslate behavior with local (default) vs a different (global) refsys in albaOpTransformOld for a Local vs Global use case

◆ SetModalityToGlobal()

void albaGizmoInterface::SetModalityToGlobal ( )

Modality to be used when gizmo reference frame is different from input vme abs pose.

◆ GetModality()

int albaGizmoInterface::GetModality ( )

Return the working modality.

◆ SetAbsPose()

virtual void albaGizmoInterface::SetAbsPose ( albaMatrix absPose)
virtual

◆ GetAbsPose()

virtual albaMatrix * albaGizmoInterface::GetAbsPose ( )
virtual

◆ GetGui()

virtual albaGUI * albaGizmoInterface::GetGui ( )
virtual

◆ SendTransformMatrix()

void albaGizmoInterface::SendTransformMatrix ( albaMatrix matrix,
int  eventId,
long  arg 
)
protected

◆ OnEventGizmoGui()

virtual void albaGizmoInterface::OnEventGizmoGui ( albaEventBase alba_event)
inlineprotectedvirtual

Gizmo components events handling.

Reimplemented in albaGizmoCrossRotate, albaGizmoCrossTranslate, albaGizmoPathRuler, albaGizmoRotate, albaGizmoScale, and albaGizmoTranslate.

Definition at line 187 of file albaGizmoInterface.h.

◆ OnEventGizmoComponents()

virtual void albaGizmoInterface::OnEventGizmoComponents ( albaEventBase alba_event)
inlineprotectedvirtual

Gizmo components events handling.

Reimplemented in albaGizmoCrossRotate, albaGizmoCrossTranslate, albaGizmoPathRuler, albaGizmoROI, albaGizmoRotate, albaGizmoScale, and albaGizmoTranslate.

Definition at line 190 of file albaGizmoInterface.h.

Friends And Related Function Documentation

◆ albaGizmoInterfaceTest

friend class albaGizmoInterfaceTest
friend

Test friend.

Definition at line 193 of file albaGizmoInterface.h.

Member Data Documentation

◆ m_Mediator

albaObserver* albaGizmoInterface::m_Mediator
protected

Definition at line 152 of file albaGizmoInterface.h.

◆ m_Name

albaString albaGizmoInterface::m_Name
protected

Definition at line 154 of file albaGizmoInterface.h.

◆ m_InputVME

albaVME* albaGizmoInterface::m_InputVME
protected

The input vme.

Definition at line 158 of file albaGizmoInterface.h.

◆ m_Modality

int albaGizmoInterface::m_Modality
protected

The gizmo interaction mode.

Definition at line 162 of file albaGizmoInterface.h.

◆ m_Listener

albaObserver* albaGizmoInterface::m_Listener
protected

Register the event receiver object.

Definition at line 166 of file albaGizmoInterface.h.

◆ m_RefSysVME

albaVME* albaGizmoInterface::m_RefSysVME
protected

Vme to be used as reference system.

Definition at line 170 of file albaGizmoInterface.h.

◆ m_Visibility

bool albaGizmoInterface::m_Visibility
protected

Definition at line 173 of file albaGizmoInterface.h.

◆ m_RenderWindowHeightPercentage

double albaGizmoInterface::m_RenderWindowHeightPercentage
protected

gizmoHeight / RenderWindowHeight in autoscale mode

Definition at line 176 of file albaGizmoInterface.h.

◆ m_AlwaysVisible

bool albaGizmoInterface::m_AlwaysVisible
protected

Gimzo always visible ie on the superimposed layer.

Definition at line 179 of file albaGizmoInterface.h.

◆ m_Autoscale

bool albaGizmoInterface::m_Autoscale
protected

Gizmo autoscale.

Definition at line 182 of file albaGizmoInterface.h.


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