Last change
on this file since 6596 was
3683,
checked in by ldelgass, 11 years ago
|
Improvements to 3D shapes in vtkvis. Add preliminary, experimental grouping.
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (C) 2004-2012 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | * Author: Leif Delgass <ldelgass@purdue.edu> |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef VTKVIS_DISK_H |
---|
9 | #define VTKVIS_DISK_H |
---|
10 | |
---|
11 | #include <vtkSmartPointer.h> |
---|
12 | #include <vtkPolyDataMapper.h> |
---|
13 | #include <vtkActor.h> |
---|
14 | #include <vtkDiskSource.h> |
---|
15 | |
---|
16 | #include "Shape.h" |
---|
17 | #include "DataSet.h" |
---|
18 | |
---|
19 | namespace VtkVis { |
---|
20 | |
---|
21 | /** |
---|
22 | * \brief VTK PolyData disk |
---|
23 | * |
---|
24 | * This class creates a mesh disk |
---|
25 | */ |
---|
26 | class Disk : public Shape |
---|
27 | { |
---|
28 | public: |
---|
29 | Disk(); |
---|
30 | virtual ~Disk(); |
---|
31 | |
---|
32 | virtual const char *getClassName() const |
---|
33 | { |
---|
34 | return "Disk"; |
---|
35 | } |
---|
36 | |
---|
37 | void setRadii(double inner, double outer) |
---|
38 | { |
---|
39 | if (_disk != NULL) { |
---|
40 | _disk->SetInnerRadius(inner); |
---|
41 | _disk->SetOuterRadius(outer); |
---|
42 | } |
---|
43 | } |
---|
44 | |
---|
45 | void setResolution(int radialRes, int circumRes) |
---|
46 | { |
---|
47 | if (_disk != NULL) { |
---|
48 | _disk->SetRadialResolution(radialRes); |
---|
49 | _disk->SetCircumferentialResolution(circumRes); |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | void flipNormals(bool state); |
---|
54 | |
---|
55 | private: |
---|
56 | virtual void update(); |
---|
57 | |
---|
58 | vtkSmartPointer<vtkDiskSource> _disk; |
---|
59 | }; |
---|
60 | |
---|
61 | } |
---|
62 | |
---|
63 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.