Class SpotLight
This class represents basic information for a spot light.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class SpotLight : VolumeLight, IDependencyObject
Constructors
SpotLight()
Initializes a new instance of the SpotLight class.
Declaration
public SpotLight()
Properties
Direction
Gets the Spot light direction.
Declaration
public Vector3 Direction { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Falloff
Gets the light falloff (1 / LightRange^2).
Declaration
public float Falloff { get; }
Property Value
Type | Description |
---|---|
float |
InnerConeAngle
Gets or sets the light inner cone angle of this light.
Declaration
public float InnerConeAngle { get; set; }
Property Value
Type | Description |
---|---|
float |
LightRange
Gets or sets the light range.
Declaration
public float LightRange { get; set; }
Property Value
Type | Description |
---|---|
float | The light range. |
LightType
Gets the light type.
Declaration
public override LightType LightType { get; }
Property Value
Type | Description |
---|---|
LightType |
Overrides
OuterConeAngle
Gets or sets the light outer cone angle of this light.
Declaration
public float OuterConeAngle { get; set; }
Property Value
Type | Description |
---|---|
float |
Position
Gets the Position of this light.
Declaration
public Vector3 Position { get; }
Property Value
Type | Description |
---|---|
Vector3 |
ScaleOffset
Gets the scale offset, used to compute spot angle in shaders.
Declaration
public Vector2 ScaleOffset { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Methods
ComputeBoundingBox(out BoundingBox)
Compute the bounding box of the light.
Declaration
public override void ComputeBoundingBox(out BoundingBox boundingBox)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | boundingBox | The bounding box. |
Overrides
Intersects(ref BoundingBox)
Check if the current light intersect with the specified bbox.
Declaration
public override bool Intersects(ref BoundingBox bbox)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | bbox |
Returns
Type | Description |
---|---|
bool | Whether the light is inside frustum view. |
Overrides
Intersects(ref BoundingFrustum)
Check if the current light is inside the specified frustum.
Declaration
public override bool Intersects(ref BoundingFrustum frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | frustum | The frustum. |
Returns
Type | Description |
---|---|
bool | Whether the light is inside frustum view. |
Overrides
OnAttached()
Attach the camera to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
OnDetach()
Detach the camera to the system.
Declaration
protected override void OnDetach()
Overrides
OnLoaded()
Invoked when the object is loaded.
Declaration
protected override void OnLoaded()