Ignore:
Timestamp:
May 29, 2009, 4:13:42 PM (10 years ago)
Author:
vrinside
Message:

mofified a way of dealing with volumes by adding reference counts to data objects.

  • To-do : check any memory leaks for graphics objects
File:
1 edited

Legend:

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

    r973 r1475  
    2020
    2121#include "Texture1D.h"
     22#include <R2/R2Object.h>
    2223
    2324
    24 class TransferFunction{
     25class TransferFunction : public R2Object {
    2526    int _size;                  //the resolution of the color map, how many
    2627                                //(RGBA) quadraples
     
    2829    Texture1D* _tex;            //the texture storing the colors
    2930   
     31protected :
     32    ~TransferFunction();
    3033public:
    3134    GLuint id;                  //OpenGL's texture identifier
    3235
    3336    TransferFunction(int size, float *data);
    34     ~TransferFunction();
    3537    void update(float *data);
    3638    void update(int size, float *data);
     
    4143        return _data;
    4244    }
     45    int getSize() const;
    4346};
    4447
     48inline int TransferFunction::getSize() const
     49{
     50    return _size;
     51}
    4552#endif
Note: See TracChangeset for help on using the changeset viewer.