Light - stingray.Light object reference - Stingray Lua API Reference
Describes a game light.
|
Indicates whether or not the light is tagged for baking and should be excluded when doing realtime lighting
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns boolean |
Returns true if the light is tagged for baking, and false otherwise.
|
|
Indicates whether or not the light casts shadows.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns boolean |
Returns true if the light casts shadows, and false otherwise.
|
|
color ( self ) : stingray.Vector3
Retrieves the color of the light.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns stingray.Vector3 |
The color of the light. The values for the X, Y and Z axes indicate the red, green,
and blue color channels respectively; each is a value in linear space between 0 and 1.
|
|
Retrieves the distance at which the light has reached zero intensity.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns number |
The distance at which the light has reached zero intensity.
|
|
Retrieves the distance at which the light starts to fall off: i.e., to lose its intensity.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns number |
The distance at which the light starts to lose its intensity.
|
|
Retrieves the intensity of the light.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns number |
The intensity of the light.
|
|
Determines whether this light should contribute to the realtime rendering path
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
enabled : | boolean | Use true to remove light from realtime rendering path. |
Returns | This function does not return any values. |
|
Determines whether or not the light casts shadows.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
enabled : | boolean | Use true to enable shadow casting, or false to disable. |
Returns | This function does not return any values. |
|
Sets the color of the light.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
color : | stingray.Vector3 | The color to set for the light. The values for the X, Y and Z axes indicate the red, green, and blue color channels respectively; each should be a value in linear space between 0 and 1. |
Returns | This function does not return any values. |
|
Sets the data of one light to another light in the unit.
|
Parameters Returns | This function does not return any values. |
|
Turns the light on or off.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
enabled : | boolean | Use true to enable the light, or false to disable. |
Returns | This function does not return any values. |
|
Sets the distance at which the light should reach zero intensity.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
distance : | number | The distance at which the light should reach zero intensity. |
Returns | This function does not return any values. |
|
Sets the distance at which the light start to fall off: i.e., to lose its intensity.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
distance : | number | The distance at which the light should start to lose its intensity. |
Returns | This function does not return any values. |
|
Sets the intensity of the light.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
intensity : | number | The intensity to set for the light. |
Returns | This function does not return any values. |
|
Sets the shadow depth bias value to use when rendering shadow maps (0-1 range).
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
value : | number | Shadow depth bias value to use when rendering shadow maps (0-1 range). |
Returns | This function does not return any values. |
A too low value causes shadow acne, a too high value causes peter panning.
|
Sets the cone angle at which the light has reached zero intensity.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
spot_angle_end : | number | The new cone angle, in radians. |
Returns | This function does not return any values. |
Valid only for spot lights.
|
Sets the cone angle at which the light starts to fall off.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
spot_angle_start : | number | The new cone angle, in radians. |
Returns | This function does not return any values. |
Valid only for spot lights.
|
Sets the type of the light source.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
type : | string | The type of the light source. Valid input values are: - omni: Radiates light in all directions.
- spot: A focused beam of light from a single point source.
- box: Radiates light from a single inner face of a box volume.
- directional: Parallel light rays.
|
Returns | This function does not return any values. |
|
Retrieves the user controlled shadow depth bias value (0-1 range).
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns number |
Returns user specified shadow depth bias (0-1 range).
|
A too low value causes shadow acne, a too high value causes peter panning.
|
Retrieves the cone angle at which the light has reached zero intensity.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns number |
The cone angle, in radians.
|
Valid only for spot lights.
|
Retrieves the cone angle at which the light starts to fall off.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns number |
The cone angle, in radians.
|
Valid only for spot lights.
|
type ( self ) : string
Retrieves the type of the light source.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns string |
The type of the light source. Can be any of :omni, spot, box or directional.
|
The functions in this group control the placement of an object of this type in the scene.
|
Returns the position and orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns
|
Returns the position of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns
|
Returns the orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns
|
node ( self ) : integer
Returns the ID of the specified object within the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns integer |
The ID of the specified object in the scene graph.
|
|
Sets the position and orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
parent : | stingray.Unit | The parent Unit that owns this object. |
pose : | stingray.Matrix4x4 | The new position and orientation for the object in local space. |
Returns | This function does not return any values. |
|
Sets the position of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
parent : | stingray.Unit | The parent Unit that owns this object. |
position : | stingray.Vector3 | The new position for the object in local space. |
Returns | This function does not return any values. |
|
Sets the orientation of the specified scene graph object in local space: i.e. relative to its parent in the scene graph.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
parent : | stingray.Unit | The parent Unit that owns this object. |
rotation : | stingray.Quaternion | The new rotation for the object in local space. |
Returns | This function does not return any values. |
|
Returns the position and orientation of the specified scene graph object in world space.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns
|
Returns the position of the specified scene graph object in world space.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns
|
Returns the rotation of the specified scene graph object in world space.
|
Parameters self : | stingray.Light | Specifies the object instance that this function will act on. You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation. |
Returns