Click or drag to resize
Ab4d.SharpEngine logo

SpotLight Class

SpotLight is a light that is positioned at the specified position and emits light in a specified direction and with the specified cone.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    Ab4d.SharpEngine.LightsLight
      Ab4d.SharpEngine.LightsPointLight
        Ab4d.SharpEngine.LightsSpotLight

Namespace: Ab4d.SharpEngine.Lights
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public class SpotLight : PointLight, ISpotLight, 
	IPointLight, ILight, IDirectionalLight

The SpotLight type exposes the following members.

Constructors
 NameDescription
Public methodSpotLight Initializes a new instance of the SpotLight class.
Public methodSpotLight(Vector3, Vector3, Single) Initializes a new instance of the SpotLight class.
Public methodSpotLight(Vector3, Vector3, Single, Single, Single) Initializes a new instance of the SpotLight class.
Top
Properties
 NameDescription
Public propertyDirection Gets or sets a Vector3 that specifies the direction of this light.
Public propertyFallOff Gets or sets a fallout value that specifies how the light intensity attenuates between inner and outer cone. Default value is 2.0.
Public propertyInnerConeAngle Gets or sets an inner cone angle in degrees. Default value is 40.
Public propertyOuterConeAngle Gets or sets an outer cone angle in degrees. Default value is 50.
Top
Methods
 NameDescription
Public methodGetNormalizedDirection Returns the Direction vector normalized to unit length.
Public methodGetSpotLightPhi Returns the Cos value of half of OuterConeAngle. This value is calculated by: phi = MathF.Cos(OuterConeAngle * MathF.PI / 360f).
Public methodGetSpotLightTheta Returns the Cos value of half of InnerConeAngle. This value is calculated by: theta = MathF.Cos(InnerConeAngle * MathF.PI / 360f).
Public methodToString Returns a string that represents the current object.
(Overrides PointLightToString)
Top
Fields
 NameDescription
Public fieldStatic memberDefaultFallout Default FallOff value for SpotLight
Top
See Also