Last change
on this file since 6295 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:
928 bytes
|
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_BOX_H |
---|
9 | #define VTKVIS_BOX_H |
---|
10 | |
---|
11 | #include <vtkSmartPointer.h> |
---|
12 | #include <vtkPolyDataMapper.h> |
---|
13 | #include <vtkActor.h> |
---|
14 | #include <vtkCubeSource.h> |
---|
15 | |
---|
16 | #include "Shape.h" |
---|
17 | #include "DataSet.h" |
---|
18 | |
---|
19 | namespace VtkVis { |
---|
20 | |
---|
21 | /** |
---|
22 | * \brief VTK PolyData box |
---|
23 | * |
---|
24 | * This class creates a mesh box |
---|
25 | */ |
---|
26 | class Box : public Shape |
---|
27 | { |
---|
28 | public: |
---|
29 | Box(); |
---|
30 | virtual ~Box(); |
---|
31 | |
---|
32 | virtual const char *getClassName() const |
---|
33 | { |
---|
34 | return "Box"; |
---|
35 | } |
---|
36 | |
---|
37 | void setSize(double xlen, double ylen, double zlen) |
---|
38 | { |
---|
39 | if (_box != NULL) { |
---|
40 | _box->SetXLength(xlen); |
---|
41 | _box->SetYLength(ylen); |
---|
42 | _box->SetZLength(zlen); |
---|
43 | } |
---|
44 | } |
---|
45 | |
---|
46 | void flipNormals(bool state); |
---|
47 | |
---|
48 | private: |
---|
49 | virtual void update(); |
---|
50 | |
---|
51 | vtkSmartPointer<vtkCubeSource> _box; |
---|
52 | }; |
---|
53 | |
---|
54 | } |
---|
55 | |
---|
56 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.