LightSpot Class
Namespace: Stride.Rendering.LightsAssembly: Stride.Rendering.dll
A spot light.
[DataContract("LightSpot")]
[Display("Spot", null)]
public class LightSpot : DirectLightBase, IDirectLight, IColorLight, ILight
Name | Description | |
---|---|---|
Constructors | ||
LightSpot() | Initializes a new instance of the LightSpot class. |
|
Properties | ||
AngleInner | Gets or sets the spot angle in degrees. |
|
AngleOuter | Gets or sets the spot angle in degrees. |
|
AspectRatio | ||
FlipMode | ||
HasBoundingBox | ||
MipMapScale | Scales the mip map level in the shader. 0 = biggest mip map, 1 = smallest mip map. |
|
ProjectionPlaneDistance | ||
ProjectiveTexture | The texture that is multiplied on top of the lighting result like a mask. Can be used like a cinema projector. |
|
Range | Gets or sets the range distance the light is affecting. |
|
TransitionArea | ||
UVOffset | The offset in the texture coordinates. |
|
UVScale | The scale of the texture coordinates. |
|
Methods | ||
ComputeBounds(Vector3, Vector3) | ||
ComputeScreenCoverage(RenderView, Vector3, Vector3) | ||
Update(RenderLight) |
Constructors
LightSpot()
Initializes a new instance of the LightSpot class.
public LightSpot()
Properties
AngleInner
Gets or sets the spot angle in degrees.
[DataMember(20)]
[DataMemberRange(0.01, 90, 1, 10, 1)]
public float AngleInner { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The spot angle in degrees. |
AngleOuter
Gets or sets the spot angle in degrees.
[DataMember(30)]
[DataMemberRange(0.01, 90, 1, 10, 1)]
public float AngleOuter { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The spot angle in degrees. |
AspectRatio
[DataMember(60)]
public float AspectRatio { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
FlipMode
[DataMember(80)]
public LightSpot.FlipModeEnum FlipMode { get; set; }
Property Value
Type | Description |
---|---|
LightSpot.FlipModeEnum |
HasBoundingBox
public override bool HasBoundingBox { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
MipMapScale
Scales the mip map level in the shader. 0 = biggest mip map, 1 = smallest mip map.
[DataMember(50)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
public float MipMapScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
ProjectionPlaneDistance
[DataMember(75)]
public float ProjectionPlaneDistance { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
ProjectiveTexture
The texture that is multiplied on top of the lighting result like a mask. Can be used like a cinema projector.
[DataMember(40)]
public Texture ProjectiveTexture { get; set; }
Property Value
Type | Description |
---|---|
Texture |
Range
Gets or sets the range distance the light is affecting.
[DataMember(10)]
public float Range { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The range. |
TransitionArea
[DataMember(70)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
public float TransitionArea { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
UVOffset
The offset in the texture coordinates.
[DataMember(45)]
[Display("UV offset", null)]
public Vector2 UVOffset { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
UVScale
The scale of the texture coordinates.
[DataMember(43)]
[Display("UV scale", null)]
public Vector2 UVScale { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Methods
ComputeBounds(Vector3, Vector3)
public override BoundingBox ComputeBounds(Vector3 position, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position | |
Vector3 | direction |
Returns
Type | Description |
---|---|
BoundingBox |
Overrides
ComputeScreenCoverage(RenderView, Vector3, Vector3)
public override float ComputeScreenCoverage(RenderView renderView, Vector3 position, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
RenderView | renderView | |
Vector3 | position | |
Vector3 | direction |
Returns
Type | Description |
---|---|
System.Single |
Overrides
Update(RenderLight)
public override bool Update(RenderLight light)
Parameters
Type | Name | Description |
---|---|---|
RenderLight | light |
Returns
Type | Description |
---|---|
System.Boolean |