Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

TxFunction.h

00001 #ifndef _TX_FUNCTION_
00002 #define _TX_FUNCTION_
00003 
00004 #include <vector>
00005 #include <algorithm>
00006 
00007 #include "LifeVariables.h"
00008 #include "TxPoint.h"
00009 
00010 using namespace std;
00011 
00017 class TxFunction {
00018     private:
00019         
00020         vector<TxPoint> controlPoints;
00021 
00022         //TxPoint *controlPoint;
00023 
00024         
00025     public:
00026         
00035         TxFunction(float x1, float y1, float x2, float y2);
00036 
00037         ~TxFunction() {
00038             this->controlPoints.clear();
00039         };
00040 
00041 
00051         void addControlPoint(GLfloat x, GLfloat y, 
00052                              GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
00053 
00054 
00059         void removeControlPoint(TxPoint *p);
00060 
00061 
00067         void moveControlPoint(TxPoint *point, GLfloat x, GLfloat y);
00068         
00069 
00074         TxPoint* hitTxPoint(GLfloat x, GLfloat y);
00075 
00077         TxPoint* getLastTxPoint();
00078 
00080         TxPoint* getFirstTxPoint();
00081 
00083         void render();
00084 
00085 
00088         TxPoint* getNearestNeighbour(unsigned short density) ;
00089 
00090 
00102         void getLinearInterpolatedColor(unsigned short density, 
00103                                         float &red, float &green, float &blue, float &alpha);
00104 
00105 
00106 
00107         void getLinearInterpolatedVoxelColor(float density,
00108                                              float &red, float &green, float &blue);
00109 
00110         void getLevoyVoxelColor(float density,
00111                                 float &red, float &green, float &blue, float gradient);
00112 
00113 
00114         
00115         void getSolidVoxelColor(float denisty,
00116                                                   float &red, float &green, float &blue);
00117 };
00118 
00119 #endif

Generated on Mon Dec 12 15:20:26 2005 for CCube by  doxygen 1.4.1