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

#include <albaGizmoPath.h>

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

Public Types

enum  ID_TEXT_SIDE { ID_LEFT_TEXT_SIDE = 0 , ID_RIGTH_TEXT_SIDE }
 
enum  SentPoseID { ABS_POSE = albaInteractorGenericMouse::MOUSE_UP+1 }
 
- Public Types inherited from albaGizmoInterface
enum  MODALITY { G_LOCAL = 0 , G_GLOBAL }
 

Public Member Functions

 albaGizmoPath (albaVME *inputVme, albaObserver *Listener=NULL, const char *name="GizmoPath", int textVisibility=0)
 
virtual ~albaGizmoPath ()
 
void SetCurvilinearAbscissa (double s)
 
double GetCurvilinearAbscissa ()
 
void SetConstraintPolyline (albaVME *constraintPolyline)
 
void Show (bool show)
 
void SetInput (albaVME *vme)
 
albaVMEGizmo * GetOutput ()
 
albaMatrixGetAbsPose ()
 
void SetColor (double col[3])
 
void SetLineLength (double lineLength)
 
void SetConstraintModalityToSnapVertex ()
 
void SetConstraintModalityToFree ()
 
void SetConstraintModalityToBounds ()
 
int GetConstraintModality ()
 
void OnEvent (albaEventBase *alba_event)
 
void SetSideTextPosition (bool leftRight=ID_LEFT_TEXT_SIDE)
 
bool GetSideTextPosition ()
 
- 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  CONSTRAINT_MODALITY_ID { FREE = 0 , BOUNDS , SNAP_VERTEX , CONSTRAINT_MODALITY_NUMBERS }
 

Protected Member Functions

void CreateVMEGizmo ()
 
void DestroyVMEGizmo ()
 
void SetVersor (int axis, double versor[3], albaMatrix &matrix)
 
void Constructor (albaVME *imputVme, albaObserver *listener, const char *name)
 
void Destructor ()
 
void CreateInteractor ()
 
void FindGizmoAbsPose (double s)
 
void FindBoundaryVerticesID (double s, int &idMin, int &idMax, double &sFromIdMin)
 
void ComputeLocalPointPositionBetweenVertices (double distP0s, int idP0, int idP1, double pOut[3])
 
void ComputeLocalNormal (int idP0, int idP1, double viewUp[3], double normal[3])
 
- 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)
 

Static Protected Member Functions

static void BuildVector (double p0[3], double p1[3], double vOut[3])
 
static void BuildVector (double coeff, const double *inVector, double *outVector)
 
static void AddVectors (double p0[3], double p1[3], double sum[3])
 

Protected Attributes

albaString m_Name
 
albaVMEGizmo * m_VmeGizmoPath
 
albaInteractorCompositorMousem_GizmoInteractor
 
albaInteractorGenericMousem_LeftMouseInteractor
 
albaGUIm_GizmoGui
 
albaVMEm_ConstraintPolyline
 
vtkLineSource * m_LineSource
 
double m_CurvilinearAbscissa
 
int m_ConstraintModality
 
int m_TextVisibility
 
bool m_TextSidePosition
 
- 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 constrained to arbitrary path...

to use this object instanciate it in your client and listen for ID_TRANSFORM events with albaGizmoPath::ABS_POSE argument;

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

Definition at line 45 of file albaGizmoPath.h.

Member Enumeration Documentation

◆ ID_TEXT_SIDE

Enumerator
ID_LEFT_TEXT_SIDE 
ID_RIGTH_TEXT_SIDE 

Definition at line 53 of file albaGizmoPath.h.

◆ SentPoseID

Enumerator
ABS_POSE 

Definition at line 59 of file albaGizmoPath.h.

◆ CONSTRAINT_MODALITY_ID

Enumerator
FREE 
BOUNDS 
SNAP_VERTEX 
CONSTRAINT_MODALITY_NUMBERS 

Definition at line 150 of file albaGizmoPath.h.

Constructor & Destructor Documentation

◆ albaGizmoPath()

albaGizmoPath::albaGizmoPath ( albaVME inputVme,
albaObserver Listener = NULL,
const char *  name = "GizmoPath",
int  textVisibility = 0 
)

◆ ~albaGizmoPath()

virtual albaGizmoPath::~albaGizmoPath ( )
virtual

Member Function Documentation

◆ SetCurvilinearAbscissa()

void albaGizmoPath::SetCurvilinearAbscissa ( double  s)

Set position along constraint polyline.

◆ GetCurvilinearAbscissa()

double albaGizmoPath::GetCurvilinearAbscissa ( )

◆ SetConstraintPolyline()

void albaGizmoPath::SetConstraintPolyline ( albaVME constraintPolyline)
inline

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

Definition at line 67 of file albaGizmoPath.h.

◆ Show()

void albaGizmoPath::Show ( bool  show)
virtual

Show/Hide the gizmos using actor visibility instead of pipe creation/destruction: this is used for faster rendering.

Reimplemented from albaGizmoInterface.

◆ SetInput()

void albaGizmoPath::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.

◆ GetOutput()

albaVMEGizmo * albaGizmoPath::GetOutput ( )
inline

return the gizmo object

Definition at line 81 of file albaGizmoPath.h.

