source: trunk/packages/vizservers/nanovis/PointSet.h @ 2798

Last change on this file since 2798 was 2798, checked in by ldelgass, 12 years ago

Add emacs mode magic line in preparation for indentation cleanup

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#ifndef __POINT_SET_H__
3#define __POINT_SET_H__
4
5#include <PCASplit.h>
6#include <Vector4.h>
7#include <Vector3.h>
8
9class PointSet {
10    unsigned int _sortLevel;
11    PCA::ClusterAccel* _cluster;
12
13    Vector3 _scale;
14    Vector3 _origin;
15    float _max;
16    float _min;
17    bool _visible;
18public :
19    void initialize(Vector4* values, const unsigned int count,
20                    const Vector3& scale, const Vector3& origin,
21                    float min, float max);
22    void updateColor(float* color, int  count);
23
24    PointSet() :
25        _sortLevel(4),
26        _cluster(0),
27        _max(1.0f),
28        _min(0.0f),
29        _visible(false)
30    {
31        /*empty*/
32    }
33    ~PointSet() {
34        if (_cluster) {
35            delete _cluster;
36        }
37    }
38
39    bool isVisible() const {
40        return _visible;
41    }
42    void setVisible(bool visible) {
43        _visible = visible;
44    }
45    unsigned int getSortLevel(void) const {
46        return _sortLevel;
47    }
48    PCA::ClusterAccel* getCluster(void) {
49        return _cluster;
50    }
51    Vector3& getScale(void) {
52        return _scale;
53    }
54    const Vector3& getScale(void) const {
55        return _scale;
56    }
57    Vector3& getOrigin(void) {
58        return _origin;
59    }
60    const Vector3& getOrigin(void) const {
61        return _origin;
62    }
63};
64
65#endif /*__POINT_SET_H__*/
Note: See TracBrowser for help on using the repository browser.