SystemEX  Lacking
Additional generic collection types missing in .net
SystemEx.Drawing.Light Class Reference

Base light class used for all light types in the SystemEx.Drawing namespace. Provides shared parameters such as position, direction, diffuse/ambient color and projection settings. Specific light types (spot, point, directional) extend this class with additional behavior. More...

Inheritance diagram for SystemEx.Drawing.Light:
Collaboration diagram for SystemEx.Drawing.Light:

Public Member Functions

 Light (Vec3f position, Vec3f direction, ColorR8G8B8 ambient, ColorR8G8B8 diffuse)
void SetProjParams (Projection projection)
 Sets the projection parameters for lights that require a frustum (typically spot lights or shadow-casting lights).

Protected Attributes

Vec3f m_Position
 World-space position of the light.
Vec3f m_Direction
 Normalized world-space direction of the light. Used for directional and spot lights.
Vec3f m_Up
ColorHSV m_DiffuseColor
 Diffuse color contribution of the light. Defines the main visible light color.
ColorHSV m_AmbientColor
 Ambient color contribution of the light. Used for low-frequency indirect lighting.

Properties

ColorHSV Ambient [get, set]
ColorHSV Diffuse [get, set]
Vec3f Direction [get, set]
Vec3f Position [get, set]
Vec3f Up [get, set]
Vec3f LookAt [get]
Projection Projection [get]

Detailed Description

Base light class used for all light types in the SystemEx.Drawing namespace. Provides shared parameters such as position, direction, diffuse/ambient color and projection settings. Specific light types (spot, point, directional) extend this class with additional behavior.

Constructor & Destructor Documentation

◆ Light() [1/2]

SystemEx.Drawing.Light.Light ( )
63 {
64 m_Position = new Vec3f(-10.0f, 2.0f, 0.0f);
65 m_Direction = new Vec3f(1.0f, 0.0f, 0.0f);
66 m_DiffuseColor = WhiteColors.Snow.ToColorHSV();
67 m_AmbientColor = YellowColors.LightYellow.ToColorHSV();
68
69 m_Up = new Vec3f(0.0f, 1.0f, 0.0f);
70
71 }

◆ Light() [2/2]

SystemEx.Drawing.Light.Light ( Vec3f position,
Vec3f direction,
ColorR8G8B8 ambient,
ColorR8G8B8 diffuse )
73 {
74 m_Position = position;
75 m_Direction = direction;
76 m_DiffuseColor = diffuse.ToColorHSV();
77 m_AmbientColor = ambient.ToColorHSV();
78 }

Member Function Documentation

◆ SetProjParams()

void SystemEx.Drawing.Light.SetProjParams ( Projection projection)

Sets the projection parameters for lights that require a frustum (typically spot lights or shadow-casting lights).

86 {
87 m_projection = projection;
88 }

Member Data Documentation

◆ m_AmbientColor

ColorHSV SystemEx.Drawing.Light.m_AmbientColor
protected

Ambient color contribution of the light. Used for low-frequency indirect lighting.

◆ m_DiffuseColor

ColorHSV SystemEx.Drawing.Light.m_DiffuseColor
protected

Diffuse color contribution of the light. Defines the main visible light color.

◆ m_Direction

Vec3f SystemEx.Drawing.Light.m_Direction
protected

Normalized world-space direction of the light. Used for directional and spot lights.

◆ m_Position

Vec3f SystemEx.Drawing.Light.m_Position
protected

World-space position of the light.

Property Documentation

◆ Ambient

ColorHSV SystemEx.Drawing.Light.Ambient
getset
47{ get => m_AmbientColor; set => m_AmbientColor = value; }

◆ Diffuse

ColorHSV SystemEx.Drawing.Light.Diffuse
getset
49{ get => m_DiffuseColor; set => m_DiffuseColor = value; }

◆ Direction

Vec3f SystemEx.Drawing.Light.Direction
getset
51{ get => m_Direction; set => m_Direction = value; }

◆ Position

Vec3f SystemEx.Drawing.Light.Position
getset
53{ get => m_Position; set => m_Position = value; }

◆ Up

Vec3f SystemEx.Drawing.Light.Up
getset
55{ get => m_Up; set => m_Up = value; }

The documentation for this class was generated from the following file:
  • Light.cs