source: nanovis/branches/1.1/Grid.h @ 4923

Last change on this file since 4923 was 4904, checked in by ldelgass, 5 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
15namespace nv {
16
17namespace util {
18class Fonts;
19}
20
21class Grid
22{
23public:
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
59private:
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.