Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuTransferCanvas.h

Go to the documentation of this file.
00001 #ifndef _vuTransferCanvas_h_
00002 #define _vuTransferCanvas_h_
00003 
00004 #include <wx/wx.h>
00005 #include "vuGLCanvas.h"
00006 #include "vuTFunc/vuTFDesign.h"
00007 
00009 
00047 class vuTransferCanvas : public vuGLCanvas
00048 {
00049 public:
00051 
00062     vuTransferCanvas(vuTFDesign &tf, wxWindow *parent,wxWindowID id=-1,bool edit=false);
00064     ~vuTransferCanvas();
00065 
00067     vuTFDesign& getTransferFunc();
00069     void setTransferFunc(const vuTFDesign &tf);
00070 
00072     const vuTFDesign::OpacityNode *getActiveOpacity() const;
00074     void setActiveOpacity(const vuTFDesign::OpacityNode *);
00075 
00077     const vuTFDesign::ColourNode *getActiveColour() const;
00079     void setActiveColour(const vuTFDesign::ColourNode *);
00080 
00082     void setSmoothing(float opacity, float colour);
00083 
00084 protected:
00086     bool glInit();
00088     void render();
00090     void resize();
00092     void OnMouse(wxMouseEvent &ev);
00093 
00095     void postEvent(wxEventType ev);
00096 
00097 protected:
00099     vuTFDesign &m_TFunc;
00101     bool m_Edit;
00102 
00104     float m_xScreenMin, m_xScreenMax, m_yScreenMin, m_yScreenMax;
00106     float m_dx, m_dy;
00107 
00109     dword m_Opacity;
00111     dword m_Colour;
00112 
00113 protected:
00115     const dword m_xMin;
00116     const dword m_xMax;
00117     const float m_yMin;
00118     const float m_yMax;
00119 
00121     bool m_DoSpectral;
00122 
00123     DECLARE_EVENT_TABLE()
00124 };
00125 
00127 enum
00128 {
00130     vuEVT_TRANSFER_NODE_SELECT = 12000,
00131 
00133     vuEVT_TRANSFER_NODE_OPEN,
00134     
00136     vuEVT_TRANSFER_CHANGE
00137 };
00138 
00139 #endif

Generated on Wed Dec 15 21:20:38 2004 for vuVolume by  doxygen 1.3.9.1