Class LightSource
- Namespace
- OmegaEngine.Graphics.LightSources
- Assembly
- OmegaEngine.dll
A light source that illuminates PositionableRenderables in a Scene.
public abstract class LightSource
- Inheritance
-
objectLightSource
- Derived
Properties
Ambient
The ambient color this light source emits
public Color Ambient { get; set; }
Property Value
Diffuse
The diffuse color this light source emits
public Color Diffuse { get; set; }
Property Value
Enabled
Shall the light source affect its surroundings?
public bool Enabled { get; set; }
Property Value
MaxShadowRange
The maximum distance between shadow casters and receivers to consider.
public float MaxShadowRange { get; set; }
Property Value
Remarks
Lower values can improve performance by excluding distant shadow casters.
Name
Text value to make it easier to identify a particular camera
public string? Name { get; set; }
Property Value
Specular
The specular color this light source emits
public Color Specular { get; set; }
Property Value
Methods
GetShadowFactor(BoundingSphere, Ray, float)
Calculates the shadow intensity.
protected static float GetShadowFactor(BoundingSphere receiverSphere, Ray shadowRay, float shadowRadius)
Parameters
receiverSphereBoundingSphereBounding sphere of the shadow receiver in floating world space.
shadowRayRayRay pointing from the light source to the shadow caster in floating world space.
shadowRadiusfloatThe radius of the shadow at the shadow receiver.
Returns
- float
A value from 0 (fully lit) to 1 (fully shadowed).
GetShadowed(BoundingSphere, BoundingSphere)
Creates a copy of this light source with simple shadowing applied.
[Pure]
public abstract LightSource GetShadowed(BoundingSphere receiverSphere, BoundingSphere casterSphere)
Parameters
receiverSphereBoundingSphereThe bounding sphere of the shadow receiver in world space.
casterSphereBoundingSphereThe bounding sphere of the shadow caster in world space.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.