Last change
on this file since 3305 was
3305,
checked in by ldelgass, 11 years ago
|
sync with trunk
|
-
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 __RAPPTURE_VTKVIS_ARC_H__ |
---|
9 | #define __RAPPTURE_VTKVIS_ARC_H__ |
---|
10 | |
---|
11 | #include <vtkSmartPointer.h> |
---|
12 | #include <vtkPolyDataMapper.h> |
---|
13 | #include <vtkActor.h> |
---|
14 | #include <vtkArcSource.h> |
---|
15 | |
---|
16 | #include "RpShape.h" |
---|
17 | #include "RpVtkDataSet.h" |
---|
18 | |
---|
19 | namespace Rappture { |
---|
20 | namespace VtkVis { |
---|
21 | |
---|
22 | /** |
---|
23 | * \brief VTK PolyData Arc |
---|
24 | * |
---|
25 | * This class creates a arc |
---|
26 | */ |
---|
27 | class Arc : public Shape |
---|
28 | { |
---|
29 | public: |
---|
30 | Arc(); |
---|
31 | virtual ~Arc(); |
---|
32 | |
---|
33 | virtual const char *getClassName() const |
---|
34 | { |
---|
35 | return "Arc"; |
---|
36 | } |
---|
37 | |
---|
38 | void setCenter(double center[3]) |
---|
39 | { |
---|
40 | if (_arc != NULL) { |
---|
41 | _arc->SetCenter(center); |
---|
42 | } |
---|
43 | } |
---|
44 | |
---|
45 | void setEndPoints(double pt1[3], double pt2[3]) |
---|
46 | { |
---|
47 | if (_arc != NULL) { |
---|
48 | _arc->SetPoint1(pt1); |
---|
49 | _arc->SetPoint2(pt2); |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | void setResolution(int res) |
---|
54 | { |
---|
55 | if (_arc != NULL) { |
---|
56 | _arc->SetResolution(res); |
---|
57 | } |
---|
58 | } |
---|
59 | |
---|
60 | private: |
---|
61 | virtual void update(); |
---|
62 | |
---|
63 | vtkSmartPointer<vtkArcSource> _arc; |
---|
64 | }; |
---|
65 | |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.