ALBA
albaGizmoCrossTranslate.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGizmoCrossTranslate
5 Authors: Stefano Perticoni
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16//======================== WORK IN PROGRESS !!!!! ========================
17//======================== WORK IN PROGRESS !!!!! ========================
18//======================== WORK IN PROGRESS !!!!! ========================
19//======================== WORK IN PROGRESS !!!!! ========================
20//======================== WORK IN PROGRESS !!!!! ========================
21//======================== WORK IN PROGRESS !!!!! ========================
22//======================== WORK IN PROGRESS !!!!! ========================
23//======================== WORK IN PROGRESS !!!!! ========================
24//======================== WORK IN PROGRESS !!!!! ========================
25
26
27
28
29#ifndef __albaGizmoCrossTranslate_H__
30#define __albaGizmoCrossTranslate_H__
31
32//----------------------------------------------------------------------------
33// Include:
34//----------------------------------------------------------------------------
35#include "albaEvent.h"
36#include "albaGizmoInterface.h"
38
39//----------------------------------------------------------------------------
40// forward references :
41//----------------------------------------------------------------------------
44class albaMatrix;
45
53{
54public:
55
56
57 enum NORMAL {X = 0, Y, Z};
58
59 albaGizmoCrossTranslate(albaVME *input, albaObserver* listener = NULL, bool BuildGUI = true, int normal = X);
61
64 void SetInput(albaVME *vme);
65
67 void SetRenderWindowHeightPercentage(double percentage);
68
70 void SetAutoscale(bool autoscale);
71
73 void SetAlwaysVisible(bool alwaysVisible);
74
78
79 //----------------------------------------------------------------------------
80 // events handling
81 //----------------------------------------------------------------------------
82
85 void OnEvent(albaEventBase *alba_event);
86
87 //----------------------------------------------------------------------------
88 // show
89 //----------------------------------------------------------------------------
90
93 void Show(bool show);
94
97 void SetAbsPose(albaMatrix *absPose, albaTimeStamp ts = -1);
99
100 //----------------------------------------------------------------------------
101 // RefSys
102 //----------------------------------------------------------------------------
103
105 void SetRefSys(albaVME *refSys);
107
109
113 void SetConstraintModality(int constrainModality);
115
117 void SetStep(double step);
118 int GetStep();
119
123
124protected:
125
128
131
134
137
140
144
170
173 void Highlight(int component);
174
180
184
188
191
194
197
200
201};
202#endif
double albaTimeStamp
type for time varying data timestamps (not for pipelines timestamps!)
Definition: albaDefines.h:57
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
albaGUI * GetGui()
Return the gui to be plugged.
gui class for translation gizmo
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
Basic gizmo component used to perform constrained translation on one axis.
Basic gizmo component used to perform constrained translation on a plane.
Gizmo used to perform constrained translation.
albaGizmoCrossTranslateAxis * m_GTLeftRight
albaGizmoCrossTranslatePlane * m_GTPlane
Array holding the three gizmo that performs translation on a plane.
albaGizmoCrossTranslatePlane * GetGTPlane() const
int m_Step
register step on axes
bool m_BuildGUI
Build Gizmo GUI.
albaGizmoCrossTranslateAxis * GetGTUpDown()
albaMatrix * GetAbsPose()
Get the gizmo abs pose.
albaGizmoCrossTranslateAxis * GetGTLeftRight()
void OnEventGizmoGui(albaEventBase *alba_event)
Gizmo components events handling.
int m_ConstraintModality
register axis constraint modality
void SetRefSys(albaVME *refSys)
Set the vme to be used as reference system, the vme is referenced; default ref sys is vme abs matrix.
virtual ~albaGizmoCrossTranslate()
albaGUI * GetGui()
Return gui owned by the gizmo.
albaMatrix * m_PivotPose
Pivot point position;.
void SetRenderWindowHeightPercentage(double percentage)
Superclass override.
ACTIVE_COMPONENT
gizmo components enum
int m_ActiveGizmoComponent
Register the active gizmo component at MOUSE_DOWN.
void Highlight(int component)
Highlight one component and dehighlight other components.
void SetInput(albaVME *vme)
Set input vme for the gizmo.
void Show(bool show)
Show the gizmo.
void OnEventGizmoComponents(albaEventBase *alba_event)
Gizmo components events handling.
void ConstrainTranslationToInputVMEBoundsOn()
Constrain translation to Input VME bounds (default to true): the gizmo will move inside the input vol...
void OnEvent(albaEventBase *alba_event)
Events handling.
void SetStep(double step)
Set the step value for snap step constraint type for the given axis.
void SetAutoscale(bool autoscale)
Superclass override.
albaGizmoCrossTranslate(albaVME *input, albaObserver *listener=NULL, bool BuildGUI=true, int normal=X)
void SendTransformMatrixFromGui(albaEventBase *alba_event)
Send matrix to postmultiply to listener.
int m_Normal
Normal to the cross gizmo.
albaGizmoCrossTranslateAxis * m_GTUpDown
Array holding the three gizmo that performs translation on a vector.
void SetConstraintModality(int constrainModality)
Allowed constraint modality are: LOCK, FREE, BOUNDS, SNAP_STEP, SNAP_ARRAY defined in albaInteractorC...
albaGUIGizmoTranslate * m_GuiGizmoTranslate
Gizmo gui.
void SetAlwaysVisible(bool alwaysVisible)
Superclass override.
TRANSLATE_ON_PLANE
gizmo components enum
bool m_ConstrainTranslationToInputVMEBounds
Register if translation is constrained to input vme bounds.
void SetAbsPose(albaMatrix *absPose, albaTimeStamp ts=-1)
Set/Get the gizmo pose: works by setting the pose to all gizmo subcomponents.
Base class for operations and views gizmos.
albaMatrix - Time stamped 4x4 Matrix.
Definition: albaMatrix.h:44
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaVME -
Definition: albaVME.h:150