ALBA
albaGizmoScaleIsotropic.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGizmoScaleIsotropic
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 __albaGizmoScaleIsotropic_H__
18#define __albaGizmoScaleIsotropic_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaEvent.h"
24#include "albaGizmoInterface.h"
25
26//----------------------------------------------------------------------------
27// forward references :
28//----------------------------------------------------------------------------
31class albaVMEGizmo;
32class albaMatrix;
33class albaVME;
34class vtkCubeSource;
35class vtkTransformPolyDataFilter;
36class vtkTransform;
37
43{
44public:
45 albaGizmoScaleIsotropic(albaVME *input, albaObserver *listener = NULL);
47
50 void SetInput(albaVME *vme);
51 albaVME *GetInput() {return this->m_InputVme;};
52
53 //----------------------------------------------------------------------------
54 // events handling
55 //----------------------------------------------------------------------------
56
58 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
59
61 virtual void OnEvent(albaEventBase *alba_event);
62
63 //----------------------------------------------------------------------------
64 // highlight and show
65 //----------------------------------------------------------------------------
66
68 void Highlight(bool highlight);
69
71 void Show(bool show);
72
75 void SetAbsPose(albaMatrix *absPose);
77
78 //----------------------------------------------------------------------------
79 // cube stuff
80 //----------------------------------------------------------------------------
81
83 void SetCubeLength(double length);
84 double GetCubeLength() const;
85
86protected:
89 void SetRefSysMatrix(albaMatrix *constrain);
90
92 albaVMEGizmo *m_CubeGizmo;
93
96
98 vtkCubeSource *m_Cube;
99
101 //albaVmeData *GizmoData;
102
104 vtkTransformPolyDataFilter *m_TranslatePDF;
105
108
110 void CreateISA();
111
114
117
119 void SetColor(double col[3]);
120 void SetColor(double colR, double colG, double colB);
121
125
127 friend class albaGizmoScaleIsotropicTest;
128};
129#endif
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
Base class for operations and views gizmos.
Gizmo component used to perform isotropic scaling.
double GetCubeLength() const
void CreateISA()
Create isa stuff.
void Highlight(bool highlight)
Highlight the gizmo.
void SetColor(double col[3])
Gizmo color setting facilities.
virtual void OnEvent(albaEventBase *alba_event)
Events handling.
void SetCubeLength(double length)
Set/Get the length of the cone.
albaVMEGizmo * m_CubeGizmo
Cube gizmo.
albaInteractorGenericMouse * m_IsaGen
isa generic
albaMatrix * GetAbsPose()
Get the gizmo abs pose.
albaObserver * m_Listener
Register the event receiver object.
void SetAbsPose(albaMatrix *absPose)
Set the abs pose.
vtkTransformPolyDataFilter * m_TranslatePDF
Cylinder and cube gizmo vme data.
void Show(bool show)
Show the gizmo.
albaGizmoScaleIsotropic(albaVME *input, albaObserver *listener=NULL)
albaInteractorCompositorMouse * m_IsaComp
isa compositor
void CreatePipeline()
Create vtk objects needed.
vtkCubeSource * m_Cube
Cube source.
albaVME * m_InputVme
Register input vme.
void SetRefSysMatrix(albaMatrix *constrain)
Set the constrain ref sys.
virtual ~albaGizmoScaleIsotropic()
void SetListener(albaObserver *Listener)
Set the event receiver object.
void SetColor(double colR, double colG, double colB)
void SetInput(albaVME *vme)
Set the gizmo generating vme; the gizmo will be centered on this vme.
Associates instances of albaInteractorGenericMouse to mouse buttons and ctrl/shift keys combinations.
Constrained interaction with mouse device.
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