source: trunk/packages/vizservers/nanovis/TransferFunction.h @ 1018

Last change on this file since 1018 was 973, checked in by gah, 12 years ago
File size: 1.2 KB
Line 
1
2/*
3 * ----------------------------------------------------------------------
4 * ColorMap.h: color map class contains an array of (RGBA) values
5 *
6 * ======================================================================
7 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
8 *           Purdue Rendering and Perceptualization Lab (PURPL)
9 *
10 *  Copyright (c) 2004-2006  Purdue Research Foundation
11 *
12 *  See the file "license.terms" for information on usage and
13 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14 * ======================================================================
15 */
16
17#ifndef _TRANSFER_FUNCTION_H_
18#define _TRANSFER_FUNCTION_H_
19
20
21#include "Texture1D.h"
22
23
24class TransferFunction{
25    int _size;                  //the resolution of the color map, how many
26                                //(RGBA) quadraples
27    float* _data;
28    Texture1D* _tex;            //the texture storing the colors
29   
30public:
31    GLuint id;                  //OpenGL's texture identifier
32
33    TransferFunction(int size, float *data);
34    ~TransferFunction();
35    void update(float *data);
36    void update(int size, float *data);
37    Texture1D* getTexture(void) {
38        return _tex;
39    }
40    float* getData(void) { 
41        return _data; 
42    }
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.