Last change
on this file since 445 was
380,
checked in by qiaow, 18 years ago
|
Transfer function widget is working!!
|
File size:
928 bytes
|
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 | |
---|
18 | #include "TransferFunction.h" |
---|
19 | |
---|
20 | |
---|
21 | TransferFunction::TransferFunction(int _size, float* data){ |
---|
22 | |
---|
23 | tex = new Texture1D(_size, GL_FLOAT); |
---|
24 | |
---|
25 | tex->initialize_float_rgba(data); |
---|
26 | id = tex->id; |
---|
27 | } |
---|
28 | |
---|
29 | |
---|
30 | TransferFunction::~TransferFunction(){ delete tex; } |
---|
31 | |
---|
32 | void TransferFunction::update(float* data){ |
---|
33 | tex->update_float_rgba(data); |
---|
34 | } |
---|
35 | |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.