HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  ~RE_Texture3DMap() override;
29 
30  /// Returns the amount of main memory (NOT graphics memory!)
31  /// owned by this RE_Texture3DMap.
32  int64 getMemoryUsage(bool inclusive) const override;
33 
35  RE_TextureMap *clone() const override;
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:
44  void *data) override;
45  bool getNodeSource(const char *map, const char *rel,
46  void **mapptr,
47  RE_TextureDimension &textype,
48  RE_GPUType &datatype,
49  int &vectorsize,
50  int &w, int &h, int &d) override;
51  bool getFileSource(const char *map,
52  void **mapptr,
53  RE_TextureDimension &textype,
54  RE_GPUType &datatype,
55  int &vectorsize,
56  int &w, int &h, int &d,
57  bool preload) override;
58 private:
59  bool getSource(const char *map,
60  void **mapptr,
61  RE_TextureDimension &textype,
62  RE_GPUType &datatype,
63  int &vectorsize,
64  int &w, int &h, int &d);
65 
66  const UT_VoxelArray<UT_Vector4> *myVoxelSource;
67  int myVoxelW;
68  int myVoxelH;
69  int myVoxelD;
70 };
71 
72 #endif
virtual RE_TextureMap * clone() const =0
GLuint const GLchar * name
Definition: glew.h:1814
#define RE_API
Definition: RE_API.h:10
int getSource() override
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
RE_GPUType
Definition: RE_Types.h:44
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
GLubyte GLubyte GLubyte GLubyte w
Definition: glew.h:1890
long long int64
Definition: SYS_Types.h:116
virtual int64 getMemoryUsage(bool inclusive) const
GLfloat GLfloat GLfloat GLfloat h
Definition: glew.h:8011
virtual bool getFileSource(const char *map, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d, bool preload_only)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
virtual bool buildTexture(RE_Render *r, RE_Texture *tex, void *data)=0
GLdouble GLdouble t
Definition: glew.h:1398
RE_TextureDimension getMapType() override