Last change
on this file since 6713 was
4904,
checked in by ldelgass, 10 years ago
|
Merge serveral changes from trunk. Does not include threading, world space
changes, etc.
|
-
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-2013 HUBzero Foundation, LLC |
---|
4 | * |
---|
5 | */ |
---|
6 | #ifndef NV_GRID_H |
---|
7 | #define NV_GRID_H |
---|
8 | |
---|
9 | #include <vrmath/Vector3f.h> |
---|
10 | #include <vrmath/Color4f.h> |
---|
11 | |
---|
12 | #include "Axis.h" |
---|
13 | #include "AxisRange.h" |
---|
14 | |
---|
15 | namespace nv { |
---|
16 | |
---|
17 | namespace util { |
---|
18 | class Fonts; |
---|
19 | } |
---|
20 | |
---|
21 | class Grid |
---|
22 | { |
---|
23 | public: |
---|
24 | Grid(); |
---|
25 | virtual ~Grid(); |
---|
26 | |
---|
27 | bool isVisible() const |
---|
28 | { |
---|
29 | return _visible; |
---|
30 | } |
---|
31 | |
---|
32 | void setVisible(bool visible) |
---|
33 | { |
---|
34 | _visible = visible; |
---|
35 | } |
---|
36 | |
---|
37 | void setAxisColor(float r, float g, float b, float a) |
---|
38 | { |
---|
39 | _axisColor.set(r, g, b, a); |
---|
40 | } |
---|
41 | |
---|
42 | void setLineColor(float r, float g, float b, float a) |
---|
43 | { |
---|
44 | _majorColor.set(r, g, b, a); |
---|
45 | _minorColor = _majorColor; |
---|
46 | } |
---|
47 | |
---|
48 | void render(); |
---|
49 | |
---|
50 | void setFont(nv::util::Fonts *font); |
---|
51 | |
---|
52 | void getBounds(vrmath::Vector3f& bboxMin, |
---|
53 | vrmath::Vector3f& bboxMax) const; |
---|
54 | |
---|
55 | Axis xAxis; |
---|
56 | Axis yAxis; |
---|
57 | Axis zAxis; |
---|
58 | |
---|
59 | private: |
---|
60 | vrmath::Color4f _axisColor, _majorColor, _minorColor; |
---|
61 | nv::util::Fonts *_font; |
---|
62 | bool _visible; |
---|
63 | }; |
---|
64 | |
---|
65 | } |
---|
66 | |
---|
67 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.