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

#include <albaGizmoPathRuler.h>

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

Public Member Functions

 albaGizmoPathRuler (albaVME *input, albaObserver *listener=NULL, int ticksNumber=1, int originTickId=0, double ticksHeigth=50, double ticksDistance=20, bool enableShorterTicks=true)
 
virtual ~albaGizmoPathRuler ()
 
void SetCurvilinearAbscissa (double s)
 
double GetCurvilinearAbscissa ()
 
double GetGizmoPathCurvilinearAbscissa (int index)
 
void SetConstraintPolyline (albaVME *constraintPolyline)
 
void SetTicksHeigth (double height)
 
double GetTicksHeigth ()
 
void SetTicksDistance (double distance)
 
double GetTicksDistance ()
 
int GetTicksNumber ()
 
void SetColor (double col[3])
 
void SetColor (int idGizmo, double col[3])
 
void SetColor (double abscissa, double col[3])
 
void HighlightExtremes (double col[3], int bound1, int bound2, int center, bool inside=false)
 
void HighlightExtremes (double col[3], double bound1, double bound2, double center, bool inside=false)
 
void SetInput (albaVME *vme)
 
void OnEvent (albaEventBase *alba_event)
 
void Show (bool show)
 
albaVMEGizmo * GetOutput (int tickId)
 
void SetAbsPose (albaMatrix *absPose)
 
albaMatrixGetAbsPose (int tickId)
 
albaGUIGetGui ()
 
void SetGizmoLabelsVisibility (bool value)
 
void ResetLabelsVisibility ()
 
void CustomIndexLabelVisibility (int index, int flag)
 
- 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 Member Functions

void BuildGizmos ()
 
void DestroyGizmos ()
 
void OnEventGizmoGui (albaEventBase *alba_event)
 
