Light
LightComponent Class
The LightComponent handles interactions with lights.
Syntax
Member Details
ComponentId Property
Retrieves the component id for this LightComponent.
SyntaxValue
The id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
ComponentType Field
Syntax
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetAngle Method
Retrieves the cone angle of this LightComponent.
SyntaxReturns
The angle in degrees.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetAngularFalloff Method
Retrieves the angular falloff of this LightComponent.
SyntaxReturns
The angular falloff.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetCastsShadows Method
Retrieves whether this LightComponent casts shadows.
SyntaxReturns
The shadow cast state.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetNearClip Method
Retrieves the near clip distance of this LightComponent.
SyntaxReturns
The near clip distance.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetNormalizedColor Method
Retrieves the normalized color of this LightComponent.
SyntaxReturns
The normalized color.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetRange Method
Retrieves the current range of this LightComponent.
SyntaxReturns
The range.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetRelativeIntensity Method
Retrieves the intensity of this LightComponent based on its normalized color.
SyntaxReturns
The intensity based on a normalized color.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetShadowPriority Method
Retrieves the shadow priority of this LightComponent.
SyntaxReturns
The shadow priority.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
IsScriptable Property
The scriptable flag for this LightComponent.
SyntaxValue
Whether or not this light can have properties changed by script.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
LightType Property
The light type for this LightComponent.
SyntaxValue
Light type enum for the light component.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Name Property
This LightComponent name, as specified in the editor.
SyntaxValue
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetAngle Method
Sets the cone angle for this LightComponent of type LightType.SpotLight.
SyntaxParameters
angle
The angle in degrees, 1 to 160.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetAngle Method
Sets the cone angle for this LightComponent of type LightType.SpotLight.
SyntaxParameters
angle
The angle in degrees, 1 to 160.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetAngle Method
Sets the cone angle for this LightComponent of type LightType.SpotLight.
SyntaxParameters
angle
The angle in degrees, 1 to 160.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetAngularFalloff Method
Sets the angular falloff for this LightComponent of type LightType.SpotLight.
SyntaxParameters
angularFalloff
The angular falloff, 0.01 to 1.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetAngularFalloff Method
Sets the angular falloff for this LightComponent of type LightType.SpotLight.
SyntaxParameters
angularFalloff
The angular falloff, 0.01 to 1.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetAngularFalloff Method
Sets the angular falloff for this LightComponent of type LightType.SpotLight.
SyntaxParameters
angularFalloff
The angular falloff, 0.01 to 1.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetCastsShadows Method
Sets whether shadows are cast from this LightComponent of type LightType.SpotLight.
SyntaxParameters
castsShadows
True to cast shadows.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetCastsShadows Method
Sets whether shadows are cast from this LightComponent of type LightType.SpotLight.
SyntaxParameters
castsShadows
True to cast shadows.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetCastsShadows Method
Sets whether shadows are cast from this LightComponent of type LightType.SpotLight.
SyntaxParameters
castsShadows
True to cast shadows.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetColorAndIntensity Method
Sets the color for this LightComponent.
SyntaxParameters
color
The color.
intensity
The intensity, 0 to 100.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetColorAndIntensity Method
Sets the color for this LightComponent.
SyntaxParameters
color
The color.
intensity
The intensity, 0 to 100.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetColorAndIntensity Method
Sets the color for this LightComponent.
SyntaxParameters
color
The color.
intensity
The intensity, 0 to 100.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetNearClip Method
Sets the near clip plane distance for this LightComponent of type LightType.SpotLight.
SyntaxParameters
nearClip
The near clip distance, 0 to 500.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetNearClip Method
Sets the near clip plane distance for this LightComponent of type LightType.SpotLight.
SyntaxParameters
nearClip
The near clip distance, 0 to 500.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetNearClip Method
Sets the near clip plane distance for this LightComponent of type LightType.SpotLight.
SyntaxParameters
nearClip
The near clip distance, 0 to 500.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetRange Method
Sets the range for this LightComponent.
SyntaxParameters
range
The range, 1 to 500.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetRange Method
Sets the range for this LightComponent.
SyntaxParameters
range
The range, 1 to 500.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetRange Method
Sets the range for this LightComponent.
SyntaxParameters
range
The range, 1 to 500.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetShadowPriority Method
Sets the shadow priority of this LightComponent of type LightType.SpotLight.
SyntaxParameters
shadowPriority
Shadow priority.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetShadowPriority Method
Sets the shadow priority of this LightComponent of type LightType.SpotLight.
SyntaxParameters
shadowPriority
Shadow priority.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetShadowPriority Method
Sets the shadow priority of this LightComponent of type LightType.SpotLight.
SyntaxParameters
shadowPriority
Shadow priority.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
ToString Method
A string representation of this object.
SyntaxReturns
A string representation of this object.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
LightType Enum
Enumeration for the different types of lights
Syntax
[Sansar.Script.Interface] public enum LightType
Remarks
Members
Directional
Lights that illuminate in a single direction across the entire scene.
Point
Lights that illuminate from a point outward in all directions.
Spot
Lights that illuminate from a point outward in a cone shape.
Requirements
Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Last updated