Last change
on this file since 4809 was
3568,
checked in by ldelgass, 12 years ago
|
Fix crash on getting transfer function name, remove unused plane command.
|
-
Property svn:eol-style set to
native
|
File size:
1.5 KB
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | /* |
---|
3 | * Copyright (c) 2004-2013 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | * Authors: |
---|
6 | * Wei Qiao <qiaow@purdue.edu> |
---|
7 | * Insoo Woo <iwoo@purdue.edu> |
---|
8 | * George A. Howlett <gah@purdue.edu> |
---|
9 | * Leif Delgass <ldelgass@purdue.edu> |
---|
10 | */ |
---|
11 | #ifndef FLOWBOX_H |
---|
12 | #define FLOWBOX_H |
---|
13 | |
---|
14 | #include <string> |
---|
15 | |
---|
16 | #include <tcl.h> |
---|
17 | |
---|
18 | #include <vrmath/Vector3f.h> |
---|
19 | |
---|
20 | #include "FlowTypes.h" |
---|
21 | #include "Switch.h" |
---|
22 | #include "Volume.h" |
---|
23 | |
---|
24 | struct FlowBoxValues { |
---|
25 | FlowPoint corner1, corner2; ///< Coordinates of the box. |
---|
26 | FlowColor color; ///< Color of box |
---|
27 | float lineWidth; |
---|
28 | int isHidden; |
---|
29 | }; |
---|
30 | |
---|
31 | class FlowBox |
---|
32 | { |
---|
33 | public: |
---|
34 | FlowBox(const char *name); |
---|
35 | ~FlowBox(); |
---|
36 | |
---|
37 | const char *name() const |
---|
38 | { |
---|
39 | return _name.c_str(); |
---|
40 | } |
---|
41 | |
---|
42 | bool visible() const |
---|
43 | { |
---|
44 | return !_sv.isHidden; |
---|
45 | } |
---|
46 | |
---|
47 | int parseSwitches(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) |
---|
48 | { |
---|
49 | if (Rappture::ParseSwitches(interp, _switches, objc, objv, &_sv, |
---|
50 | SWITCH_DEFAULTS) < 0) { |
---|
51 | return TCL_ERROR; |
---|
52 | } |
---|
53 | return TCL_OK; |
---|
54 | } |
---|
55 | |
---|
56 | void render(Volume *volume); |
---|
57 | |
---|
58 | const FlowBoxValues *getValues() const |
---|
59 | { |
---|
60 | return &_sv; |
---|
61 | } |
---|
62 | |
---|
63 | void getWorldSpaceBounds(vrmath::Vector3f& min, |
---|
64 | vrmath::Vector3f& max, |
---|
65 | const Volume *volume) const; |
---|
66 | |
---|
67 | private: |
---|
68 | std::string _name; ///< Name of this box in the hash table. |
---|
69 | FlowBoxValues _sv; |
---|
70 | static Rappture::SwitchSpec _switches[]; |
---|
71 | }; |
---|
72 | |
---|
73 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.