HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_ReLightProxy.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: OBJ_ReLightProxy.h ( OBJ Library, C++)
7  *
8  * COMMENTS:
9  * Stand-in proxy for OBJ_ReLight. If OBJ_ReLight is not loaded (i.e.
10  * non-graphical apps), then the proxy does nothing.
11  */
12 
13 #ifndef __OBJ_ReLightProxy__
14 #define __OBJ_ReLightProxy__
15 
16 #include "OBJ_API.h"
17 
18 #include "OBJ_Light.h"
19 #include <UT/UT_Options.h>
20 #include <UT/UT_Ramp.h>
21 #include <UT/UT_UniquePtr.h>
22 #include <UT/UT_Vector3.h>
23 
24 class OBJ_Ambient;
25 class OBJ_ReLightProxy;
26 class RE_Light;
27 
28 typedef OBJ_ReLightProxy *(*OBJ_ReLightProxyCreateFunc)
29  (OBJ_Ambient *obj_light);
30 
31 // ==========================================================================
32 // OBJ_ReLightProxy declaration.
33 // ==========================================================================
35 {
36 public:
37  virtual ~OBJ_ReLightProxy();
38 
39  virtual RE_Light *getLight();
40  const UT_Options &getParms() const { return myParms; }
41 
42  static OBJ_ReLightProxy *create(OBJ_Ambient *obj_light);
43  static void registerCreateFunc(OBJ_ReLightProxyCreateFunc create_func);
44 
45  // Proxies for methods on the OBJ_ReLight object.
46  // In this base class, these proxies are just stubs.
47  virtual void enable(bool e);
48  virtual void bumpVersion();
49  virtual void setInfinite(int onoff);
50  virtual void setAmbient(int onoff);
51  virtual void setCone(int onoff);
52  virtual void setName(const char *name);
53  virtual void setPosition(const UT_Vector3 &p);
54  virtual void setDirection(const UT_Vector3 &d);
55  virtual void setOrientation(UT_Matrix3 &orient);
56  virtual void setColor(const UT_Vector3 &c);
57  virtual void setConeAttrib(float a, float d, float r);
58  virtual void setProjectMap(const char *name, const char *relativeTo);
59  virtual void setProjectMapClamp(int onoff);
60  virtual void setShadowed(bool onoff);
61  virtual void setShadowIntensity(float i);
62  virtual void setShadowBias(float b);
63  virtual void setShadowBlur(float b);
64  virtual void setShadowQuality(float q);
65  virtual void setShadowMask(const char *m);
66  virtual void setTransform(const UT_Matrix4 &m);
67  virtual void setFocalLength(float focal);
68  virtual void setAperture(float aper);
69  virtual void setNearDistance(float znear);
70  virtual void setFarDistance(float zfar);
71  virtual int isInfinite() const;
72  virtual void setOrthoWidth(float width);
73  virtual void setDiffuse(int onoff);
74  virtual void setSpecular(int onoff);
75  virtual void setArea(bool onoff);
76  virtual void setGlobalIllumination(bool onoff);
77  virtual void setPortal(bool onoff);
78  virtual void setAreaSide(bool single, bool reverse);
79  virtual void setAreaAxes(const UT_Vector3F &axes);
80  virtual void setSurfaceArea(float area);
81  virtual void setNormalizeArea(bool norm);
82  virtual void setAreaShape(OBJ_LightAreaShape shape);
83  virtual void setAreaTransform(UT_Matrix4 t);
84  virtual void setEnvironmentMap(const char *name, const char *relativeTo);
85  virtual void setEnvironment(bool onoff);
86  virtual void setEnvironmentMipmap(bool onoff);
87  virtual void setEnvironmentCone(float angle);
88  virtual bool isEnvironmentLight() const;
89  virtual void setAttenuation(float constant, float linear, float quadratic);
90  virtual void setAttenuationRange(float near_dist, float far_dist);
91  virtual void setAttenuationRamp(
92  const UT_Ramp *ramp, float start_dist, float end_dist);
93  virtual void setLightShadowMapSize(int s);
94  virtual void setFogIntensity(float i);
95  virtual void setFogScatter(float para, float perp);
96 
97 protected:
99 
102 private:
103  void verifySubclassOverride() const;
104 };
105 
106 
107 // ==========================================================================
108 // OBJ_ReLightProxy stub implementation.
109 // ==========================================================================
110 
112 {
113  verifySubclassOverride();
114  return NULL;
115 }
116 
117 inline void OBJ_ReLightProxy::enable(bool e)
118 { verifySubclassOverride(); }
119 
121 { verifySubclassOverride(); }
122 
123 inline void OBJ_ReLightProxy::setInfinite(int onoff)
124 { verifySubclassOverride(); }
125 
126 inline void OBJ_ReLightProxy::setAmbient(int onoff)
127 { verifySubclassOverride(); }
128 
129 inline void OBJ_ReLightProxy::setCone(int onoff)
130 { verifySubclassOverride(); }
131 
132 inline void OBJ_ReLightProxy::setName(const char *name)
133 { verifySubclassOverride(); }
134 
136 { verifySubclassOverride(); }
137 
139 { verifySubclassOverride(); }
140 
142 { verifySubclassOverride(); }
143 
145 { verifySubclassOverride(); }
146 
147 inline void OBJ_ReLightProxy::setConeAttrib(float a, float d, float r)
148 { verifySubclassOverride(); }
149 
151  const char *name, const char *relativeTo)
152 { verifySubclassOverride(); }
153 
155 { verifySubclassOverride(); }
156 
157 inline void OBJ_ReLightProxy::setShadowed(bool onoff)
158 { verifySubclassOverride(); }
159 
161 { verifySubclassOverride(); }
162 
164 { verifySubclassOverride(); }
165 
167 { verifySubclassOverride(); }
168 
170 { verifySubclassOverride(); }
171 
172 inline void OBJ_ReLightProxy::setShadowMask(const char *m)
173 { verifySubclassOverride(); }
174 
176 { verifySubclassOverride(); }
177 
178 inline void OBJ_ReLightProxy::setFocalLength(float focal)
179 { verifySubclassOverride(); }
180 
181 inline void OBJ_ReLightProxy::setAperture(float aper)
182 { verifySubclassOverride(); }
183 
184 inline void OBJ_ReLightProxy::setNearDistance(float znear)
185 { verifySubclassOverride(); }
186 
187 inline void OBJ_ReLightProxy::setFarDistance(float zfar)
188 { verifySubclassOverride(); }
189 
190 inline int OBJ_ReLightProxy::isInfinite() const
191 {
192  verifySubclassOverride();
193  return 0;
194 }
195 
197 { verifySubclassOverride(); }
198 
199 inline void OBJ_ReLightProxy::setDiffuse(int onoff)
200 { verifySubclassOverride(); }
201 
202 inline void OBJ_ReLightProxy::setSpecular(int onoff)
203 { verifySubclassOverride(); }
204 
205 inline void OBJ_ReLightProxy::setArea(bool onoff)
206 { verifySubclassOverride(); }
207 
209 { verifySubclassOverride(); }
210 
211 inline void OBJ_ReLightProxy::setPortal(bool onoff)
212 { verifySubclassOverride(); }
213 
214 inline void OBJ_ReLightProxy::setAreaSide(bool single, bool reverse)
215 { verifySubclassOverride(); }
216 
218 { verifySubclassOverride(); }
219 
221 { verifySubclassOverride(); }
222 
224 { verifySubclassOverride(); }
225 
227 { verifySubclassOverride(); }
228 
230 { verifySubclassOverride(); }
231 
233  const char *name, const char *relativeTo)
234 { verifySubclassOverride(); }
235 
236 inline void OBJ_ReLightProxy::setEnvironment(bool onoff)
237 { verifySubclassOverride(); }
238 
240 { verifySubclassOverride(); }
241 
243 { verifySubclassOverride(); }
244 
246 {
247  verifySubclassOverride();
248  return false;
249 }
250 
252  float constant, float linear, float quadratic)
253 { verifySubclassOverride(); }
254 
256  float near_dist, float far_dist)
257 { verifySubclassOverride(); }
258 
260  const UT_Ramp *ramp, float start_dist, float end_dist)
261 { verifySubclassOverride(); }
262 
264 { verifySubclassOverride(); }
265 
267 { verifySubclassOverride(); }
268 
269 inline void OBJ_ReLightProxy::setFogScatter(float,float)
270 { verifySubclassOverride(); }
271 
272 #endif
UT_UniquePtr< UT_Ramp > myAttenRamp
virtual void setEnvironment(bool onoff)
virtual void setLightShadowMapSize(int s)
virtual void setShadowIntensity(float i)
virtual void setFocalLength(float focal)
virtual void setAreaTransform(UT_Matrix4 t)
virtual void setSurfaceArea(float area)
virtual void setEnvironmentCone(float angle)
SIM_API const UT_StringHolder angle
virtual void setTransform(const UT_Matrix4 &m)
const UT_Options & getParms() const
virtual bool isEnvironmentLight() const
virtual void setShadowed(bool onoff)
virtual void setPortal(bool onoff)
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
void reverse(I begin, I end)
Definition: pugixml.cpp:7190
GLdouble s
Definition: glad.h:3009
OBJ_ReLightProxy *(* OBJ_ReLightProxyCreateFunc)(OBJ_Ambient *obj_light)
GLdouble GLdouble GLdouble q
Definition: glad.h:2445
virtual void setAreaShape(OBJ_LightAreaShape shape)
virtual void setAttenuationRamp(const UT_Ramp *ramp, float start_dist, float end_dist)
virtual void setNearDistance(float znear)
virtual void setProjectMapClamp(int onoff)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
virtual void setEnvironmentMipmap(bool onoff)
virtual void setFogScatter(float para, float perp)
virtual void setName(const char *name)
virtual void enable(bool e)
virtual void bumpVersion()
virtual void setAttenuation(float constant, float linear, float quadratic)
virtual void setProjectMap(const char *name, const char *relativeTo)
virtual void setArea(bool onoff)
virtual void setAperture(float aper)
OBJ_LightAreaShape
Definition: OBJ_Light.h:29
bool isInfinite(const float x)
Return true if x is an infinity value (either positive infinity or negative infinity).
Definition: Math.h:385
virtual void setAmbient(int onoff)
virtual void setAreaSide(bool single, bool reverse)
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void setInfinite(int onoff)
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
virtual void setConeAttrib(float a, float d, float r)
GA_API const UT_StringHolder orient
virtual void setOrientation(UT_Matrix3 &orient)
GLdouble t
Definition: glad.h:2397
virtual void setShadowMask(const char *m)
A map of string to various well defined value types.
Definition: UT_Options.h:84
virtual void setFogIntensity(float i)
virtual void setDiffuse(int onoff)
virtual void setCone(int onoff)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
virtual int isInfinite() const
virtual void setShadowBlur(float b)
virtual void setSpecular(int onoff)
virtual void setEnvironmentMap(const char *name, const char *relativeTo)
virtual void setGlobalIllumination(bool onoff)
GLint GLsizei width
Definition: glcorearb.h:103
virtual void setPosition(const UT_Vector3 &p)
virtual void setAreaAxes(const UT_Vector3F &axes)
virtual void setFarDistance(float zfar)
GLboolean r
Definition: glcorearb.h:1222
virtual void setDirection(const UT_Vector3 &d)
#define OBJ_API
Definition: OBJ_API.h:10
virtual void setShadowBias(float b)
virtual void setAttenuationRange(float near_dist, float far_dist)
virtual void setOrthoWidth(float width)
virtual void setColor(const UT_Vector3 &c)
virtual void setNormalizeArea(bool norm)
virtual RE_Light * getLight()
GA_API const UT_StringHolder area
virtual void setShadowQuality(float q)