source: nanovis/trunk/PointSet.h @ 4920

Last change on this file since 4920 was 3613, checked in by ldelgass, 11 years ago

Include namespace in header guard defines

  • 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 */
6#ifndef NV_POINT_SET_H
7#define NV_POINT_SET_H
8
9#include <vrmath/Vector3f.h>
10#include <vrmath/Vector4f.h>
11
12#include "PCASplit.h"
13
14namespace nv {
15
16class PointSet
17{
18public :
19    PointSet() :
20        _sortLevel(4),
21        _cluster(0),
22        _max(1.0f),
23        _min(0.0f),
24        _visible(false)
25    {
26    }
27
28    ~PointSet() {
29        if (_cluster) {
30            delete _cluster;
31        }
32    }
33
34    void initialize(vrmath::Vector4f *values, const unsigned int count,
35                    const vrmath::Vector3f& scale, const vrmath::Vector3f& origin,
36                    float min, float max);
37
38    void updateColor(float *color, int count);
39
40    bool isVisible() const
41    {
42        return _visible;
43    }
44
45    void setVisible(bool visible)
46    {
47        _visible = visible;
48    }
49
50    unsigned int getSortLevel() const
51    {
52        return _sortLevel;
53    }
54
55    PCA::ClusterAccel* getCluster()
56    {
57        return _cluster;
58    }
59
60    vrmath::Vector3f& getScale()
61    {
62        return _scale;
63    }
64
65    const vrmath::Vector3f& getScale() const
66    {
67        return _scale;
68    }
69
70    vrmath::Vector3f& getOrigin()
71    {
72        return _origin;
73    }
74
75    const vrmath::Vector3f& getOrigin() const
76    {
77        return _origin;
78    }
79
80private:
81    unsigned int _sortLevel;
82    PCA::ClusterAccel *_cluster;
83
84    vrmath::Vector3f _scale;
85    vrmath::Vector3f _origin;
86    float _max;
87    float _min;
88    bool _visible;
89};
90
91}
92
93#endif
Note: See TracBrowser for help on using the repository browser.