Computer Assisted Medical Intervention Tool Kit  version 5.1
 
Loading...
Searching...
No Matches
GeometricObject.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2023 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
6 *
7 * Visit http://camitk.imag.fr for more information
8 *
9 * This file is part of CamiTK.
10 *
11 * CamiTK is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * CamiTK is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22 *
23 * $CAMITK_LICENCE_END$
24 ****************************************************************************/
25
26
27#ifndef GEOMETRIC_OBJECT_H
28#define GEOMETRIC_OBJECT_H
29
30// -- Core stuff
31#include "CamiTKAPI.h"
32
33// -- vtk stuff
34#include <vtkSmartPointer.h>
35
36// -- vtk stuff Classes
37class vtkPolyDataAlgorithm;
38class vtkActor;
39class vtkPolyDataMapper;
40
41namespace camitk {
55public:
56
58 enum Geometry {
60 SPHERE
61 };
62
64 enum Direction {
65 X,
66 Y,
67 Z,
68 USER_DEFINED
69 };
70
75
80 GeometricObject(Geometry, const double, const double, const double);
81
87
92 GeometricObject(Geometry, float boundingBox[6]);
93
95 virtual ~GeometricObject();
96
98 vtkSmartPointer<vtkActor> getActor();
99
101 void setPosition(const double, const double, const double);
102
104 void setDirection(const double, const double, const double);
105
107 void setColor(const double, const double, const double);
108
113 void setSize(const double);
114
116 Geometry getType() const;
117
118private:
119
121 float bounds[6];
122
124 Direction myDirection;
125
127 vtkSmartPointer<vtkActor> myActor;
128
130 vtkSmartPointer<vtkPolyDataMapper> myMapper;
131
133 vtkSmartPointer<vtkPolyDataAlgorithm> mySource;
134
136 Geometry myType;
137
139 void init();
140
142 void defaultValues();
143};
144
146 return myType;
147}
148
149}
150
151#endif
152
#define CAMITK_API
Definition CamiTKAPI.h:49
Class that defines the direction of the Load with x, y and z.
Definition Direction.h:39
A geometric object allows one to create geometric object (sphere, arrow, ...) that can be added direc...
Definition GeometricObject.h:54
Geometry
the geometric type
Definition GeometricObject.h:58
@ ARROW
an arrow
Definition GeometricObject.h:59
Geometry getType() const
return the type
Definition GeometricObject.h:145
@ Y
the object in the Y direction, size = 0.1
Definition GeometricObject.h:66
@ Z
the object in the Z direction, size = 0.1
Definition GeometricObject.h:67
@ X
the object in the X direction, size = 0.1
Definition GeometricObject.h:65
A 3D representation of a vtkPointSet to be displayed in a InteractiveViewer, this class implements th...
Definition Geometry.h:126
Definition Action.cpp:35