CSLight Object

The CSLight Object represents a 3DCrafter Light.

General GetID
  GetType
Color GetColor
  SetColor
Attenuation GetConstantAttenuation
  SetConstantAttenuation
  GetLinearAttenuation
  SetLinearAttenuation
  GetQuadraticAttenuation
  SetQuadraticAttenuation
Spotlight GetSpotlightRange
  SetSpotlightRange
  GetSpotlightUmbra
  SetSpotlightUmbra
  GetSpotlightPenumbra
  SetSpotlightPenumbra
Hierarchy GetParentGroup

 

GetID

Gets the light's unique identifier.

Syntax

shape.GetID() As Variant

GetType

Gets the light type.

Syntax

shape.GetType() As Variant

Remarks

0=Ambient Light
1=Point Light
2=Spot Light
3=Directional Light
4=Area Light

GetColor

Gets the light color.

Syntax

shape.GetColor(Red As Variant,
Green As Variant,
Blue
As Variant)

Remarks

Each color component may be from 0 to 1 in intensity.

SetColor

Sets the light color.

Syntax

shape.SetColor(Red As Variant,
Green As Variant,
Blue
As Variant)

Remarks

Each color component may be from 0 to 1 in intensity.

GetConstantAttenuation

Gets the constant attenuation for the light.

Syntax

shape.GetConstantAttenuation() As Variant

Remarks

May be from 0 to 1, but the total attenuation of the light may not exceed 1.

SetConstantAttenuation

Sets the constant attenuation for the light.

Syntax

shape.SetConstantAttenuation(ConstantAttenuation As Variant)

Remarks

May be from 0 to 1, but the total attenuation of the light may not exceed 1.

GetLinearAttenuation

Gets the linear attenuation for the light.

Syntax

shape.GetLinearAttenuation() As Variant

Remarks

May be from 0 to 1, but the total attenuation of the light may not exceed 1.

SetLinearAttenuation

Sets the linear attenuation for the light.

Syntax

shape.SetLinearAttenuation(LinearAttenuation As Variant)

Remarks

May be from 0 to 1, but the total attenuation of the light may not exceed 1.

GetQuadraticAttenuation

Gets the quadratic attenuation for the light.

Syntax

shape.GetQuadraticAttenuation() As Variant

Remarks

May be from 0 to 1, but the total attenuation of the light may not exceed 1.

SetQuadraticAttenuation

Sets the quadratic attenuation for the light.

Syntax

shape.SetQuadraticAttenuation(QuadraticAttenuation As Variant)

Remarks

May be from 0 to 1, but the total attenuation of the light may not exceed 1.

GetSpotlightRange

Gets the maximum range for the spotlight.

Syntax

shape.GetSpotlightRange() As Variant

Remarks

In 3DCrafter units.

SetSpotlightRange

Set the maximum range for the spotlight.

Syntax

shape.SetSpotlightRange(Range As Variant)

Remarks

In 3DCrafter units.

GetSpotlightUmbra

Gets the spotlight umbra.

Syntax

shape.GetSpotlightUmbra() As Variant

Remarks

In Radians. pi Radians = 180 Degrees.

SetSpotlightUmbra

Sets the spotlight umbra.

Syntax

shape.SetSpotlightUmbra(Umbra As Variant)

Remarks

In Radians. pi Radians = 180 Degrees.

GetSpotlightPenumbra

Gets the spotlight penumbra.

Syntax

shape.GetSpotlightPenumbra() As Variant

Remarks

In Radians. pi Radians = 180 Degrees.

SetSpotlightPenumbra

Sets the spotlight penumbra.

Syntax

shape.SetSpotlightPenumbra(Penumbra As Variant)

Remarks

In radians. pi radians = 180 degrees.

GetParentGroup

Gets the CSGroup that is the parent group of the light.

Syntax

shape.GetParentGroup() As CSGroup