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

#include <albaGizmoCrossTranslate.h>

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

Public Types

enum  NORMAL { X = 0 , Y , Z }
 
- Public Types inherited from albaGizmoInterface
enum  MODALITY { G_LOCAL = 0 , G_GLOBAL }
 

Public Member Functions

 albaGizmoCrossTranslate (albaVME *input, albaObserver *listener=NULL, bool BuildGUI=true, int normal=X)
 
virtual ~albaGizmoCrossTranslate ()
 
void SetInput (albaVME *vme)
 
void SetRenderWindowHeightPercentage (double percentage)
 
void SetAutoscale (bool autoscale)
 
void SetAlwaysVisible (bool alwaysVisible)
 
void ConstrainTranslationToInputVMEBoundsOn ()
 
void ConstrainTranslationToInputVMEBoundsOff ()
 
void OnEvent (albaEventBase *alba_event)
 
void Show (bool show)
 
void SetAbsPose (albaMatrix *absPose, albaTimeStamp ts=-1)
 
albaMatrixGetAbsPose ()
 
void SetRefSys (albaVME *refSys)
 
albaVMEGetRefSys ()
 
albaGUIGetGui ()
 
void SetConstraintModality (int constrainModality)
 
int GetConstraintModality ()
 
void SetStep (double step)
 
int GetStep ()
 
albaGizmoCrossTranslateAxisGetGTUpDown ()
 
albaGizmoCrossTranslateAxisGetGTLeftRight ()
 
albaGizmoCrossTranslatePlaneGetGTPlane () const
 
- Public Member Functions inherited from albaGizmoInterface
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 Types

enum  TRANSLATE_ON_PLANE { XNORMAL = 0 , YNORMAL , ZNORMAL }
 
enum  ACTIVE_COMPONENT { NONE = -1 , TRANSLATE_UP_DOWN = 0 , TRANSLATE_LEFT_RIGHT = 1 , TRANSLATE_ON_PLANE = 3 }
 

Protected Member Functions

void OnEventGizmoGui (albaEventBase *alba_event)
 
void OnEventGizmoComponents (albaEventBase *alba_event)
 
void Highlight (int component)
 
void SendTransformMatrixFromGui (albaEventBase *alba_event)
 
- Protected Member Functions inherited from albaGizmoInterface
 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

int m_Normal
 
bool m_ConstrainTranslationToInputVMEBounds
 
albaGUIGizmoTranslatem_GuiGizmoTranslate
 
albaGizmoCrossTranslateAxism_GTUpDown
 
albaGizmoCrossTranslateAxism_GTLeftRight
 
albaGizmoCrossTranslatePlanem_GTPlane
 
int m_ActiveGizmoComponent
 
albaMatrixm_PivotPose
 
bool m_BuildGUI
 
int m_ConstraintModality
 
int m_Step
 
- Protected Attributes inherited from albaGizmoInterface
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
 

Detailed Description

Gizmo used to perform constrained translation.

Definition at line 52 of file albaGizmoCrossTranslate.h.

Member Enumeration Documentation

◆ NORMAL

Enumerator

Definition at line 57 of file albaGizmoCrossTranslate.h.

◆ TRANSLATE_ON_PLANE

gizmo components enum

Enumerator
XNORMAL 
YNORMAL 
ZNORMAL 

Definition at line 143 of file albaGizmoCrossTranslate.h.

◆ ACTIVE_COMPONENT

gizmo components enum

 up

 o o
  O
 \_/

left right

down

World Coordinates

Z/ \ | .—> X Y

Enumerator
NONE 
TRANSLATE_UP_DOWN 
TRANSLATE_LEFT_RIGHT 
TRANSLATE_ON_PLANE 

Definition at line 169 of file albaGizmoCrossTranslate.h.

Constructor & Destructor Documentation

◆ albaGizmoCrossTranslate()

albaGizmoCrossTranslate::albaGizmoCrossTranslate ( albaVME input,
albaObserver listener = NULL,
bool  BuildGUI = true,
int  normal = X 
)

◆ ~albaGizmoCrossTranslate()

virtual albaGizmoCrossTranslate::~albaGizmoCrossTranslate ( )
virtual

Member Function Documentation

◆ SetInput()

void albaGizmoCrossTranslate::SetInput ( albaVME vme)
virtual

Set input vme for the gizmo.

Reimplemented from albaGizmoInterface.

◆ SetRenderWindowHeightPercentage()

void albaGizmoCrossTranslate::SetRenderWindowHeightPercentage ( double  percentage)

Superclass override.

◆ SetAutoscale()

void albaGizmoCrossTranslate::SetAutoscale ( bool  autoscale)

Superclass override.

◆ SetAlwaysVisible()

void albaGizmoCrossTranslate::SetAlwaysVisible ( bool  alwaysVisible)

Superclass override.

◆ ConstrainTranslationToInputVMEBoundsOn()

void albaGizmoCrossTranslate::ConstrainTranslationToInputVMEBoundsOn ( )
inline

Constrain translation to Input VME bounds (default to true): the gizmo will move inside the input volume only

Definition at line 76 of file albaGizmoCrossTranslate.h.

References m_ConstrainTranslationToInputVMEBounds.

◆ ConstrainTranslationToInputVMEBoundsOff()

void albaGizmoCrossTranslate::ConstrainTranslationToInputVMEBoundsOff ( )
inline

Definition at line 77 of file albaGizmoCrossTranslate.h.

References m_ConstrainTranslationToInputVMEBounds.

◆ OnEvent()

void albaGizmoCrossTranslate::OnEvent ( albaEventBase alba_event)
virtual

Events handling.

Reimplemented from albaGizmoInterface.

◆ Show()

void albaGizmoCrossTranslate::Show ( bool  show)
virtual

Show the gizmo.

