Class LightSpot
A spot light.
[DataContract("LightSpot")]
[Display("Spot", null)]
public class LightSpot : ColorLightBase, IDirectLight, IColorLight, ILight
- Inheritance
-
LightSpot
- Implements
- Inherited Members
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
- float
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
- float
The spot angle in degrees.
AspectRatio
[DataMember(60)]
public float AspectRatio { get; set; }
Property Value
FlipMode
[DataMember(80)]
public LightSpot.FlipModeEnum FlipMode { get; set; }
Property Value
HasBoundingBox
Gets a value indicating whether this instance has a bounding box.
public bool HasBoundingBox { get; }
Property Value
- bool
true
if this instance has a bounding box; otherwise,false
.
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
ProjectionPlaneDistance
[DataMember(75)]
public float ProjectionPlaneDistance { get; set; }
Property Value
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
Range
Gets or sets the range distance the light is affecting.
[DataMember(10)]
public float Range { get; set; }
Property Value
- float
The range.
Shadow
Gets or sets the shadow.
[DataMember(200)]
public LightStandardShadowMap Shadow { get; set; }
Property Value
- LightStandardShadowMap
The shadow.
TransitionArea
[DataMember(70)]
[DataMemberRange(0, 1, 0.01, 0.1, 3)]
public float TransitionArea { get; set; }
Property Value
UVOffset
The offset in the texture coordinates.
[DataMember(45)]
[Display("UV offset", null)]
public Vector2 UVOffset { get; set; }
Property Value
UVScale
The scale of the texture coordinates.
[DataMember(43)]
[Display("UV scale", null)]
public Vector2 UVScale { get; set; }
Property Value
Methods
ComputeBounds(Vector3, Vector3)
Computes the bounds of this light..
public BoundingBox ComputeBounds(Vector3 position, Vector3 direction)
Parameters
Returns
- BoundingBox
BoundingBox.
ComputeScreenCoverage(RenderView, Vector3, Vector3)
Computes the screen coverage of this light in pixel.
public float ComputeScreenCoverage(RenderView renderView, Vector3 position, Vector3 direction)
Parameters
renderView
RenderViewThe render view.
position
Vector3The position of the light in world space.
direction
Vector3The direction of the light in world space.
Returns
- float
The largest screen coverage width or height size in pixels of this light.
Update(RenderLight)
public override bool Update(RenderLight light)
Parameters
light
RenderLight