HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_ReflectMap.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: RE_ReflectMap.h ( RE Library, C++)
7  *
8  * COMMENTS:
9  * Contains a cube texture map and the code for generating a reflection
10  * map from an object.
11  */
12 #ifndef RE_ReflectMap_h
13 #define RE_ReflectMap_h
14 
15 #include "RE_TextureTypes.h"
16 #include "RE_Types.h"
17 
18 #include <UT/UT_NonCopyable.h>
19 #include <UT/UT_String.h>
20 #include <UT/UT_Vector3.h>
21 
22 class RE_OGLFramebuffer;
23 class RE_OGLTexture;
24 class RE_Render;
25 class RE_TextureCubeMap;
26 
27 
29 {
30 public:
31  RE_ReflectMap(const char *name);
32  ~RE_ReflectMap();
33 
35 
36  void setResolution(int size);
37  void setHDR(bool enable);
38  void setOrigin(UT_Vector3F org);
39  void setMipmap(bool enable);
40 
41  UT_Vector3F getOrigin() const { return myOrigin; }
42 
43  bool isDirty() const { return myChanged; }
44 
45  bool prepRender(RE_Render *r,
47  void doneRender(RE_Render *r);
48 
49  RE_OGLTexture *getReflectMap() const { return myColorTex; }
50 
51  void setVersion(int64 version) { myVersion = version; }
52  int64 getVersion() const { return myVersion; }
53 
54  void setFrameTime(fpreal t) { myTime = t; }
55  fpreal getFrameTime() const { return myTime; }
56 
57  bool createFBO(RE_Render *r);
58 
59 private:
60  void resetFBO();
61  static bool shTexDeleted(RE_OGLTexture *tex, void *rmapobj);
62 
63  UT_String myName;
64  int myRes;
65  bool myHDR;
66  UT_Vector3F myOrigin;
67 
68  RE_OGLFramebuffer *myFBO;
69  RE_OGLTexture *myColorTex;
70 
71  RE_TextureCubeMap *myCubeMap;
72 
73  bool myRenderFlag;
74  bool myChanged;
75  bool myMipmap;
76  int64 myVersion;
77  fpreal myTime;
78 };
79 #endif
RE_TextureCubeFace
#define RE_API
Definition: RE_API.h:10
void setFrameTime(fpreal t)
Definition: RE_ReflectMap.h:54
UT_Vector3F getOrigin() const
Definition: RE_ReflectMap.h:41
int64 getVersion() const
Definition: RE_ReflectMap.h:52
RE_OGLTexture * getReflectMap() const
Definition: RE_ReflectMap.h:49
__hostdev__ void setOrigin(const T &ijk)
Definition: NanoVDB.h:5762
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
long long int64
Definition: SYS_Types.h:116
GLuint const GLchar * name
Definition: glcorearb.h:786
void setVersion(int64 version)
Definition: RE_ReflectMap.h:51
GLdouble t
Definition: glad.h:2397
GT_API const UT_StringHolder version
GLsizeiptr size
Definition: glcorearb.h:664
fpreal64 fpreal
Definition: SYS_Types.h:278
bool isDirty() const
Definition: RE_ReflectMap.h:43
GLboolean r
Definition: glcorearb.h:1222
fpreal getFrameTime() const
Definition: RE_ReflectMap.h:55