ALBA
albaGizmoRotate.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGizmoRotate
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
17#ifndef __albaGizmoRotate_H__
18#define __albaGizmoRotate_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaEvent.h"
24#include "albaGizmoInterface.h"
25#include "albaGUIGizmoRotate.h"
26
27//----------------------------------------------------------------------------
28// forward references :
29//----------------------------------------------------------------------------
33class albaMatrix;
34
35//----------------------------------------------------------------------------
74class ALBA_EXPORT albaGizmoRotate : public albaGizmoInterface
75{
76public:
77 albaGizmoRotate(albaVME *input, albaObserver* listener = NULL, bool buildGUI = true);
78 virtual ~albaGizmoRotate();
79
82 void SetInput(albaVME *vme);
83
85 void SetRenderWindowHeightPercentage(double percentage);
86
88 void SetAutoscale(bool autoscale);
89
91 void SetAlwaysVisible(bool alwaysVisible);
92
93 //----------------------------------------------------------------------------
94 // events handling
95 //----------------------------------------------------------------------------
96
99 void OnEvent(albaEventBase *alba_event);
100
101 //----------------------------------------------------------------------------
102 // show
103 //----------------------------------------------------------------------------
104
107 void Show(bool show);
108 void Show(bool showX, bool showY, bool showZ);
109
110 //----------------------------------------------------------------------------
111
114 void SetAbsPose(albaMatrix *absPose, bool applyPoseToFans = true);
116
120
121 //----------------------------------------------------------------------------
122 // RefSys
123 //----------------------------------------------------------------------------
124
126 void SetRefSys(albaVME *refSys);
128
129 albaGUI *GetGui() {return m_GuiGizmoRotate->GetGui();};
130
132 void SetCircleFanRadius(double radius);
134
135protected:
137
140
143
146
149 enum AXIS {X = 0, Y, Z};
150
151 enum ACTIVE_COMPONENT {NONE = -1, X_AXIS = 0, Y_AXIS, Z_AXIS, NUM_COMPONENTS};
152
155 void Highlight(int component);
156
158 albaGizmoRotateCircle *m_GRCircle[3];
159
162
165
167 friend class albaGizmoRotateTest;
168
170
171};
172#endif
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
gui class for rotation gizmo
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
Base class for operations and views gizmos.
Basic gizmo component used to perform constrained rotation around an axis.
Basic gizmo component used to give rotation angle feedback.
Gizmo used to perform constrained rotation around an axis.
void Show(bool show)
Show the gizmo.
albaMatrix * GetAbsPose()
Get the gizmo abs pose.
void SetAlwaysVisible(bool alwaysVisible)
Superclass override.
void SetRenderWindowHeightPercentage(double percentage)
Superclass override.
AXIS
gizmo components enum
albaGUI * GetGui()
Return gui owned by the gizmo.
virtual ~albaGizmoRotate()
double GetCircleFanRadius()
void OnEventGizmoGui(albaEventBase *alba_event)
Gizmo components events handling.
void Show(bool showX, bool showY, bool showZ)
bool m_BuildGUI
Build Gizmo GUI.
void SendTransformMatrixFromGui(albaEventBase *alba_event)
Send matrix to postmultiply to listener.
void SetAbsPose(albaMatrix *absPose, bool applyPoseToFans=true)
Set the gizmo pose.
void SetAutoscale(bool autoscale)
Superclass override.
void SetCircleFanRadius(double radius)
Modify radius of circles.
void SetInput(albaVME *vme)
Set input vme for the gizmo.
void Highlight(int component)
Highlight one component and dehighlight other components.
void OnEventGizmoComponents(albaEventBase *alba_event)
Gizmo components events handling.
void SetRefSys(albaVME *refSys)
Set the vme to be used as reference system, the vme is referenced; default ref sys is vme abs matrix.
albaVME * GetRefSys()
albaInteractorGenericInterface * GetInteractor(int axis)
Get the Interactor asscociated to each axis.
albaGUIGizmoRotate * m_GuiGizmoRotate
void OnEvent(albaEventBase *alba_event)
Events handling.
albaGizmoRotate(albaVME *input, albaObserver *listener=NULL, bool buildGUI=true)
Abstract class for general purpose interactor.
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