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_Vector3.h>
20 
21 class OBJ_Ambient;
22 class OBJ_ReLightProxy;
23 class RE_Light;
24 class UT_Ramp;
25 
26 typedef OBJ_ReLightProxy *(*OBJ_ReLightProxyCreateFunc)
27  (OBJ_Ambient *obj_light);
28 
29 // ==========================================================================
30 // OBJ_ReLightProxy declaration.
31 // ==========================================================================
33 {
34 public:
35  virtual ~OBJ_ReLightProxy();
36 
37  virtual RE_Light *getLight();
38 
39  static OBJ_ReLightProxy *create(OBJ_Ambient *obj_light);
40  static void registerCreateFunc(OBJ_ReLightProxyCreateFunc create_func);
41 
42  // Proxies for methods on the OBJ_ReLight object.
43  // In this base class, these proxies are just stubs.
44  virtual void enable(bool e);
45  virtual void setInfinite(int onoff);
46  virtual void setAmbient(int onoff);
47  virtual void setCone(int onoff);
48  virtual void setName(const char *name);
49  virtual void setPosition(const UT_Vector3 &p);
50  virtual void setDirection(const UT_Vector3 &d);
51  virtual void setOrientation(UT_Matrix3 &orient);
52  virtual void setColor(const UT_Vector3 &c);
53  virtual void setConeAttrib(float a, float d, float r);
54  virtual void setProjectMap(const char *name, const char *relativeTo);
55  virtual void setProjectMapClamp(int onoff);
56  virtual void setShadowed(bool onoff);
57  virtual void setShadowIntensity(float i);
58  virtual void setShadowBias(float b);
59  virtual void setShadowBlur(float b);
60  virtual void setShadowQuality(float q);
61  virtual void setShadowMask(const char *m);
62  virtual void setTransform(const UT_Matrix4 &m);
63  virtual void setFocalLength(float focal);
64  virtual void setAperture(float aper);
65  virtual void setNearDistance(float znear);
66  virtual void setFarDistance(float zfar);
67  virtual int isInfinite() const;
68  virtual void setOrthoWidth(float width);
69  virtual void setDiffuse(int onoff);
70  virtual void setSpecular(int onoff);
71  virtual void setArea(bool onoff);
72  virtual void setGlobalIllumination(bool onoff);
73  virtual void setPortal(bool onoff);
74  virtual void setAreaSide(bool single, bool reverse);
75  virtual void setAreaAxes(const UT_Vector3F &axes);
76  virtual void setSurfaceArea(float area);
77  virtual void setAreaShadowShape(OBJ_LightAreaShape shape);
78  virtual void setAreaTransform(UT_Matrix4 t);
79  virtual void setEnvironmentMap(const char *name, const char *relativeTo);
80  virtual void setEnvironment(bool onoff);
81  virtual void setEnvironmentMipmap(bool onoff);
82  virtual void setEnvironmentCone(float angle);
83  virtual bool isEnvironmentLight() const;
84  virtual void setAttenuation(float constant, float linear, float quadratic);
85  virtual void setAttenuationRange(float near_dist, float far_dist);
86  virtual void setAttenuationRamp(
87  const UT_Ramp *ramp, float start_dist, float end_dist);
88  virtual void setLightShadowMapSize(int s);
89 
90 protected:
92 
93 private:
94  void verifySubclassOverride() const;
95 };
96 
97 
98 // ==========================================================================
99 // OBJ_ReLightProxy stub implementation.
100 // ==========================================================================
101 
103 {
104  verifySubclassOverride();
105  return NULL;
106 }
107 
108 inline void OBJ_ReLightProxy::enable(bool e)
109 { verifySubclassOverride(); }
110 
111 inline void OBJ_ReLightProxy::setInfinite(int onoff)
112 { verifySubclassOverride(); }
113 
114 inline void OBJ_ReLightProxy::setAmbient(int onoff)
115 { verifySubclassOverride(); }
116 
117 inline void OBJ_ReLightProxy::setCone(int onoff)
118 { verifySubclassOverride(); }
119 
120 inline void OBJ_ReLightProxy::setName(const char *name)
121 { verifySubclassOverride(); }
122 
124 { verifySubclassOverride(); }
125 
127 { verifySubclassOverride(); }
128 
130 { verifySubclassOverride(); }
131 
133 { verifySubclassOverride(); }
134 
135 inline void OBJ_ReLightProxy::setConeAttrib(float a, float d, float r)
136 { verifySubclassOverride(); }
137 
139  const char *name, const char *relativeTo)
140 { verifySubclassOverride(); }
141 
143 { verifySubclassOverride(); }
144 
145 inline void OBJ_ReLightProxy::setShadowed(bool onoff)
146 { verifySubclassOverride(); }
147 
149 { verifySubclassOverride(); }
150 
152 { verifySubclassOverride(); }
153 
155 { verifySubclassOverride(); }
156 
158 { verifySubclassOverride(); }
159 
160 inline void OBJ_ReLightProxy::setShadowMask(const char *m)
161 { verifySubclassOverride(); }
162 
164 { verifySubclassOverride(); }
165 
166 inline void OBJ_ReLightProxy::setFocalLength(float focal)
167 { verifySubclassOverride(); }
168 
169 inline void OBJ_ReLightProxy::setAperture(float aper)
170 { verifySubclassOverride(); }
171 
172 inline void OBJ_ReLightProxy::setNearDistance(float znear)
173 { verifySubclassOverride(); }
174 
175 inline void OBJ_ReLightProxy::setFarDistance(float zfar)
176 { verifySubclassOverride(); }
177 
178 inline int OBJ_ReLightProxy::isInfinite() const
179 {
180  verifySubclassOverride();
181  return 0;
182 }
183 
185 { verifySubclassOverride(); }
186 
187 inline void OBJ_ReLightProxy::setDiffuse(int onoff)
188 { verifySubclassOverride(); }
189 
190 inline void OBJ_ReLightProxy::setSpecular(int onoff)
191 { verifySubclassOverride(); }
192 
193 inline void OBJ_ReLightProxy::setArea(bool onoff)
194 { verifySubclassOverride(); }
195 
197 { verifySubclassOverride(); }
198 
199 inline void OBJ_ReLightProxy::setPortal(bool onoff)
200 { verifySubclassOverride(); }
201 
202 inline void OBJ_ReLightProxy::setAreaSide(bool single, bool reverse)
203 { verifySubclassOverride(); }
204 
206 { verifySubclassOverride(); }
207 
209 { verifySubclassOverride(); }
210 
212 { verifySubclassOverride(); }
213 
215 { verifySubclassOverride(); }
216 
218  const char *name, const char *relativeTo)
219 { verifySubclassOverride(); }
220 
221 inline void OBJ_ReLightProxy::setEnvironment(bool onoff)
222 { verifySubclassOverride(); }
223 
225 { verifySubclassOverride(); }
226 
228 { verifySubclassOverride(); }
229 
231 {
232  verifySubclassOverride();
233  return false;
234 }
235 
237  float constant, float linear, float quadratic)
238 { verifySubclassOverride(); }
239 
241  float near_dist, float far_dist)
242 { verifySubclassOverride(); }
243 
245  const UT_Ramp *ramp, float start_dist, float end_dist)
246 { verifySubclassOverride(); }
247 
249 { verifySubclassOverride(); }
250 
251 #endif
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)
virtual void setTransform(const UT_Matrix4 &m)
virtual bool isEnvironmentLight() const
virtual void setAreaShadowShape(OBJ_LightAreaShape shape)
virtual void setShadowed(bool onoff)
virtual void setPortal(bool onoff)
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
OBJ_ReLightProxy *(* OBJ_ReLightProxyCreateFunc)(OBJ_Ambient *obj_light)
virtual void setAttenuationRamp(const UT_Ramp *ramp, float start_dist, float end_dist)
png_uint_32 i
Definition: png.h:2877
virtual void setNearDistance(float znear)
virtual void setProjectMapClamp(int onoff)
bool isInfinite(const Tuple< SIZE, T > &t)
Return true if an Inf is present in the tuple.
Definition: Tuple.h:247
GLint GLsizei width
Definition: glcorearb.h:102
virtual void setEnvironmentMipmap(bool onoff)
virtual void setName(const char *name)
virtual void enable(bool e)
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
virtual void setAmbient(int onoff)
T angle(const Vec2< T > &v1, const Vec2< T > &v2)
Definition: Vec2.h:472
virtual void setAreaSide(bool single, bool reverse)
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual void setInfinite(int onoff)
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
virtual void setConeAttrib(float a, float d, float r)
GA_API const UT_StringHolder orient
virtual void setOrientation(UT_Matrix3 &orient)
virtual void setShadowMask(const char *m)
virtual void setDiffuse(int onoff)
virtual void setCone(int onoff)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
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)
virtual void setPosition(const UT_Vector3 &p)
virtual void setAreaAxes(const UT_Vector3F &axes)
virtual void setFarDistance(float zfar)
GLboolean r
Definition: glcorearb.h:1221
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 RE_Light * getLight()
GA_API const UT_StringHolder area
virtual void setShadowQuality(float q)