Light

LightComponent Class

The LightComponent handles interactions with lights.

Syntax

Member Details

ComponentId Property

Retrieves the component id for this LightComponent.

Syntax

Value

The id.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


ComponentType Field

Syntax

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


GetAngle Method

Retrieves the cone angle of this LightComponent.

Syntax

[Sansar.Script.Interface] public float GetAngle ()

Returns

The angle in degrees.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


GetAngularFalloff Method

Retrieves the angular falloff of this LightComponent.

Syntax

[Sansar.Script.Interface] public float GetAngularFalloff ()

Returns

The angular falloff.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


GetCastsShadows Method

Retrieves whether this LightComponent casts shadows.

Syntax

[Sansar.Script.Interface] public bool GetCastsShadows ()

Returns

The shadow cast state.

Remarks

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public float GetNearClip ()

Returns

The near clip distance.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


GetNormalizedColor Method

Retrieves the normalized color of this LightComponent.

Syntax

[Sansar.Script.Interface] public Sansar.Color GetNormalizedColor ()

Returns

The normalized color.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


GetRange Method

Retrieves the current range of this LightComponent.

Syntax

[Sansar.Script.Interface] public float GetRange ()

Returns

The range.

Remarks

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public float GetRelativeIntensity ()

Returns

The intensity based on a normalized color.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


GetShadowPriority Method

Retrieves the shadow priority of this LightComponent.

Syntax

[Sansar.Script.Interface] public uint GetShadowPriority ()

Returns

The shadow priority.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


IsScriptable Property

The scriptable flag for this LightComponent.

Syntax

[get: Sansar.Script.Interface] public bool IsScriptable { get; }

Value

Whether or not this light can have properties changed by script.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


LightType Property

The light type for this LightComponent.

Syntax

[get: Sansar.Script.Interface] public LightType LightType { get; }

Value

Light type enum for the light component.

Remarks

Requirements

Namespace: 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.

Syntax

[get: Sansar.Script.Interface] public string Name { get; }

Value

Remarks

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public void SetAngle (float angle)

Parameters

angle

The angle in degrees, 1 to 160.

Returns

The return value is an internal event id.

Remarks

Requirements

Namespace: 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.

Syntax

Parameters

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

Requirements

Namespace: 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.

Syntax

Parameters

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

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public void SetAngularFalloff (float angularFalloff)

Parameters

angularFalloff

The angular falloff, 0.01 to 1.

Returns

The return value is an internal event id.

Remarks

Requirements

Namespace: 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.

Syntax

Parameters

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

Requirements

Namespace: 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.

Syntax

Parameters

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

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public void SetCastsShadows (bool castsShadows)

Parameters

castsShadows

True to cast shadows.

Returns

The return value is an internal event id.

Remarks

This method only affects spot lights. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: 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.

Syntax

Parameters

castsShadows

True to cast shadows.

handler

Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This method only affects spot lights. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: 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.

Syntax

Parameters

castsShadows

True to cast shadows.

handler

Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This method only affects spot lights. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


SetColorAndIntensity Method

Sets the color for this LightComponent.

Syntax

[Sansar.Script.Interface] public void SetColorAndIntensity (Sansar.Color color, float intensity)

Parameters

color

The color.

intensity

The intensity, 0 to 100.

Returns

The return value is an internal event id.

Remarks

The intensity is multiplied by the color and then applied to the light. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


SetColorAndIntensity Method

Sets the color for this LightComponent.

Syntax

Parameters

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

The intensity is multiplied by the color and then applied to the light. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


SetColorAndIntensity Method

Sets the color for this LightComponent.

Syntax

Parameters

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

The intensity is multiplied by the color and then applied to the light. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public void SetNearClip (float nearClip)

Parameters

nearClip

The near clip distance, 0 to 500.

Returns

The return value is an internal event id.

Remarks

Requirements

Namespace: 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.

Syntax

Parameters

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

Requirements

Namespace: 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.

Syntax

Parameters

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

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


SetRange Method

Sets the range for this LightComponent.

Syntax

[Sansar.Script.Interface] public void SetRange (float range)

Parameters

range

The range, 1 to 500.

Returns

The return value is an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


SetRange Method

Sets the range for this LightComponent.

Syntax

Parameters

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

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


SetRange Method

Sets the range for this LightComponent.

Syntax

Parameters

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

Requirements

Namespace: 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.

Syntax

[Sansar.Script.Interface] public void SetShadowPriority (uint shadowPriority)

Parameters

shadowPriority

Shadow priority.

Returns

The return value is an internal event id.

Remarks

Set this to zero to turn off shadows. This method only affects spot lights. The renderer prioritizes shadows cast from higher priority lights first. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: 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.

Syntax

Parameters

shadowPriority

Shadow priority.

handler

Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

Set this to zero to turn off shadows. This method only affects spot lights. The renderer prioritizes shadows cast from higher priority lights first. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: 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.

Syntax

Parameters

shadowPriority

Shadow priority.

handler

Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

Set this to zero to turn off shadows. This method only affects spot lights. The renderer prioritizes shadows cast from higher priority lights first. This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0


ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface] public override string ToString ()

Returns

A string representation of this object.

Remarks

Requirements

Namespace: 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

Member NameDescription

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