source: trunk/packages/vizservers/nanovis/Grid.h @ 3627

Last change on this file since 3627 was 3627, checked in by ldelgass, 7 years ago

Use vrmath::Color4f for color where appropriate

  • Property svn:eol-style set to native
File size: 970 bytes
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/Color4f.h>
10
11#include "Axis.h"
12#include "AxisRange.h"
13
14namespace nv {
15
16namespace util {
17class Fonts;
18}
19
20class Grid
21{
22public:
23    Grid();
24    virtual ~Grid();
25
26    bool isVisible() const
27    {
28        return _visible;
29    }
30
31    void setVisible(bool visible)
32    {
33        _visible = visible;
34    }
35
36    void setAxisColor(float r, float g, float b, float a)
37    {
38        _axisColor.set(r, g, b, a);
39    }
40
41    void setLineColor(float r, float g, float b, float a)
42    {
43        _majorColor.set(r, g, b, a);
44        _minorColor = _majorColor;
45    }
46
47    void render();
48
49    void setFont(nv::util::Fonts *font);
50
51    Axis xAxis;
52    Axis yAxis;
53    Axis zAxis;
54
55private:
56    vrmath::Color4f _axisColor, _majorColor, _minorColor;
57    nv::util::Fonts *_font;
58    bool _visible;
59};
60
61}
62
63#endif
Note: See TracBrowser for help on using the repository browser.