void OnEventGizmoComponents (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_TicksNumber
 
int m_OriginTickID
 
double m_TicksHeigth
 
double m_TicksDistance
 
double m_CurvilinearAbscissa
 
bool m_EnableShorterTicks
 
std::vector< albaGizmoPath * > m_GizmoPathVector
 
- 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
 

Additional Inherited Members

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

Detailed Description

A gizmo representing a ruler that can move on a polyline.

REFACTOR NOTE: this object should be expanded to support mouse interaction

usage example:

m_GizmoPathRuler = new albaGizmoPathRuler(m_ConstraintVME, this,10, 5, 30, 5); m_GizmoPathRuler->SetColor(red);

these should be removed since Show should be enough... anyway for the moment Show is not working as expected so... for (int i = 0;i < m_GizmoPathRuler->GetTicksNumber(); i++) { view->VmeShow(m_GizmoPathRuler->GetOutput(i), true); }

m_GizmoPathRuler->Show(true);

set the new constraint to the gizmo m_GizmoPathRuler->SetConstraintPolyline(m_ConstraintVME);

create the gizmo at s = 0 m_GizmoPathRuler->SetCurvilinearAbscissa(0);

Definition at line 59 of file albaGizmoPathRuler.h.

Constructor & Destructor Documentation

◆ albaGizmoPathRuler()

albaGizmoPathRuler::albaGizmoPathRuler ( albaVME input,
albaObserver listener = NULL,
int  ticksNumber = 1,
int  originTickId = 0,
double  ticksHeigth = 50,
double  ticksDistance = 20,
bool  enableShorterTicks = true 
)

◆ ~albaGizmoPathRuler()

virtual albaGizmoPathRuler::~albaGizmoPathRuler ( )
virtual

Member Function Documentation

◆ SetCurvilinearAbscissa()

void albaGizmoPathRuler::SetCurvilinearAbscissa ( double  s)

Set position of the origin tick along constraint polyline; other ticks will follow.

◆ GetCurvilinearAbscissa()

double albaGizmoPathRuler::GetCurvilinearAbscissa ( )
inline

Definition at line 69 of file albaGizmoPathRuler.h.

◆ GetGizmoPathCurvilinearAbscissa()

double albaGizmoPathRuler::GetGizmoPathCurvilinearAbscissa ( int  index)
inline

Definition at line 70 of file albaGizmoPathRuler.h.

◆ SetConstraintPolyline()

void albaGizmoPathRuler::SetConstraintPolyline ( albaVME constraintPolyline)

Set the constraint polyline: any VME can be provided but its output must be a albaVMEOutputPolyline.

◆ SetTicksHeigth()

void albaGizmoPathRuler::SetTicksHeigth ( double  height)

◆ GetTicksHeigth()

double albaGizmoPathRuler::GetTicksHeigth ( )
inline

Definition at line 84 of file albaGizmoPathRuler.h.

◆ SetTicksDistance()

void albaGizmoPathRuler::SetTicksDistance ( double  distance)

◆ GetTicksDistance()

double albaGizmoPathRuler::GetTicksDistance ( )
inline

Definition at line 87 of file albaGizmoPathRuler.h.

◆ GetTicksNumber()

int albaGizmoPathRuler::GetTicksNumber ( )
inline

Definition at line 89 of file albaGizmoPathRuler.h.

◆ SetColor() [1/3]

void albaGizmoPathRuler::SetColor ( double  col[3])

Set the gizmo color.

◆ SetColor() [2/3]

void albaGizmoPathRuler::SetColor ( int  idGizmo,
double  col[3] 
)

◆ SetColor() [3/3]

void albaGizmoPathRuler::SetColor ( double  abscissa,
double  col[3] 
)

◆ HighlightExtremes() [1/2]

void albaGizmoPathRuler::HighlightExtremes ( double  col[3],
int  bound1,
int  bound2,
int  center,
bool  inside = false 
)

◆ HighlightExtremes() [2/2]

void albaGizmoPathRuler::HighlightExtremes ( double  col[3],
double  bound1,
double  bound2,
double  center,
bool  inside = false 
)

◆ SetInput()

void albaGizmoPathRuler::SetInput ( albaVME vme)
virtual

This method is used to change the input: this VME is used only to reparent the gizmo to the root.

Reimplemented from albaGizmoInterface.

◆ OnEvent()

void albaGizmoPathRuler::OnEvent ( albaEventBase alba_event)
virtual

Events handling.

Reimplemented from albaGizmoInterface.

◆ Show()

void albaGizmoPathRuler::Show ( bool  show)
virtual

Show the gizmo.

Reimplemented from albaGizmoInterface.

◆ GetOutput()

albaVMEGizmo * albaGizmoPathRuler::GetOutput ( int  tickId)
inline

return the gizmo object

Definition at line 114 of file albaGizmoPathRuler.h.

◆ SetAbsPose()

void albaGizmoPathRuler::SetAbsPose ( albaMatrix absPose)
virtual

Set the gizmo pose; not yet implemented!!!

Reimplemented from albaGizmoInterface.

◆ GetAbsPose()

albaMatrix * albaGizmoPathRuler::GetAbsPose ( int  tickId)

get the abs pose for each tick

◆ GetGui()

albaGUI * albaGizmoPathRuler::GetGui ( )
inlinevirtual

not yet available...

Reimplemented from albaGizmoInterface.

Definition at line 124 of file albaGizmoPathRuler.h.

◆ SetGizmoLabelsVisibility()

void albaGizmoPathRuler::SetGizmoLabelsVisibility ( bool  value)

◆ ResetLabelsVisibility()

void albaGizmoPathRuler::ResetLabelsVisibility ( )

◆ CustomIndexLabelVisibility()

void albaGizmoPathRuler::CustomIndexLabelVisibility ( int  index,
int  flag 
)

◆ BuildGizmos()

void albaGizmoPathRuler::BuildGizmos ( )
protected

◆ DestroyGizmos()

void albaGizmoPathRuler::DestroyGizmos ( )
protected

◆ OnEventGizmoGui()

void albaGizmoPathRuler::OnEventGizmoGui ( albaEventBase alba_event)
protectedvirtual

Gizmo gui events handling; not yet implemented...

Reimplemented from albaGizmoInterface.

◆ OnEventGizmoComponents()

void albaGizmoPathRuler::OnEventGizmoComponents ( albaEventBase alba_event)
protectedvirtual

Gizmo components events handling.

Reimplemented from albaGizmoInterface.

Member Data Documentation

◆ m_TicksNumber

int albaGizmoPathRuler::m_TicksNumber
protected

Definition at line 137 of file albaGizmoPathRuler.h.

◆ m_OriginTickID

int albaGizmoPathRuler::m_OriginTickID
protected

Definition at line 138 of file albaGizmoPathRuler.h.

◆ m_TicksHeigth

double albaGizmoPathRuler::m_TicksHeigth
protected

Definition at line 139 of file albaGizmoPathRuler.h.

◆ m_TicksDistance

double albaGizmoPathRuler::m_TicksDistance
protected

Definition at line 140 of file albaGizmoPathRuler.h.

◆ m_CurvilinearAbscissa

double albaGizmoPathRuler::m_CurvilinearAbscissa
protected

Definition at line 141 of file albaGizmoPathRuler.h.

◆ m_EnableShorterTicks

bool albaGizmoPathRuler::m_EnableShorterTicks
protected

Definition at line 142 of file albaGizmoPathRuler.h.

◆ m_GizmoPathVector

std::vector<albaGizmoPath *> albaGizmoPathRuler::m_GizmoPathVector
protected

Definition at line 150 of file albaGizmoPathRuler.h.


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