Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
AngelOgre_Light.h
Go to the documentation of this file.
1
2namespace AngelOgre { // Dummy namespace, just to distinguish AngelScript from C++
3
23 {
24 public:
25
28 void setType(LightTypes type);
29
33
44 void setDiffuseColour(float r, float g, float b);
45
49 void setDiffuseColour(const color& color);
50
53 const color& getDiffuseColour() const;
54
62 void setSpecularColour(float r, float g, float b);
63
67 void setSpecularColour(const color& color);
68
71 const color& getSpecularColour() const;
72
87 void setAttenuation(float range, float constant, float linear, float quadratic);
88
91 float getAttenuationRange() const;
92
96
99 float getAttenuationLinear() const;
100
104
112 void setPosition(float x, float y, float z);
113
119 void setPosition(const vector3& pos);
120
124 const vector3& getPosition() const;
125
134 void setDirection(float x, float y, float z);
135
142 void setDirection(const vector3& direction);
143
147 const vector3& getDirection() const;
148
159 void setSpotlightRange(const radian& innerAngle, const radian& outerAngle, float falloff = 1.0f);
160
163 const radian& getSpotlightInnerAngle() const;
164
167 const radian& getSpotlightOuterAngle() const;
168
171 float getSpotlightFalloff() const;
172
180 void setPowerScale(float power);
181
184 float getPowerScale() const;
185
195 void setCastShadows(bool enabled);
196
199 bool getCastShadows() const;
200
203 const vector3& getDerivedPosition() const;
204
207 const vector3& getDerivedDirection() const;
208
209 // Inherited from MovableObject
210
212 const string& getName() const;
213
215 const string& getMovableType() const;
216
220
224
226 bool isAttached() const;
227
230
234 bool isInScene() const;
235
239 float getBoundingRadius() const;
240
243 void setVisible(bool visible);
244
247 bool getVisible() const;
248
251 bool isVisible() const;
252
256 void setRenderingDistance(float dist);
257
259 float getRenderingDistance() const;
260
264 void setRenderingMinPixelSize(float pixelSize);
265
269 };
270
273
274} // namespace AngelOgre (dummy, just to distinguish AngelScript from C++)
Representation of a dynamic light source in the scene.
void detachFromParent()
Detaches an object from a parent SceneNode or TagPoint, if attached.
float getAttenuationQuadric() const
Returns the quadric factor in the attenuation formula.
void setSpecularColour(const color &color)
Sets the color of the specular light given off by this source.
float getRenderingMinPixelSize() const
Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered.
void setDirection(float x, float y, float z)
Sets the direction in which a light points.
const vector3 & getPosition() const
Returns the position of the light.
float getAttenuationConstant() const
Returns the constant factor in the attenuation formula.
void setRenderingMinPixelSize(float pixelSize)
Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered.
const vector3 & getDirection() const
Returns the light's direction.
Node getParentNode() const
Returns the node to which this object is attached.
void setPosition(float x, float y, float z)
Sets the position of the light.
const radian & getSpotlightOuterAngle() const
Returns the angle covered by the spotlights outer cone.
bool isInScene() const
Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is ...
bool isVisible() const
Returns whether or not this object is supposed to be visible or not.
void setCastShadows(bool enabled)
Sets whether or not this light should cast shadows.
float getRenderingDistance() const
Gets the distance at which batches are no longer rendered.
const color & getDiffuseColour() const
Returns the color of the diffuse light given off by this light source (see setDiffuseColour for more ...
float getAttenuationLinear() const
Returns the linear factor in the attenuation formula.
SceneNode getParentSceneNode() const
Returns the scene node to which this object is attached.
void setRenderingDistance(float dist)
Sets the distance at which the object is no longer rendered.
float getBoundingRadius() const
Retrieves the radius of the origin-centered bounding sphere for this object.
LightTypes getType() const
Returns the light type.
void setDirection(const vector3 &direction)
Sets the direction in which a light points.
bool isAttached() const
Returns true if this object is attached to a SceneNode or TagPoint.
float getAttenuationRange() const
Returns the absolute upper range of the light.
float getPowerScale() const
Returns the scaling factor which indicates the relative power of a light.
void setSpecularColour(float r, float g, float b)
Sets the color of the specular light given off by this source.
bool getCastShadows() const
Returns whether or not this light casts shadows.
const vector3 & getDerivedPosition() const
Gets the position of the light including any transform from nodes it is attached to.
void setAttenuation(float range, float constant, float linear, float quadratic)
Sets the attenuation parameters for this light source.
void setPowerScale(float power)
Set a scaling factor to indicate the relative power of a light.
void setSpotlightRange(const radian &innerAngle, const radian &outerAngle, float falloff=1.0f)
Sets the range of a spotlight, i.e.
const color & getSpecularColour() const
Returns the color of specular light given off by this light source.
void setDiffuseColour(const color &color)
Sets the color of the diffuse light given off by this source.
const vector3 & getDerivedDirection() const
Gets the direction of the light including any transform from nodes it is attached to.
const string & getName() const
Returns the name of this object.
void setType(LightTypes type)
Sets the type of light - see LightTypes for more info.
void setVisible(bool visible)
Tells this object whether to be visible or not, if it has a renderable component.
void setPosition(const vector3 &pos)
Sets the position of the light.
bool getVisible() const
Gets this object whether to be visible or not, if it has a renderable component.
void setDiffuseColour(float r, float g, float b)
Sets the color of the diffuse light given off by this source.
float getSpotlightFalloff() const
Returns the falloff between the inner and outer cones of the spotlight.
const string & getMovableType() const
Returns the type name of this object.
const radian & getSpotlightInnerAngle() const
Returns the angle covered by the spotlights inner cone.
Abstract class defining a movable object in a scene.
Class representing a node in the scene graph.
LightTypes
Enumerates the types of light sources available.
OGRE-AngelScript bindings; Actually named Ogre in the scripts, just changed for docs to separate thin...