Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    LightSpot Class

    Namespace: Stride.Rendering.Lights
    Assembly: Stride.Rendering.dll

    A spot light.

    System.Object → ColorLightBase → DirectLightBase → LightSpot
    Derived from LightSpot:

    [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)
    | Improve this Doc View Source

    Constructors


    LightSpot()

    Initializes a new instance of the LightSpot class.

    public LightSpot()
    | Improve this Doc View Source

    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
    DirectLightBase.HasBoundingBox

    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
    | Improve this Doc View Source

    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
    DirectLightBase.ComputeBounds(Vector3, Vector3)

    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
    DirectLightBase.ComputeScreenCoverage(RenderView, Vector3, Vector3)

    Update(RenderLight)

    public override bool Update(RenderLight light)
    Parameters
    Type Name Description
    RenderLight light
    Returns
    Type Description
    System.Boolean
    Overrides
    ColorLightBase.Update(RenderLight)

    Inherited Members

    DirectLightBase.Shadow
    ColorLightBase.Color
    ColorLightBase.ComputeColor(ColorSpace, Single)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation