Ignore:
Timestamp:
Mar 13, 2013, 9:57:03 AM (12 years ago)
Author:
ldelgass
Message:

Fix camera reset for nanovis. Includes refactoring of vector/matrix classes
in nanovis to consolidate into vrmath library. Also add preliminary canonical
view control to clients for testing.

File:
1 edited

Legend:

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

    r2822 r3492  
    55#include <vector>
    66#include <list>
    7 #include "Vector3.h"
    8 #include "Mat4x4.h"
     7
     8#include <vrmath/Matrix4x4d.h>
     9
    910#include "PCASplit.h"
    1011
    1112namespace PCA {
    1213
    13 class ClusterList {
    14 public :
    15     Cluster* data;
    16     ClusterList* next;
     14class ClusterList
     15{
    1716public :
    1817    ClusterList(Cluster *d, ClusterList *n) :
     
    2827        //if (next) delete next;
    2928    }
     29
     30    Cluster *data;
     31    ClusterList *next;
    3032};
    3133
    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);
     34class BucketSort
     35{
    4436public:
    4537    BucketSort(int maxSize)
     
    6961    void init();
    7062
    71     void sort(ClusterAccel* cluster, const Mat4x4& cameraMat, int level);
     63    void sort(ClusterAccel* cluster, const vrmath::Matrix4x4d& cameraMat, int level);
    7264
    7365    void addBucket(Cluster* cluster, float ratio);
     
    7567    ClusterList **getBucket()
    7668    { return _buffer; }
     69
     70private:
     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;
    7782};
    7883
Note: See TracChangeset for help on using the changeset viewer.