◆ GetAbsPose()

albaMatrix * albaGizmoPath::GetAbsPose ( )
virtual

Get the gizmo abs pose.

Reimplemented from albaGizmoInterface.

◆ SetColor()

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

Set the gizmo color.

◆ SetLineLength()

void albaGizmoPath::SetLineLength ( double  lineLength)

set the length of the gizmo default representation ie a 2d line REFACTOR NOTE: graphical representation should be defined by subclasses...

◆ SetConstraintModalityToSnapVertex()

void albaGizmoPath::SetConstraintModalityToSnapVertex ( )

Set/Get the gizmo moving modality, default is free.

◆ SetConstraintModalityToFree()

void albaGizmoPath::SetConstraintModalityToFree ( )

◆ SetConstraintModalityToBounds()

void albaGizmoPath::SetConstraintModalityToBounds ( )

◆ GetConstraintModality()

int albaGizmoPath::GetConstraintModality ( )
inline

Definition at line 97 of file albaGizmoPath.h.

◆ OnEvent()

void albaGizmoPath::OnEvent ( albaEventBase alba_event)
virtual

Events handling method.

Reimplemented from albaGizmoInterface.

◆ SetSideTextPosition()

void albaGizmoPath::SetSideTextPosition ( bool  leftRight = ID_LEFT_TEXT_SIDE)
inline

Definition at line 102 of file albaGizmoPath.h.

◆ GetSideTextPosition()

bool albaGizmoPath::GetSideTextPosition ( )
inline

Definition at line 103 of file albaGizmoPath.h.

◆ CreateVMEGizmo()

void albaGizmoPath::CreateVMEGizmo ( )
protected

◆ DestroyVMEGizmo()

void albaGizmoPath::DestroyVMEGizmo ( )
protected

◆ SetVersor()

void albaGizmoPath::SetVersor ( int  axis,
double  versor[3],
albaMatrix matrix 
)
protected

◆ BuildVector() [1/2]

static void albaGizmoPath::BuildVector ( double  p0[3],
double  p1[3],
double  vOut[3] 
)
staticprotected

◆ BuildVector() [2/2]

static void albaGizmoPath::BuildVector ( double  coeff,
const double *  inVector,
double *  outVector 
)
staticprotected

◆ AddVectors()

static void albaGizmoPath::AddVectors ( double  p0[3],
double  p1[3],
double  sum[3] 
)
staticprotected

◆ Constructor()

void albaGizmoPath::Constructor ( albaVME imputVme,
albaObserver listener,
const char *  name 
)
protected

◆ Destructor()

void albaGizmoPath::Destructor ( )
protected

◆ CreateInteractor()

void albaGizmoPath::CreateInteractor ( )
protected

◆ FindGizmoAbsPose()

void albaGizmoPath::FindGizmoAbsPose ( double  s)
protected

◆ FindBoundaryVerticesID()

void albaGizmoPath::FindBoundaryVerticesID ( double  s,
int &  idMin,
int &  idMax,
double &  sFromIdMin 
)
protected

◆ ComputeLocalPointPositionBetweenVertices()

void albaGizmoPath::ComputeLocalPointPositionBetweenVertices ( double  distP0s,
int  idP0,
int  idP1,
double  pOut[3] 
)
protected

◆ ComputeLocalNormal()

void albaGizmoPath::ComputeLocalNormal ( int  idP0,
int  idP1,
double  viewUp[3],
double  normal[3] 
)
protected

Member Data Documentation

◆ m_Name

albaString albaGizmoPath::m_Name
protected

Definition at line 127 of file albaGizmoPath.h.

◆ m_VmeGizmoPath

albaVMEGizmo* albaGizmoPath::m_VmeGizmoPath
protected

Definition at line 128 of file albaGizmoPath.h.

◆ m_GizmoInteractor

albaInteractorCompositorMouse* albaGizmoPath::m_GizmoInteractor
protected

Definition at line 129 of file albaGizmoPath.h.

◆ m_LeftMouseInteractor

albaInteractorGenericMouse* albaGizmoPath::m_LeftMouseInteractor
protected

Definition at line 130 of file albaGizmoPath.h.

◆ m_GizmoGui

albaGUI* albaGizmoPath::m_GizmoGui
protected

Definition at line 131 of file albaGizmoPath.h.

◆ m_ConstraintPolyline

albaVME* albaGizmoPath::m_ConstraintPolyline
protected

Definition at line 134 of file albaGizmoPath.h.

◆ m_LineSource

vtkLineSource* albaGizmoPath::m_LineSource
protected

Definition at line 136 of file albaGizmoPath.h.

◆ m_CurvilinearAbscissa

double albaGizmoPath::m_CurvilinearAbscissa
protected

Definition at line 144 of file albaGizmoPath.h.

◆ m_ConstraintModality

int albaGizmoPath::m_ConstraintModality
protected

Definition at line 145 of file albaGizmoPath.h.

◆ m_TextVisibility

int albaGizmoPath::m_TextVisibility
protected

Definition at line 147 of file albaGizmoPath.h.

◆ m_TextSidePosition

bool albaGizmoPath::m_TextSidePosition
protected

Definition at line 148 of file albaGizmoPath.h.


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