Struct LightCone
- Namespace
- BSGameLib.Game
- Assembly
- BSGameLib.Game.dll
A spotlight's cone: the light shines only within Angle degrees around Direction, brightest along it.
public readonly record struct LightCone : IEquatable<LightCone>
- Implements
- Inherited Members
Constructors
LightCone(Vector2, float, float)
A spotlight's cone: the light shines only within Angle degrees around Direction, brightest along it.
public LightCone(Vector2 Direction, float Angle, float Softness = 0)
Parameters
DirectionVector2The way the cone points. Its length doesn't matter; zero means no cone.
AnglefloatThe cone's full width in degrees. 360 or more means no cone.
SoftnessfloatDegrees, inside the cone's edge, over which the light fades out. Clamped to half the cone, so it never fades past the axis.
Properties
Angle
The cone's full width in degrees. 360 or more means no cone.
public float Angle { get; init; }
Property Value
Direction
The way the cone points. Its length doesn't matter; zero means no cone.
public Vector2 Direction { get; init; }
Property Value
Softness
Degrees, inside the cone's edge, over which the light fades out. Clamped to half the cone, so it never fades past the axis.
public float Softness { get; init; }