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//----------------------------------------------------------------------------
30class albaVMEGizmo;
31class albaMatrix;
32class albaVME;
33class vtkCubeSource;
34class vtkTransformPolyDataFilter;
35class vtkTransform;
36
42{
43public:
44 albaGizmoScaleIsotropic(albaVME *input, albaObserver *listener = NULL);
46
49 void SetInput(albaVME *vme);
50 albaVME *GetInput() {return this->m_InputVme;};
51
52 //----------------------------------------------------------------------------
53 // events handling
54 //----------------------------------------------------------------------------
55
57 void SetListener(albaObserver *Listener) {m_Listener = Listener;};
58
60 virtual void OnEvent(albaEventBase *alba_event);
61
62 //----------------------------------------------------------------------------
63 // highlight and show
64 //----------------------------------------------------------------------------
65
67 void Highlight(bool highlight);
68
70 void Show(bool show);
71
74 void SetAbsPose(albaMatrix *absPose);
76
77 //----------------------------------------------------------------------------
78 // cube stuff
79 //----------------------------------------------------------------------------
80
82 void SetCubeLength(double length);
83 double GetCubeLength() const;
84
85protected:
88 void SetRefSysMatrix(albaMatrix *constrain);
89
91 albaVMEGizmo *m_CubeGizmo;
92
95
97 vtkCubeSource *m_Cube;
98
100 //albaVmeData *GizmoData;
101
103 vtkTransformPolyDataFilter *m_TranslatePDF;
104
107
109 void CreateISA();
110
111
114
116 void SetColor(double col[3]);
117 void SetColor(double colR, double colG, double colB);
118
122
124 friend class albaGizmoScaleIsotropicTest;
125};
126#endif
Constrained interaction with mouse device: the left button moves the VME (see OnLeftButtonDown).
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.
albaBehaviorTransform * 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)
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.
albaMatrix - Time stamped 4x4 Matrix.
Definition: albaMatrix.h:45
Interface implementing the Observer of the Subject/Observer design pattern.
Definition: albaObserver.h:36
albaVME -
Definition: albaVME.h:150