Class RectangleLight
This class represents basic information for a rectangular area light.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class RectangleLight : CubemapLight, IDependencyObject
Constructors
RectangleLight()
Initializes a new instance of the RectangleLight class.
Declaration
public RectangleLight()
Properties
Direction
Gets the rectangular 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 |
Height
Gets or sets the height of the rectangle.
Declaration
public float Height { get; set; }
Property Value
Type | Description |
---|---|
float |
Left
Gets the left vector of the rectangle light.
Declaration
public Vector3 Left { get; }
Property Value
Type | Description |
---|---|
Vector3 |
LightRange
Gets or sets the light range value.
Declaration
public override float LightRange { get; set; }
Property Value
Type | Description |
---|---|
float |
Overrides
LightType
Gets the type of light.
Declaration
public override LightType LightType { get; }
Property Value
Type | Description |
---|---|
LightType |
Overrides
Width
Gets or sets the rectangle's width.
Declaration
public float Width { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
ComputeBoundingBox(out BoundingBox)
Computes 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)
Checks if the current light intersects 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 the frustum view. |
Overrides
Intersects(ref BoundingFrustum)
Checks 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 the frustum view. |
Overrides
OnAttached()
Attaches the camera to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Overrides
OnDetach()
Detaches the camera from the system.
Declaration
protected override void OnDetach()