/
volGeometry.h
57 lines (44 loc) · 1.22 KB
/
volGeometry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef VOLGEOMETRY_H
#define VOLGEOMETRY_H
#include <vvGLObject.h>
#include <vtkNew.h>
class vtkActor;
class vtkDataSetMapper;
class vtkLookupTable;
class volGeometry : public vvGLObject
{
public:
using Superclass = vvGLObject;
volGeometry();
~volGeometry() override;
struct DataItem : public Superclass::DataItem
{
vtkNew<vtkDataSetMapper> mapper;
vtkNew<vtkActor> actor;
};
enum class Representation
{
Points,
WireFrame,
Surface,
SurfaceWithEdges
};
void initVvContext(vvContextState &vvContext,
GLContextData &contextData) const override;
void syncApplicationState(const vvApplicationState &appState) override;
void syncContextState(const vvApplicationState &appState,
const vvContextState &contextState,
GLContextData &contextData) const override;
bool visible() const;
void setVisible(bool visible);
double opacity() const;
void setOpacity(double opacity);
Representation representation() const;
void setRepresentation(Representation representation);
private:
bool m_visible;
double m_opacity;
Representation m_representation;
vtkNew<vtkLookupTable> m_color;
};
#endif // VOLGEOMETRY_H