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

#include <albaGizmoScale.h>

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

Public Member Functions

 albaGizmoScale (albaVME *input, albaObserver *listener=NULL, bool buildGUI=true)
 
virtual ~albaGizmoScale ()
 
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, bool showIso)
 
void SetAbsPose (albaMatrix *absPose, albaTimeStamp ts=-1)
 
albaMatrixGetAbsPose ()
 
void SetRefSys (albaVME *refSys)
 
albaVMEGetRefSys ()
 
albaGUIGetGui ()
 
bool GetApplyScaleToVME () const
 
void SetApplyScaleToVME (bool val)
 
- 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 ,
  ISOTROPIC
}
 

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

albaGUIGizmoScalem_GuiGizmoScale
 
albaGizmoScaleAxism_GSAxis [3]
 
albaGizmoScaleIsotropicm_GSIsotropic
 
int m_ActiveGizmoComponent
 
- 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 albaGizmoScaleTest
 

Additional Inherited Members

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

Detailed Description

Gizmo used to perform constrained scaling along the x, yz axis or the xy, xz, yz plane.

This class create a scaling gizmo composed of:

3 albaGizmoScaleAxis

 z                                 
 ^                      ^              
 |                      | 
 |                      |               
 |                  =   |                
 |                      |               
 x--------> y            -------->    

3 x albaGizmoScaleAxis 1 x albaGizmoScale (single axis scaling
constrain)

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.

See also
albaGizmoScaleAxis

Definition at line 67 of file albaGizmoScale.h.

Member Enumeration Documentation

◆ AXIS

enum albaGizmoScale::AXIS
protected

gizmo components enum

Enumerator

Definition at line 137 of file albaGizmoScale.h.

◆ ACTIVE_COMPONENT

Enumerator
NONE 
X_AXIS 
Y_AXIS 
Z_AXIS 
ISOTROPIC 

Definition at line 138 of file albaGizmoScale.h.

Constructor & Destructor Documentation

◆ albaGizmoScale()

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

◆ ~albaGizmoScale()

virtual albaGizmoScale::~albaGizmoScale ( )
virtual

Member Function Documentation

◆ SetInput()

void albaGizmoScale::SetInput ( albaVME vme)
virtual

Set input vme for the gizmo.

Reimplemented from albaGizmoInterface.

◆ SetRenderWindowHeightPercentage()

void albaGizmoScale::SetRenderWindowHeightPercentage ( double  percentage)

Superclass override.

◆ SetAutoscale()

void albaGizmoScale::SetAutoscale ( bool  autoscale)

Superclass override.

◆ SetAlwaysVisible()

void albaGizmoScale::SetAlwaysVisible ( bool  alwaysVisible)

Superclass override.

◆ OnEvent()

void albaGizmoScale::OnEvent ( albaEventBase alba_event)
virtual

Events handling.

Reimplemented from albaGizmoInterface.

◆ Show() [1/2]

void albaGizmoScale::Show ( bool  show)
virtual

Show the gizmo.

Reimplemented from albaGizmoInterface.

◆ Show() [2/2]

void albaGizmoScale::Show ( bool  showX,
bool  showY,
bool  showZ,
bool  showIso 
)

◆ SetAbsPose()

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

Set the gizmo pose.

◆ GetAbsPose()

albaMatrix * albaGizmoScale::GetAbsPose ( )
virtual

Get the gizmo abs pose.

Reimplemented from albaGizmoInterface.

◆ SetRefSys()

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

◆ GetGui()

albaGUI * albaGizmoScale::GetGui ( )
inlinevirtual

Return gui owned by the gizmo.

Reimplemented from albaGizmoInterface.

Definition at line 120 of file albaGizmoScale.h.

◆ GetApplyScaleToVME()

bool albaGizmoScale::GetApplyScaleToVME ( ) const
inline

Definition at line 122 of file albaGizmoScale.h.

◆ SetApplyScaleToVME()

void albaGizmoScale::SetApplyScaleToVME ( bool  val)
inline

Definition at line 123 of file albaGizmoScale.h.

◆ OnEventGizmoGui()

void albaGizmoScale::OnEventGizmoGui ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

◆ OnEventGizmoComponents()

void albaGizmoScale::OnEventGizmoComponents ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

◆ Highlight()

void albaGizmoScale::Highlight ( int  component)
protected

Highlight one component and dehighlight other components.

◆ SendTransformMatrixFromGui()

void albaGizmoScale::SendTransformMatrixFromGui ( albaEventBase alba_event)
protected

Send matrix to postmultiply to listener.

Friends And Related Function Documentation

◆ albaGizmoScaleTest

friend class albaGizmoScaleTest
friend

test friend

Definition at line 198 of file albaGizmoScale.h.

Member Data Documentation

◆ m_GuiGizmoScale

albaGUIGizmoScale* albaGizmoScale::m_GuiGizmoScale
protected

Definition at line 127 of file albaGizmoScale.h.

◆ m_GSAxis

albaGizmoScaleAxis* albaGizmoScale::m_GSAxis[3]
protected

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

Definition at line 145 of file albaGizmoScale.h.

◆ m_GSIsotropic

albaGizmoScaleIsotropic* albaGizmoScale::m_GSIsotropic
protected

Definition at line 147 of file albaGizmoScale.h.

◆ m_ActiveGizmoComponent

int albaGizmoScale::m_ActiveGizmoComponent
protected

Register the active gizmo component at MOUSE_DOWN.

Definition at line 151 of file albaGizmoScale.h.


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