Last change
on this file since 2319 was
2319,
checked in by ldelgass, 13 years ago
|
Add/fixup class documentation
|
-
Property svn:eol-style set to
native
|
File size:
1.7 KB
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (C) 2011, Purdue Research Foundation |
---|
4 | * |
---|
5 | * Author: Leif Delgass <ldelgass@purdue.edu> |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef __RAPPTURE_VTKVIS_GLYPHS_H__ |
---|
9 | #define __RAPPTURE_VTKVIS_GLYPHS_H__ |
---|
10 | |
---|
11 | #include <vector> |
---|
12 | |
---|
13 | #include <vtkSmartPointer.h> |
---|
14 | #include <vtkProp.h> |
---|
15 | #include <vtkActor.h> |
---|
16 | #include <vtkGlyph3D.h> |
---|
17 | #include <vtkLookupTable.h> |
---|
18 | #include <vtkPlaneCollection.h> |
---|
19 | |
---|
20 | #include "RpVtkDataSet.h" |
---|
21 | #include "ColorMap.h" |
---|
22 | |
---|
23 | namespace Rappture { |
---|
24 | namespace VtkVis { |
---|
25 | |
---|
26 | /** |
---|
27 | * \brief Oriented and scaled 3D glyph shapes |
---|
28 | */ |
---|
29 | class Glyphs { |
---|
30 | public: |
---|
31 | enum GlyphShape { |
---|
32 | ARROW, |
---|
33 | CONE, |
---|
34 | CUBE, |
---|
35 | CYLINDER, |
---|
36 | DODECAHEDRON, |
---|
37 | ICOSAHEDRON, |
---|
38 | OCTAHEDRON, |
---|
39 | SPHERE, |
---|
40 | TETRAHEDRON |
---|
41 | }; |
---|
42 | |
---|
43 | Glyphs(); |
---|
44 | virtual ~Glyphs(); |
---|
45 | |
---|
46 | void setDataSet(DataSet *dataset); |
---|
47 | |
---|
48 | DataSet *getDataSet(); |
---|
49 | |
---|
50 | vtkProp *getProp(); |
---|
51 | |
---|
52 | void setGlyphShape(GlyphShape shape); |
---|
53 | |
---|
54 | void setScaleFactor(double scale); |
---|
55 | |
---|
56 | void setLookupTable(vtkLookupTable *lut); |
---|
57 | |
---|
58 | vtkLookupTable *getLookupTable(); |
---|
59 | |
---|
60 | void setOpacity(double opacity); |
---|
61 | |
---|
62 | double getOpacity(); |
---|
63 | |
---|
64 | void setVisibility(bool state); |
---|
65 | |
---|
66 | bool getVisibility(); |
---|
67 | |
---|
68 | void setClippingPlanes(vtkPlaneCollection *planes); |
---|
69 | |
---|
70 | void setLighting(bool state); |
---|
71 | |
---|
72 | private: |
---|
73 | void initProp(); |
---|
74 | void update(); |
---|
75 | |
---|
76 | DataSet *_dataSet; |
---|
77 | |
---|
78 | double _opacity; |
---|
79 | bool _lighting; |
---|
80 | |
---|
81 | GlyphShape _glyphShape; |
---|
82 | double _scaleFactor; |
---|
83 | |
---|
84 | vtkSmartPointer<vtkLookupTable> _lut; |
---|
85 | vtkSmartPointer<vtkActor> _prop; |
---|
86 | vtkSmartPointer<vtkGlyph3D> _glyphGenerator; |
---|
87 | vtkSmartPointer<vtkPolyDataAlgorithm> _glyphSource; |
---|
88 | vtkSmartPointer<vtkPolyDataMapper> _pdMapper; |
---|
89 | }; |
---|
90 | |
---|
91 | } |
---|
92 | } |
---|
93 | |
---|
94 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.