Changeset 3617
- Timestamp:
- Apr 3, 2013, 2:02:16 AM (11 years ago)
- Location:
- trunk/packages/vizservers/nanovis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/BucketSort.cpp
r3502 r3617 5 5 */ 6 6 7 #include <vrmath/Vector3f.h> 8 #include <vrmath/Matrix4x4d.h> 9 7 10 #include "BucketSort.h" 8 11 9 12 using namespace PCA; 10 11 #include <vrmath/Vector3f.h> 12 #include <vrmath/Matrix4x4d.h> 13 using namespace vrmath; 13 14 14 15 void … … 23 24 { 24 25 if (clusterAccel == 0) { 25 26 return; 26 27 } 27 28 Cluster* cluster = clusterAccel->startPointerCluster[level - 1]; … … 29 30 Cluster* end = &(cluster[clusterAccel->numOfClusters[level - 1] - 1]); 30 31 31 Vector3f pos;32 32 for (; c <= end; c = (Cluster*) ((char *)c + sizeof(Cluster))) { 33 pos = cameraMat.transform(c->centroid); 34 addBucket(c, pos.length()*_invMaxLength); 33 Vector4f pt = cameraMat.transform(Vector4f(c->centroid, 1)); 34 Vector3f pos(pt.x, pt.y, pt.z); 35 addBucket(c, pos.length()*_invMaxLength); 35 36 } 36 37 } -
trunk/packages/vizservers/nanovis/PCASplit.cpp
r3502 r3617 12 12 #include <newmatio.h> // need matrix output routines 13 13 #include <newmatrc.h> 14 15 #include "PCASplit.h"16 17 using namespace vrmath;18 19 14 #ifdef use_namespace 20 15 using namespace NEWMAT; // access NEWMAT namespace 21 16 #endif 22 17 18 #include "PCASplit.h" 19 #include "Trace.h" 20 21 using namespace vrmath; 23 22 using namespace PCA; 24 23 -
trunk/packages/vizservers/nanovis/PointSetRenderer.cpp
r3612 r3617 16 16 using namespace nv; 17 17 using namespace nv::util; 18 using namespace vrmath; 19 using namespace PCA; 18 20 19 21 #define USE_TEXTURE … … 51 53 delete loader; 52 54 delete image; 53 _bucketSort = new PCA::BucketSort(1024);55 _bucketSort = new BucketSort(1024); 54 56 } 55 57 … … 58 60 } 59 61 60 void PointSetRenderer::renderPoints(P CA::Point *points, int length)62 void PointSetRenderer::renderPoints(Point *points, int length) 61 63 { 62 P CA::Point *p = points;64 Point *p = points; 63 65 for (int i = 0; i < length; ++i, ++p) { 64 66 glColor4f(p->color.x, p->color.y, p->color.z, p->color.w); … … 67 69 } 68 70 69 void PointSetRenderer::renderCluster( PCA::ClusterList** bucket, int size, int level)71 void PointSetRenderer::renderCluster(ClusterList** bucket, int size, int level) 70 72 { 71 73 float quadratic[] = { 1.0f, 0.0f, 0.01f }; … … 83 85 glBegin(GL_POINTS); 84 86 85 PCA::ClusterList *p;87 ClusterList *p; 86 88 for (int i = size - 1; i >= 0; --i) { 87 89 p = bucket[i]; … … 108 110 } 109 111 110 void PointSetRenderer::render( PCA::ClusterAccel *cluster, const Matrix4x4d& mat,112 void PointSetRenderer::render(ClusterAccel *cluster, const Matrix4x4d& mat, 111 113 int sortLevel, const Vector3f& scale, const Vector3f& origin) 112 114 { … … 131 133 glPushMatrix(); 132 134 float s = 1.0f / scale.x; 133 Vector3 shift(origin.x + scale.x * 0.5, origin.x + scale.x * 0.5, origin.x + scale.x * 0.5);135 Vector3f shift(origin.x + scale.x * 0.5, origin.x + scale.x * 0.5, origin.x + scale.x * 0.5); 134 136 glScalef(s, scale.y / scale.x * s, scale.z / scale.x * s); 135 137 -
trunk/packages/vizservers/nanovis/PointShader.h
r3613 r3617 35 35 private: 36 36 float _scale; 37 float _scale;38 37 Texture3D *_normal; 39 38 };
Note: See TracChangeset
for help on using the changeset viewer.