![]() |
Rigs of Rods 2023.09
Soft-body Physics Simulation
|
Representation of a dynamic light source in the scene. More...
#include <AngelOgre_Light.h>
Inheritance diagram for AngelOgre::Light:Public Member Functions | |
| void | setType (LightTypes type) |
| Sets the type of light - see LightTypes for more info. | |
| LightTypes | getType () const |
| Returns the light type. | |
| void | setDiffuseColour (float r, float g, float b) |
| Sets the color of the diffuse light given off by this source. | |
| void | setDiffuseColour (const color &color) |
| Sets the color of the diffuse light given off by this source. | |
| const color & | getDiffuseColour () const |
| Returns the color of the diffuse light given off by this light source (see setDiffuseColour for more info). | |
| void | setSpecularColour (float r, float g, float b) |
| Sets the color of the specular light given off by this source. | |
| void | setSpecularColour (const color &color) |
| Sets the color of the specular light given off by this source. | |
| const color & | getSpecularColour () const |
| Returns the color of specular light given off by this light source. | |
| void | setAttenuation (float range, float constant, float linear, float quadratic) |
| Sets the attenuation parameters for this light source. | |
| float | getAttenuationRange () const |
| Returns the absolute upper range of the light. | |
| float | getAttenuationConstant () const |
| Returns the constant factor in the attenuation formula. | |
| float | getAttenuationLinear () const |
| Returns the linear factor in the attenuation formula. | |
| float | getAttenuationQuadric () const |
| Returns the quadric factor in the attenuation formula. | |
| void | setPosition (float x, float y, float z) |
| Sets the position of the light. | |
| void | setPosition (const vector3 &pos) |
| Sets the position of the light. | |
| const vector3 & | getPosition () const |
| Returns the position of the light. | |
| void | setDirection (float x, float y, float z) |
| Sets the direction in which a light points. | |
| void | setDirection (const vector3 &direction) |
| Sets the direction in which a light points. | |
| const vector3 & | getDirection () const |
| Returns the light's direction. | |
| void | setSpotlightRange (const radian &innerAngle, const radian &outerAngle, float falloff=1.0f) |
| Sets the range of a spotlight, i.e. | |
| const radian & | getSpotlightInnerAngle () const |
| Returns the angle covered by the spotlights inner cone. | |
| const radian & | getSpotlightOuterAngle () const |
| Returns the angle covered by the spotlights outer cone. | |
| float | getSpotlightFalloff () const |
| Returns the falloff between the inner and outer cones of the spotlight. | |
| void | setPowerScale (float power) |
| Set a scaling factor to indicate the relative power of a light. | |
| float | getPowerScale () const |
| Returns the scaling factor which indicates the relative power of a light. | |
| void | setCastShadows (bool enabled) |
| Sets whether or not this light should cast shadows. | |
| 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. | |
| 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. | |
| const string & | getMovableType () const |
| Returns the type name of this object. | |
| Node | getParentNode () const |
| Returns the node to which this object is attached. | |
| SceneNode | getParentSceneNode () const |
| Returns the scene node to which this object is attached. | |
| bool | isAttached () const |
| Returns true if this object is attached to a SceneNode or TagPoint. | |
| void | detachFromParent () |
| Detaches an object from a parent SceneNode or TagPoint, if attached. | |
| bool | isInScene () const |
| Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph. | |
| float | getBoundingRadius () const |
| Retrieves the radius of the origin-centered bounding sphere for this object. | |
| void | setVisible (bool visible) |
| Tells this object whether to be visible or not, if it has a renderable component. | |
| bool | getVisible () const |
| Gets this object whether to be visible or not, if it has a renderable component. | |
| bool | isVisible () const |
| Returns whether or not this object is supposed to be visible or not. | |
| void | setRenderingDistance (float dist) |
| Sets the distance at which the object is no longer rendered. | |
| float | getRenderingDistance () const |
| Gets the distance at which batches are no longer rendered. | |
| void | setRenderingMinPixelSize (float pixelSize) |
| Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
| float | getRenderingMinPixelSize () const |
| Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
Additional Inherited Members | |
Private Member Functions inherited from AngelOgre::MovableObject | |
| const string & | getName (void) const |
| Returns the name of this object. | |
| const string & | getMovableType (void) const |
| Returns the type name of this object. | |
| Node * | getParentNode (void) const |
| Returns the node to which this object is attached. | |
| SceneNode | getParentSceneNode (void) const |
| Returns the scene node to which this object is attached. | |
| bool | isParentTagPoint () const |
| Gets whether the parent node is a TagPoint (or a SceneNode) | |
| bool | isAttached (void) const |
| Returns true if this object is attached to a SceneNode or TagPoint. | |
| void | detachFromParent (void) |
| Detaches an object from a parent SceneNode or TagPoint, if attached. | |
| bool | isInScene (void) const |
| Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph. | |
| float | getBoundingRadius (void) const |
| Retrieves the local axis-aligned bounding box for this object. | |
| void | setVisible (bool visible) |
| Tells this object whether to be visible or not, if it has a renderable component. | |
| bool | getVisible (void) const |
| Gets this object whether to be visible or not, if it has a renderable component. | |
| bool | isVisible (void) const |
| Returns whether or not this object is supposed to be visible or not. | |
| void | setRenderingDistance (float dist) |
| Sets the distance at which the object is no longer rendered. | |
| float | getRenderingDistance (void) const |
| Gets the distance at which batches are no longer rendered. | |
| void | setRenderingMinPixelSize (float pixelSize) |
| Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
| float | getRenderingMinPixelSize () const |
| Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
| void | setCastShadows (bool enabled) |
| Return an instance of user objects binding associated with this class. | |
| bool | getCastShadows (void) const |
| Returns whether shadow casting is enabled for this object. | |
| void | setDebugDisplayEnabled (bool enabled) |
| Sets whether or not the debug display of this object is enabled. | |
| bool | isDebugDisplayEnabled (void) const |
| Gets whether debug display of this object is enabled. | |
Representation of a dynamic light source in the scene.
Definition at line 33 of file AngelOgre_Light.h.
| void AngelOgre::Light::detachFromParent | ( | ) |
Detaches an object from a parent SceneNode or TagPoint, if attached.
| float AngelOgre::Light::getAttenuationConstant | ( | ) | const |
Returns the constant factor in the attenuation formula.
| float AngelOgre::Light::getAttenuationLinear | ( | ) | const |
Returns the linear factor in the attenuation formula.
| float AngelOgre::Light::getAttenuationQuadric | ( | ) | const |
Returns the quadric factor in the attenuation formula.
| float AngelOgre::Light::getAttenuationRange | ( | ) | const |
Returns the absolute upper range of the light.
| float AngelOgre::Light::getBoundingRadius | ( | ) | const |
Retrieves the radius of the origin-centered bounding sphere for this object.
| bool AngelOgre::Light::getCastShadows | ( | ) | const |
Returns whether or not this light casts shadows.
| const vector3 & AngelOgre::Light::getDerivedDirection | ( | ) | const |
Gets the direction of the light including any transform from nodes it is attached to.
| const vector3 & AngelOgre::Light::getDerivedPosition | ( | ) | const |
Gets the position of the light including any transform from nodes it is attached to.
| const color & AngelOgre::Light::getDiffuseColour | ( | ) | const |
Returns the color of the diffuse light given off by this light source (see setDiffuseColour for more info).
| const vector3 & AngelOgre::Light::getDirection | ( | ) | const |
Returns the light's direction.
| const string & AngelOgre::Light::getMovableType | ( | ) | const |
Returns the type name of this object.
| const string & AngelOgre::Light::getName | ( | ) | const |
Returns the name of this object.
| Node AngelOgre::Light::getParentNode | ( | ) | const |
Returns the node to which this object is attached.
| SceneNode AngelOgre::Light::getParentSceneNode | ( | ) | const |
Returns the scene node to which this object is attached.
| const vector3 & AngelOgre::Light::getPosition | ( | ) | const |
Returns the position of the light.
| float AngelOgre::Light::getPowerScale | ( | ) | const |
Returns the scaling factor which indicates the relative power of a light.
| float AngelOgre::Light::getRenderingDistance | ( | ) | const |
Gets the distance at which batches are no longer rendered.
| float AngelOgre::Light::getRenderingMinPixelSize | ( | ) | const |
Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered.
| const color & AngelOgre::Light::getSpecularColour | ( | ) | const |
Returns the color of specular light given off by this light source.
| float AngelOgre::Light::getSpotlightFalloff | ( | ) | const |
Returns the falloff between the inner and outer cones of the spotlight.
| const radian & AngelOgre::Light::getSpotlightInnerAngle | ( | ) | const |
Returns the angle covered by the spotlights inner cone.
| const radian & AngelOgre::Light::getSpotlightOuterAngle | ( | ) | const |
Returns the angle covered by the spotlights outer cone.
| LightTypes AngelOgre::Light::getType | ( | ) | const |
Returns the light type.
| bool AngelOgre::Light::getVisible | ( | ) | const |
Gets this object whether to be visible or not, if it has a renderable component.
| bool AngelOgre::Light::isAttached | ( | ) | const |
Returns true if this object is attached to a SceneNode or TagPoint.
| bool AngelOgre::Light::isInScene | ( | ) | const |
| bool AngelOgre::Light::isVisible | ( | ) | const |
Returns whether or not this object is supposed to be visible or not.
| void AngelOgre::Light::setAttenuation | ( | float | range, |
| float | constant, | ||
| float | linear, | ||
| float | quadratic | ||
| ) |
Sets the attenuation parameters for this light source.
1 / (constant + linear * distance + quadric * distance^2) | range | The absolute upper range of the light in world units. If set to 0, light is attenuated to zero by the quadratic factor. In this case, the light will be visible up to infinity. |
| constant | Constant factor, 1.0 means never attenuate, 0.0 is complete attenuation. |
| linear | The linear factor, 1 means attenuate evenly over the distance. |
| quadratic | The quadratic factor, adds a curvature to the attenuation formula. |
| void AngelOgre::Light::setCastShadows | ( | bool | enabled | ) |
Sets whether or not this light should cast shadows.
| void AngelOgre::Light::setDiffuseColour | ( | const color & | color | ) |
Sets the color of the diffuse light given off by this source.
| color | The color value |
| void AngelOgre::Light::setDiffuseColour | ( | float | r, |
| float | g, | ||
| float | b | ||
| ) |
Sets the color of the diffuse light given off by this source.
| r | Red component (0.0 to 1.0) |
| g | Green component (0.0 to 1.0) |
| b | Blue component (0.0 to 1.0) |
| void AngelOgre::Light::setDirection | ( | const vector3 & | direction | ) |
Sets the direction in which a light points.
| direction | Vector with direction |
| void AngelOgre::Light::setDirection | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Sets the direction in which a light points.
| x | X component |
| y | Y component |
| z | Z component |
| void AngelOgre::Light::setPosition | ( | const vector3 & | pos | ) |
Sets the position of the light.
| pos | Vector with the position |
| void AngelOgre::Light::setPosition | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Sets the position of the light.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| void AngelOgre::Light::setPowerScale | ( | float | power | ) |
Set a scaling factor to indicate the relative power of a light.
| power | The power rating of this light, default is 1.0. |
| void AngelOgre::Light::setRenderingDistance | ( | float | dist | ) |
Sets the distance at which the object is no longer rendered.
| dist | Distance beyond which the object will not be rendered. |
| void AngelOgre::Light::setRenderingMinPixelSize | ( | float | pixelSize | ) |
Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered.
| pixelSize | Number of minimum pixels. |
| void AngelOgre::Light::setSpecularColour | ( | const color & | color | ) |
Sets the color of the specular light given off by this source.
| color | The color value |
| void AngelOgre::Light::setSpecularColour | ( | float | r, |
| float | g, | ||
| float | b | ||
| ) |
Sets the color of the specular light given off by this source.
| r | Red component (0.0 to 1.0) |
| g | Green component (0.0 to 1.0) |
| b | Blue component (0.0 to 1.0) |
| void AngelOgre::Light::setSpotlightRange | ( | const radian & | innerAngle, |
| const radian & | outerAngle, | ||
| float | falloff = 1.0f |
||
| ) |
Sets the range of a spotlight, i.e.
the angle of the inner and outer cones and the rate of falloff between them.
| innerAngle | Angle covered by the bright inner cone. The inner cone is at maximum brightness. |
| outerAngle | Angle covered by the outer cone. The light attenuates from the inner cone to the outer cone. Outside the outer cone the light has zero intensity. |
| falloff | The rate of falloff between the inner and outer cones. 1.0 means a linear falloff, less means slower falloff, higher means faster falloff. Applicable to spotlights only. |
| void AngelOgre::Light::setType | ( | LightTypes | type | ) |
Sets the type of light - see LightTypes for more info.
| void AngelOgre::Light::setVisible | ( | bool | visible | ) |
Tells this object whether to be visible or not, if it has a renderable component.