00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _VUVOLUME_H_
00009 #define _VUVOLUME_H_
00010
00011 #include "vuSimpleTypes.h"
00012 #include "vuString.h"
00013 #include "vuVector.h"
00014 #include "vuCamera.h"
00015 #include "vuTFunc/vuTFIntensity.h"
00016 #include "vuTFunc/vuTFDesign.h"
00017
00018
00019 #include <stdio.h>
00020
00021
00022 class vu1;
00023 typedef vu1 vuVolume;
00024
00026
00041 class vu1
00042 {
00043 public:
00045
00047 vu1();
00049
00052 vu1(const vu1 &inst);
00054 virtual ~vu1();
00055
00057
00060 vu1& operator=(const vu1 &rhs);
00061
00063
00068 void setFileName(const char* val);
00070
00071 const char *getFileName(void) const;
00072
00074
00088 virtual bool read(void) = 0;
00090
00092 virtual bool write(void) = 0;
00093
00095
00101 const char *getHeader(void) const;
00102
00104 virtual bool IsReRendering ();
00105
00107 virtual void setIsReRendering(bool isit=true);
00108
00109 public:
00110
00112
00114 dword getDataSize();
00115
00116
00117
00118
00119
00121
00122 void setRenderState(dword val);
00124
00125 dword getRenderState(void) const;
00126
00128
00132 virtual void setViewVectors(const vuVector& view,const vuVector& up,const vuVector& right)=0;
00133
00135
00141 virtual void render(void) = 0;
00142
00144
00147 bool errorOccurred(void) const;
00149
00153 byte getErrorLevel(void) const;
00155
00158 const char *getErrorMessage(void) const;
00159
00160 protected:
00162
00168 void close(void);
00169
00171
00175 virtual bool read(FILE *file);
00177
00179 virtual bool write(FILE *file);
00180
00182
00187 bool setError(const char *Message,byte ErrorLevel = 1);
00189 bool setInvalidFormatError();
00191 bool setWriteError();
00192
00193 protected:
00195 byte* m_Data;
00197 dword m_DataSize;
00198
00200 dword m_RenderState;
00201
00203 vuString m_FileName;
00205 vuString m_Header;
00207 bool m_Binary;
00208
00210 bool m_Error;
00212 vuString m_ErrorMessage;
00214 byte m_ErrorLevel;
00215
00216 bool m_rerendering;
00218 vuCamera *m_Camera;
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238 public:
00240 virtual void preview(int hint=0);
00242 void setCamera(vuCamera *mycamera);
00244 vuCamera& getCamera();
00246 vuCamera *getCameraPtr();
00248 virtual vuVector getCenter() const;
00249
00250
00251 virtual void glInit();
00252 virtual void glResize(dword width, dword height);
00253 };
00254
00255 #endif