Skip to content

Struct Light

Namespace: Apogee.Rendering
Assembly: Apogee.Rendering.dll

A light at the entity's , shining along its -Z (as glTF lights do). A directional light is the world's sun: its color and direction set the sun (the first one wins), and its position does not matter.

public struct Light

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Fields

Color

The color, in linear 0 to 1.

public Vector3 Color

Field Value

Vector3

InnerCone

A spot light's cone, in radians: fully lit inside , fading to nothing at .

public float InnerCone

Field Value

float

Intensity

Candela for point and spot lights, lux for the sun.

public float Intensity

Field Value

float

Kind

A : 0 directional, 1 point, 2 spot.

public byte Kind

Field Value

byte

OuterCone

public float OuterCone

Field Value

float

Range

How far a point or spot light reaches; 0 lets the renderer find where it falls below a faint threshold.

public float Range

Field Value

float

Methods

Point(Vector3, float, float)

public static Light Point(Vector3 color, float intensity, float range = 0)

Parameters

color Vector3

intensity float

range float

Returns

Light

Sun(Vector3, float)

public static Light Sun(Vector3 color, float illuminance)

Parameters

color Vector3

illuminance float

Returns

Light