Table of Contents

Class PointLight

Namespace
OmegaEngine.Graphics.LightSources
Assembly
OmegaEngine.dll

A light source that has a fixed position and shines uniformly in all directions.

public sealed class PointLight : LightSource, IPositionable
Inheritance
object
PointLight
Implements
Inherited Members

Properties

AttachedTo

A PositionableRenderable this light source is attached to; null to use Position as an absolute world position.

[Browsable(false)]
public PositionableRenderable? AttachedTo { get; set; }

Property Value

PositionableRenderable
See Also

Attenuation

Factors describing the attenuation of light intensity over distance.

public Attenuation Attenuation { get; set; }

Property Value

Attenuation

Offset

The offset from AttachedTo in its local coordinate system. Ignored while AttachedTo is null.

public Vector3 Offset { get; set; }

Property Value

Vector3

Position

The position of the light source in world space.

public DoubleVector3 Position { get; set; }

Property Value

DoubleVector3

Remarks

While AttachedTo is set, this is recalculated from Offset by OmegaEngine.Graphics.LightSources.PointLight.UpdatePosition() and setting it has no lasting effect.

Range

The maximum distance at which the light source has an effect.

public float Range { get; }

Property Value

float

RenderAsDirectional

Shall this light source be converted to a pseudo-directional source for each individual PositionableRenderable before rendering?

public bool RenderAsDirectional { get; set; }

Property Value

bool

Methods

GetShadowed(BoundingSphere, BoundingSphere)

Creates a copy of this light source with simple shadowing applied.

[Pure]
public override LightSource GetShadowed(BoundingSphere receiverSphere, BoundingSphere casterSphere)

Parameters

receiverSphere BoundingSphere

The bounding sphere of the shadow receiver in world space.

casterSphere BoundingSphere

The bounding sphere of the shadow caster in world space.

Returns

LightSource