HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RE_Texture3DMap.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: Render Library (C++)
7  *
8  * COMMENTS: 3D Texture definitions
9  */
10 
11 #ifndef __RE_Texture3DMap_h__
12 #define __RE_Texture3DMap_h__
13 
14 
15 #include "RE_API.h"
16 #include "RE_TextureTypes.h"
17 #include "RE_TextureMap.h"
18 #include <UT/UT_VectorTypes.h>
19 
20 template <class T> class UT_VoxelArray;
21 class re_Tex3D;
22 
24 {
25 public:
26 
28  virtual ~RE_Texture3DMap();
29 
30  /// Returns the amount of main memory (NOT graphics memory!)
31  /// owned by this RE_Texture3DMap.
32  virtual int64 getMemoryUsage(bool inclusive) const;
33 
35  virtual RE_TextureMap *clone() const;
36 
37 
38  // Create the texture from a voxel array
39  void setVoxels(const char *name,
40  const UT_VoxelArray<UT_Vector4> *voxels);
41 
42 protected:
43  virtual bool buildTexture(RE_Render *r, RE_Texture *t, void *data);
44  virtual bool getNodeSource(const char *map, const char *rel,
45  void **mapptr,
46  RE_TextureDimension &textype,
47  RE_GPUType &datatype,
48  int &vectorsize,
49  int &w, int &h, int &d);
50  virtual bool getFileSource(const char *map,
51  void **mapptr,
52  RE_TextureDimension &textype,
53  RE_GPUType &datatype,
54  int &vectorsize,
55  int &w, int &h, int &d);
56 private:
57  bool getSource(const char *map,
58  void **mapptr,
59  RE_TextureDimension &textype,
60  RE_GPUType &datatype,
61  int &vectorsize,
62  int &w, int &h, int &d);
63 
64  const UT_VoxelArray<UT_Vector4> *myVoxelSource;
65  int myVoxelW;
66  int myVoxelH;
67  int myVoxelD;
68 };
69 
70 #endif
virtual int getSource()
virtual RE_TextureMap * clone() const =0
#define RE_API
Definition: RE_API.h:10
virtual bool getFileSource(const char *map, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d)
virtual RE_TextureDimension getMapType()
virtual bool getNodeSource(const char *map, const char *rel, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d)
RE_TextureDimension
long long int64
Definition: SYS_Types.h:106
RE_GPUType
Definition: RE_Types.h:42
virtual int64 getMemoryUsage(bool inclusive) const
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2001
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
GLboolean r
Definition: glcorearb.h:1221
virtual bool buildTexture(RE_Render *r, RE_Texture *tex, void *data)=0