Changeset 3617


Ignore:
Timestamp:
Apr 3, 2013, 5:02:16 AM (6 years ago)
Author:
ldelgass
Message:

Compile fixes for USE_POINTSET_RENDERER (not tested).

Location:
trunk/packages/vizservers/nanovis
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/BucketSort.cpp

    r3502 r3617  
    55 */
    66
     7#include <vrmath/Vector3f.h>
     8#include <vrmath/Matrix4x4d.h>
     9
    710#include "BucketSort.h"
    811
    912using namespace PCA;
    10 
    11 #include <vrmath/Vector3f.h>
    12 #include <vrmath/Matrix4x4d.h>
     13using namespace vrmath;
    1314
    1415void
     
    2324{
    2425    if (clusterAccel == 0) {
    25         return;
     26        return;
    2627    }
    2728    Cluster* cluster = clusterAccel->startPointerCluster[level - 1];
     
    2930    Cluster* end = &(cluster[clusterAccel->numOfClusters[level - 1] - 1]);
    3031
    31     Vector3f pos;
    3232    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);
    3536    }
    3637}       
  • trunk/packages/vizservers/nanovis/PCASplit.cpp

    r3502 r3617  
    1212#include <newmatio.h>                // need matrix output routines
    1313#include <newmatrc.h>
    14 
    15 #include "PCASplit.h"
    16 
    17 using namespace vrmath;
    18 
    1914#ifdef use_namespace
    2015using namespace NEWMAT;              // access NEWMAT namespace
    2116#endif
    2217
     18#include "PCASplit.h"
     19#include "Trace.h"
     20
     21using namespace vrmath;
    2322using namespace PCA;
    2423
  • trunk/packages/vizservers/nanovis/PointSetRenderer.cpp

    r3612 r3617  
    1616using namespace nv;
    1717using namespace nv::util;
     18using namespace vrmath;
     19using namespace PCA;
    1820
    1921#define USE_TEXTURE
     
    5153    delete loader;
    5254    delete image;
    53     _bucketSort = new PCA::BucketSort(1024);
     55    _bucketSort = new BucketSort(1024);
    5456}
    5557
     
    5860}
    5961
    60 void PointSetRenderer::renderPoints(PCA::Point *points, int length)
     62void PointSetRenderer::renderPoints(Point *points, int length)
    6163{
    62     PCA::Point *p = points;
     64    Point *p = points;
    6365    for (int i = 0; i < length; ++i, ++p) {
    6466        glColor4f(p->color.x, p->color.y, p->color.z, p->color.w);
     
    6769}
    6870
    69 void PointSetRenderer::renderCluster(PCA::ClusterList** bucket, int size, int level)
     71void PointSetRenderer::renderCluster(ClusterList** bucket, int size, int level)
    7072{
    7173    float quadratic[] = { 1.0f, 0.0f, 0.01f };
     
    8385    glBegin(GL_POINTS);
    8486
    85     PCA::ClusterList *p;
     87    ClusterList *p;
    8688    for (int i = size - 1; i >= 0; --i) {
    8789        p = bucket[i];
     
    108110}
    109111
    110 void PointSetRenderer::render(PCA::ClusterAccel *cluster, const Matrix4x4d& mat,
     112void PointSetRenderer::render(ClusterAccel *cluster, const Matrix4x4d& mat,
    111113                              int sortLevel, const Vector3f& scale, const Vector3f& origin)
    112114{
     
    131133    glPushMatrix();
    132134    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);
    134136    glScalef(s, scale.y / scale.x * s, scale.z / scale.x * s);
    135137
  • trunk/packages/vizservers/nanovis/PointShader.h

    r3613 r3617  
    3535private:
    3636    float _scale;
    37     float _scale;
    3837    Texture3D *_normal;
    3938};
Note: See TracChangeset for help on using the changeset viewer.