source: nanovis/branches/1.1/PointSet.h @ 4600

Last change on this file since 4600 was 3502, checked in by ldelgass, 11 years ago

Add basic VTK structured points reader to nanovis, update copyright dates.

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