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

#include <albaGizmoRotate.h>

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

Public Member Functions

 albaGizmoRotate (albaVME *input, albaObserver *listener=NULL, bool buildGUI=true)
 
virtual ~albaGizmoRotate ()
 
void SetInput (albaVME *vme)
 
void SetRenderWindowHeightPercentage (double percentage)
 
void SetAutoscale (bool autoscale)
 
void SetAlwaysVisible (bool alwaysVisible)
 
void OnEvent (albaEventBase *alba_event)
 
void Show (bool show)
 
void Show (bool showX, bool showY, bool showZ)
 
void SetAbsPose (albaMatrix *absPose, bool applyPoseToFans=true)
 
albaMatrixGetAbsPose ()
 
albaInteractorGenericInterfaceGetInteractor (int axis)
 
void SetRefSys (albaVME *refSys)
 
albaVMEGetRefSys ()
 
albaGUIGetGui ()
 
void SetCircleFanRadius (double radius)
 
double GetCircleFanRadius ()
 
- 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  AXIS { X = 0 , Y , Z }
 
enum  ACTIVE_COMPONENT {
  NONE = -1 , X_AXIS = 0 , Y_AXIS , Z_AXIS ,
  NUM_COMPONENTS
}
 

Protected Member Functions

void SendTransformMatrixFromGui (albaEventBase *alba_event)
 
void OnEventGizmoGui (albaEventBase *alba_event)
 
void OnEventGizmoComponents (albaEventBase *alba_event)
 
void Highlight (int component)
 
- 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

albaGUIGizmoRotatem_GuiGizmoRotate
 
albaGizmoRotateCirclem_GRCircle [3]
 
albaGizmoRotateFanm_GRFan [3]
 
bool m_BuildGUI
 
double m_CircleFanRadius
 
- 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
 

Friends

class albaGizmoRotateTest
 

Additional Inherited Members

- Public Types inherited from albaGizmoInterface
enum  MODALITY { G_LOCAL = 0 , G_GLOBAL }
 

Detailed Description

Gizmo used to perform constrained rotation around an axis.

This class create a rotation gizmo composed of:

3 albaGizmoRotateCircle 3 albaGizmoRotateFan

 y                             y
 ^                             ^  
 |                             |  
 | ___                         |     /|
 |     \              +        |   /  |
 |      |                      | /    | 
 z--------> x                  z--------->x

3 x albaGizmoRotateCircle 3 x albaGizmoRotateFan (single axis rotation (visual feedback for rotation angle on one axis) constrain)

 ^  
 |-----
 |     /\

= | / \
| / |
-------—>

1 x albaGizmoRotate

and forward pose matrixes to the listener operation. This object works by creating smaller components that are parented to the vme tree root ie works in global coordinates. in order to use it in your client create an instance of it and concatenate in post multiply modality matrix that this object is sending to the the vme you want to move.

Definition at line 74 of file albaGizmoRotate.h.

Member Enumeration Documentation

◆ AXIS

enum albaGizmoRotate::AXIS
protected

gizmo components enum

Enumerator

Definition at line 149 of file albaGizmoRotate.h.

◆ ACTIVE_COMPONENT

Enumerator
NONE 
X_AXIS 
Y_AXIS 
Z_AXIS 
NUM_COMPONENTS 

Definition at line 151 of file albaGizmoRotate.h.

Constructor & Destructor Documentation

◆ albaGizmoRotate()

albaGizmoRotate::albaGizmoRotate ( albaVME input,
albaObserver listener = NULL,
bool  buildGUI = true 
)

◆ ~albaGizmoRotate()

virtual albaGizmoRotate::~albaGizmoRotate ( )
virtual

Member Function Documentation

◆ SetInput()

void albaGizmoRotate::SetInput ( albaVME vme)
virtual

Set input vme for the gizmo.

Reimplemented from albaGizmoInterface.

◆ SetRenderWindowHeightPercentage()

void albaGizmoRotate::SetRenderWindowHeightPercentage ( double  percentage)

Superclass override.

◆ SetAutoscale()

void albaGizmoRotate::SetAutoscale ( bool  autoscale)

Superclass override.

◆ SetAlwaysVisible()

void albaGizmoRotate::SetAlwaysVisible ( bool  alwaysVisible)

Superclass override.

◆ OnEvent()

void albaGizmoRotate::OnEvent ( albaEventBase alba_event)
virtual

Events handling.

Reimplemented from albaGizmoInterface.

◆ Show() [1/2]

void albaGizmoRotate::Show ( bool  show)
virtual

Show the gizmo.

Reimplemented from albaGizmoInterface.

◆ Show() [2/2]

void albaGizmoRotate::Show ( bool  showX,
bool  showY,
bool  showZ 
)

◆ SetAbsPose()

void albaGizmoRotate::SetAbsPose ( albaMatrix absPose,
bool  applyPoseToFans = true 
)

Set the gizmo pose.

◆ GetAbsPose()

albaMatrix * albaGizmoRotate::GetAbsPose ( )
virtual

Get the gizmo abs pose.

Reimplemented from albaGizmoInterface.

◆ GetInteractor()

albaInteractorGenericInterface * albaGizmoRotate::GetInteractor ( int  axis)

Get the Interactor asscociated to each axis.

◆ SetRefSys()

void albaGizmoRotate::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 * albaGizmoRotate::GetRefSys ( )

◆ GetGui()

albaGUI * albaGizmoRotate::GetGui ( )
inlinevirtual

Return gui owned by the gizmo.

Reimplemented from albaGizmoInterface.

Definition at line 129 of file albaGizmoRotate.h.

◆ SetCircleFanRadius()

void albaGizmoRotate::SetCircleFanRadius ( double  radius)

Modify radius of circles.

◆ GetCircleFanRadius()

double albaGizmoRotate::GetCircleFanRadius ( )

◆ SendTransformMatrixFromGui()

void albaGizmoRotate::SendTransformMatrixFromGui ( albaEventBase alba_event)
protected

Send matrix to postmultiply to listener.

◆ OnEventGizmoGui()

void albaGizmoRotate::OnEventGizmoGui ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

◆ OnEventGizmoComponents()

void albaGizmoRotate::OnEventGizmoComponents ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

◆ Highlight()

void albaGizmoRotate::Highlight ( int  component)
protected

Highlight one component and dehighlight other components.

Friends And Related Function Documentation

◆ albaGizmoRotateTest

friend class albaGizmoRotateTest
friend

test friend

Definition at line 167 of file albaGizmoRotate.h.

Member Data Documentation

◆ m_GuiGizmoRotate

albaGUIGizmoRotate* albaGizmoRotate::m_GuiGizmoRotate
protected

Definition at line 136 of file albaGizmoRotate.h.

◆ m_GRCircle

albaGizmoRotateCircle* albaGizmoRotate::m_GRCircle[3]
protected

Array holding the three gizmo that performs rotation.

Definition at line 158 of file albaGizmoRotate.h.

◆ m_GRFan

albaGizmoRotateFan* albaGizmoRotate::m_GRFan[3]
protected

The rotating fan gizmo.

Definition at line 161 of file albaGizmoRotate.h.

◆ m_BuildGUI

bool albaGizmoRotate::m_BuildGUI
protected

Build Gizmo GUI.

Definition at line 164 of file albaGizmoRotate.h.

◆ m_CircleFanRadius

double albaGizmoRotate::m_CircleFanRadius
protected

Definition at line 169 of file albaGizmoRotate.h.


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