Table of Contents

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

Direction Vector2

The way the cone points. Its length doesn't matter; zero means no cone.

Angle float

The cone's full width in degrees. 360 or more means no cone.

Softness float

Degrees, 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

float

Direction

The way the cone points. Its length doesn't matter; zero means no cone.

public Vector2 Direction { get; init; }

Property Value

Vector2

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; }

Property Value

float