Changeset 2831 for trunk/packages/vizservers/nanovis/PointSet.h
- Timestamp:
- Mar 9, 2012, 1:12:14 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/PointSet.h
r2798 r2831 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 #ifndef __POINT_SET_H__3 #define __POINT_SET_H__2 #ifndef POINT_SET_H 3 #define POINT_SET_H 4 4 5 #include <PCASplit.h>6 #include <Vector4.h>7 #include <Vector3.h>5 #include "PCASplit.h" 6 #include "Vector4.h" 7 #include "Vector3.h" 8 8 9 class PointSet { 9 class PointSet 10 { 11 public : 12 PointSet() : 13 _sortLevel(4), 14 _cluster(0), 15 _max(1.0f), 16 _min(0.0f), 17 _visible(false) 18 { 19 } 20 21 ~PointSet() { 22 if (_cluster) { 23 delete _cluster; 24 } 25 } 26 27 void initialize(Vector4 *values, const unsigned int count, 28 const Vector3& scale, const Vector3& origin, 29 float min, float max); 30 31 void updateColor(float *color, int count); 32 33 bool isVisible() const 34 { 35 return _visible; 36 } 37 38 void setVisible(bool visible) 39 { 40 _visible = visible; 41 } 42 43 unsigned int getSortLevel() const 44 { 45 return _sortLevel; 46 } 47 48 PCA::ClusterAccel* getCluster() 49 { 50 return _cluster; 51 } 52 53 Vector3& getScale() 54 { 55 return _scale; 56 } 57 58 const Vector3& getScale() const 59 { 60 return _scale; 61 } 62 63 Vector3& getOrigin() 64 { 65 return _origin; 66 } 67 68 const Vector3& getOrigin() const 69 { 70 return _origin; 71 } 72 73 private: 10 74 unsigned int _sortLevel; 11 75 PCA::ClusterAccel* _cluster; … … 16 80 float _min; 17 81 bool _visible; 18 public :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 82 }; 64 83 65 #endif /*__POINT_SET_H__*/84 #endif
Note: See TracChangeset
for help on using the changeset viewer.