Last change
on this file since 3935 was
3630,
checked in by ldelgass, 11 years ago
|
Nanovis refactoring to fix problems with scaling and multiple results.
Do rendering in world space to properly place and scale multiple data sets.
Also fix flows to reduce resets of animations. More work toward removing
Cg dependency. Fix panning to convert viewport coords to world coords.
|
-
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 NV_FLOWBOX_H |
---|
12 | #define NV_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 | namespace nv { |
---|
25 | |
---|
26 | struct FlowBoxValues { |
---|
27 | FlowPoint corner1, corner2; ///< Coordinates of the box. |
---|
28 | FlowColor color; ///< Color of box |
---|
29 | float lineWidth; |
---|
30 | int isHidden; |
---|
31 | }; |
---|
32 | |
---|
33 | class FlowBox |
---|
34 | { |
---|
35 | public: |
---|
36 | FlowBox(const char *name); |
---|
37 | ~FlowBox(); |
---|
38 | |
---|
39 | const char *name() const |
---|
40 | { |
---|
41 | return _name.c_str(); |
---|
42 | } |
---|
43 | |
---|
44 | bool visible() const |
---|
45 | { |
---|
46 | return !_sv.isHidden; |
---|
47 | } |
---|
48 | |
---|
49 | int parseSwitches(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv) |
---|
50 | { |
---|
51 | if (Rappture::ParseSwitches(interp, _switches, objc, objv, &_sv, |
---|
52 | SWITCH_DEFAULTS) < 0) { |
---|
53 | return TCL_ERROR; |
---|
54 | } |
---|
55 | return TCL_OK; |
---|
56 | } |
---|
57 | |
---|
58 | void render(Volume *volume); |
---|
59 | |
---|
60 | const FlowBoxValues *getValues() const |
---|
61 | { |
---|
62 | return &_sv; |
---|
63 | } |
---|
64 | |
---|
65 | void getBounds(vrmath::Vector3f& min, |
---|
66 | vrmath::Vector3f& max) const; |
---|
67 | |
---|
68 | private: |
---|
69 | std::string _name; ///< Name of this box in the hash table. |
---|
70 | FlowBoxValues _sv; |
---|
71 | static Rappture::SwitchSpec _switches[]; |
---|
72 | }; |
---|
73 | |
---|
74 | } |
---|
75 | |
---|
76 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.