HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 needConeGLReset(int f);
55  virtual void setProjectMap(const char *name, const char *relativeTo);
56  virtual void setProjectMapClamp(int onoff);
57  virtual void setShadowed(bool onoff);
58  virtual void setShadowIntensity(float i);
59  virtual void setShadowBias(float b);
60  virtual void setShadowBlur(float b);
61  virtual void setShadowQuality(float q);
62  virtual void setShadowMask(const char *m);
63  virtual void setTransform(const UT_Matrix4 &m);
64  virtual void setFocalLength(float focal);
65  virtual void setAperture(float aper);
66  virtual void setNearDistance(float znear);
67  virtual void setFarDistance(float zfar);
68  virtual int isInfinite() const;
69  virtual void setOrthoWidth(float width);
70  virtual void setDiffuse(int onoff);
71  virtual void setSpecular(int onoff);
72  virtual void setArea(bool onoff);
73  virtual void setGlobalIllumination(bool onoff);
74  virtual void setPortal(bool onoff);
75  virtual void setAreaSide(bool single, bool reverse);
76  virtual void setAreaAxes(const UT_Vector3F &axes);
77  virtual void setSurfaceArea(float area);
78  virtual void setAreaShadowShape(OBJ_LightAreaShape shape);
79  virtual void setAreaTransform(UT_Matrix4 t);
80  virtual void setEnvironmentMap(const char *name, const char *relativeTo);
81  virtual void setEnvironment(bool onoff);
82  virtual void setEnvironmentMipmap(bool onoff);
83  virtual void setEnvironmentCone(float angle);
84  virtual bool isEnvironmentLight() const;
85  virtual void setAttenuation(float constant, float linear, float quadratic);
86  virtual void setAttenuationRange(float near_dist, float far_dist);
87  virtual void setAttenuationRamp(
88  const UT_Ramp *ramp, float start_dist, float end_dist);
89  virtual void setLightShadowMapSize(int s);
90 
91 protected:
93 
94 private:
95  void verifySubclassOverride() const;
96 };
97 
98 
99 // ==========================================================================
100 // OBJ_ReLightProxy stub implementation.
101 // ==========================================================================
102 
104 {
105  verifySubclassOverride();
106  return NULL;
107 }
108 
109 inline void OBJ_ReLightProxy::enable(bool e)
110 { verifySubclassOverride(); }
111 
112 inline void OBJ_ReLightProxy::setInfinite(int onoff)
113 { verifySubclassOverride(); }
114 
115 inline void OBJ_ReLightProxy::setAmbient(int onoff)
116 { verifySubclassOverride(); }
117 
118 inline void OBJ_ReLightProxy::setCone(int onoff)
119 { verifySubclassOverride(); }
120 
121 inline void OBJ_ReLightProxy::setName(const char *name)
122 { verifySubclassOverride(); }
123 
125 { verifySubclassOverride(); }
126 
128 { verifySubclassOverride(); }
129 
131 { verifySubclassOverride(); }
132 
134 { verifySubclassOverride(); }
135 
136 inline void OBJ_ReLightProxy::setConeAttrib(float a, float d, float r)
137 { verifySubclassOverride(); }
138 
140 { verifySubclassOverride(); }
141 
143  const char *name, const char *relativeTo)
144 { verifySubclassOverride(); }
145 
147 { verifySubclassOverride(); }
148 
149 inline void OBJ_ReLightProxy::setShadowed(bool onoff)
150 { verifySubclassOverride(); }
151 
153 { verifySubclassOverride(); }
154 
156 { verifySubclassOverride(); }
157 
159 { verifySubclassOverride(); }
160 
162 { verifySubclassOverride(); }
163 
164 inline void OBJ_ReLightProxy::setShadowMask(const char *m)
165 { verifySubclassOverride(); }
166 
168 { verifySubclassOverride(); }
169 
170 inline void OBJ_ReLightProxy::setFocalLength(float focal)
171 { verifySubclassOverride(); }
172 
173 inline void OBJ_ReLightProxy::setAperture(float aper)
174 { verifySubclassOverride(); }
175 
176 inline void OBJ_ReLightProxy::setNearDistance(float znear)
177 { verifySubclassOverride(); }
178 
179 inline void OBJ_ReLightProxy::setFarDistance(float zfar)
180 { verifySubclassOverride(); }
181 
182 inline int OBJ_ReLightProxy::isInfinite() const
183 {
184  verifySubclassOverride();
185  return 0;
186 }
187 
189 { verifySubclassOverride(); }
190 
191 inline void OBJ_ReLightProxy::setDiffuse(int onoff)
192 { verifySubclassOverride(); }
193 
194 inline void OBJ_ReLightProxy::setSpecular(int onoff)
195 { verifySubclassOverride(); }
196 
197 inline void OBJ_ReLightProxy::setArea(bool onoff)
198 { verifySubclassOverride(); }
199 
201 { verifySubclassOverride(); }
202 
203 inline void OBJ_ReLightProxy::setPortal(bool onoff)
204 { verifySubclassOverride(); }
205 
206 inline void OBJ_ReLightProxy::setAreaSide(bool single, bool reverse)
207 { verifySubclassOverride(); }
208 
210 { verifySubclassOverride(); }
211 
213 { verifySubclassOverride(); }
214 
216 { verifySubclassOverride(); }
217 
219 { verifySubclassOverride(); }
220 
222  const char *name, const char *relativeTo)
223 { verifySubclassOverride(); }
224 
225 inline void OBJ_ReLightProxy::setEnvironment(bool onoff)
226 { verifySubclassOverride(); }
227 
229 { verifySubclassOverride(); }
230 
232 { verifySubclassOverride(); }
233 
235 {
236  verifySubclassOverride();
237  return false;
238 }
239 
241  float constant, float linear, float quadratic)
242 { verifySubclassOverride(); }
243 
245  float near_dist, float far_dist)
246 { verifySubclassOverride(); }
247 
249  const UT_Ramp *ramp, float start_dist, float end_dist)
250 { verifySubclassOverride(); }
251 
253 { verifySubclassOverride(); }
254 
255 #endif
virtual void needConeGLReset(int f)
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)
GLint GLsizei width
Definition: glcorearb.h:102
virtual void setEnvironmentMipmap(bool onoff)
virtual void setName(const char *name)
virtual void enable(bool e)
GLfloat f
Definition: glcorearb.h:1925
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:480
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)