Changeset 3492 for trunk/packages/vizservers/nanovis/BucketSort.h
- Timestamp:
- Mar 13, 2013, 9:57:03 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/BucketSort.h
r2822 r3492 5 5 #include <vector> 6 6 #include <list> 7 #include "Vector3.h" 8 #include "Mat4x4.h" 7 8 #include <vrmath/Matrix4x4d.h> 9 9 10 #include "PCASplit.h" 10 11 11 12 namespace PCA { 12 13 13 class ClusterList { 14 public : 15 Cluster* data; 16 ClusterList* next; 14 class ClusterList 15 { 17 16 public : 18 17 ClusterList(Cluster *d, ClusterList *n) : … … 28 27 //if (next) delete next; 29 28 } 29 30 Cluster *data; 31 ClusterList *next; 30 32 }; 31 33 32 class BucketSort { 33 ClusterList **_buffer; 34 int _size; 35 int _count; 36 37 int _memChuckSize; 38 bool _memChunckUsedFlag; 39 ClusterList *_memChunck; 40 41 float _invMaxLength; 42 private: 43 void _sort(Cluster *cluster, const Mat4x4& cameraMat, int level); 34 class BucketSort 35 { 44 36 public: 45 37 BucketSort(int maxSize) … … 69 61 void init(); 70 62 71 void sort(ClusterAccel* cluster, const Mat4x4& cameraMat, int level);63 void sort(ClusterAccel* cluster, const vrmath::Matrix4x4d& cameraMat, int level); 72 64 73 65 void addBucket(Cluster* cluster, float ratio); … … 75 67 ClusterList **getBucket() 76 68 { return _buffer; } 69 70 private: 71 void _sort(Cluster *cluster, const vrmath::Matrix4x4d& cameraMat, int level); 72 73 ClusterList **_buffer; 74 int _size; 75 int _count; 76 77 int _memChuckSize; 78 bool _memChunckUsedFlag; 79 ClusterList *_memChunck; 80 81 float _invMaxLength; 77 82 }; 78 83
Note: See TracChangeset
for help on using the changeset viewer.