Reimplemented from albaGizmoInterface.

◆ SetAbsPose()

void albaGizmoCrossTranslate::SetAbsPose ( albaMatrix absPose,
albaTimeStamp  ts = -1 
)

Set/Get the gizmo pose: works by setting the pose to all gizmo subcomponents.

◆ GetAbsPose()

albaMatrix * albaGizmoCrossTranslate::GetAbsPose ( )
virtual

Get the gizmo abs pose.

Reimplemented from albaGizmoInterface.

◆ SetRefSys()

void albaGizmoCrossTranslate::SetRefSys ( albaVME refSys)

Set the vme to be used as reference system, the vme is referenced; default ref sys is vme abs matrix.

◆ GetRefSys()

albaVME * albaGizmoCrossTranslate::GetRefSys ( )

◆ GetGui()

albaGUI * albaGizmoCrossTranslate::GetGui ( )
inlinevirtual

Return gui owned by the gizmo.

Reimplemented from albaGizmoInterface.

Definition at line 108 of file albaGizmoCrossTranslate.h.

References albaGUIGizmoInterface::GetGui(), and m_GuiGizmoTranslate.

Here is the call graph for this function:

◆ SetConstraintModality()

void albaGizmoCrossTranslate::SetConstraintModality ( int  constrainModality)

Allowed constraint modality are: LOCK, FREE, BOUNDS, SNAP_STEP, SNAP_ARRAY defined in albaInteractorConstraint.

◆ GetConstraintModality()

int albaGizmoCrossTranslate::GetConstraintModality ( )

◆ SetStep()

void albaGizmoCrossTranslate::SetStep ( double  step)

Set the step value for snap step constraint type for the given axis.

◆ GetStep()

int albaGizmoCrossTranslate::GetStep ( )

◆ GetGTUpDown()

albaGizmoCrossTranslateAxis * albaGizmoCrossTranslate::GetGTUpDown ( )
inline

Definition at line 120 of file albaGizmoCrossTranslate.h.

References m_GTUpDown.

◆ GetGTLeftRight()

albaGizmoCrossTranslateAxis * albaGizmoCrossTranslate::GetGTLeftRight ( )
inline

Definition at line 121 of file albaGizmoCrossTranslate.h.

References m_GTLeftRight.

◆ GetGTPlane()

albaGizmoCrossTranslatePlane * albaGizmoCrossTranslate::GetGTPlane ( ) const
inline

Definition at line 122 of file albaGizmoCrossTranslate.h.

References m_GTPlane.

◆ OnEventGizmoGui()

void albaGizmoCrossTranslate::OnEventGizmoGui ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

◆ OnEventGizmoComponents()

void albaGizmoCrossTranslate::OnEventGizmoComponents ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

◆ Highlight()

void albaGizmoCrossTranslate::Highlight ( int  component)
protected

Highlight one component and dehighlight other components.

◆ SendTransformMatrixFromGui()

void albaGizmoCrossTranslate::SendTransformMatrixFromGui ( albaEventBase alba_event)
protected

Send matrix to postmultiply to listener.

Member Data Documentation

◆ m_Normal

int albaGizmoCrossTranslate::m_Normal
protected

Normal to the cross gizmo.

Definition at line 127 of file albaGizmoCrossTranslate.h.

◆ m_ConstrainTranslationToInputVMEBounds

bool albaGizmoCrossTranslate::m_ConstrainTranslationToInputVMEBounds
protected

Register if translation is constrained to input vme bounds.

Definition at line 130 of file albaGizmoCrossTranslate.h.

Referenced by ConstrainTranslationToInputVMEBoundsOff(), and ConstrainTranslationToInputVMEBoundsOn().

◆ m_GuiGizmoTranslate

albaGUIGizmoTranslate* albaGizmoCrossTranslate::m_GuiGizmoTranslate
protected

Gizmo gui.

Definition at line 133 of file albaGizmoCrossTranslate.h.

Referenced by GetGui().

◆ m_GTUpDown

albaGizmoCrossTranslateAxis* albaGizmoCrossTranslate::m_GTUpDown
protected

Array holding the three gizmo that performs translation on a vector.

Definition at line 176 of file albaGizmoCrossTranslate.h.

Referenced by GetGTUpDown().

◆ m_GTLeftRight

albaGizmoCrossTranslateAxis* albaGizmoCrossTranslate::m_GTLeftRight
protected

Definition at line 177 of file albaGizmoCrossTranslate.h.

Referenced by GetGTLeftRight().

◆ m_GTPlane

albaGizmoCrossTranslatePlane* albaGizmoCrossTranslate::m_GTPlane
protected

Array holding the three gizmo that performs translation on a plane.

Definition at line 179 of file albaGizmoCrossTranslate.h.

Referenced by GetGTPlane().

◆ m_ActiveGizmoComponent

int albaGizmoCrossTranslate::m_ActiveGizmoComponent
protected

Register the active gizmo component at MOUSE_DOWN.

Definition at line 183 of file albaGizmoCrossTranslate.h.

◆ m_PivotPose

albaMatrix* albaGizmoCrossTranslate::m_PivotPose
protected

Pivot point position;.

Definition at line 187 of file albaGizmoCrossTranslate.h.

◆ m_BuildGUI

bool albaGizmoCrossTranslate::m_BuildGUI
protected

Build Gizmo GUI.

Definition at line 193 of file albaGizmoCrossTranslate.h.

◆ m_ConstraintModality

int albaGizmoCrossTranslate::m_ConstraintModality
protected

register axis constraint modality

Definition at line 196 of file albaGizmoCrossTranslate.h.

◆ m_Step

int albaGizmoCrossTranslate::m_Step
protected

register step on axes

Definition at line 199 of file albaGizmoCrossTranslate.h.


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