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 floatarrow-up-right 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 floatarrow-up-right 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 boolarrow-up-right 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 floatarrow-up-right 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 floatarrow-up-right 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 floatarrow-up-right 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 uintarrow-up-right 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 boolarrow-up-right 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 LightTypearrow-up-right 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 stringarrow-up-right 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 voidarrow-up-right SetAngle (floatarrow-up-right 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 voidarrow-up-right SetAngularFalloff (floatarrow-up-right 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 voidarrow-up-right SetCastsShadows (boolarrow-up-right 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.WaitForarrow-up-right 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.WaitForarrow-up-right 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.WaitForarrow-up-right 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 voidarrow-up-right SetColorAndIntensity (Sansar.Color color, floatarrow-up-right 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.WaitForarrow-up-right 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.WaitForarrow-up-right 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.WaitForarrow-up-right 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 voidarrow-up-right SetNearClip (floatarrow-up-right 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 voidarrow-up-right SetRange (floatarrow-up-right 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 voidarrow-up-right SetShadowPriority (uintarrow-up-right 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.WaitForarrow-up-right 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.WaitForarrow-up-right 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.WaitForarrow-up-right 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 stringarrow-up-right 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 Name
Description

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