Spot light implementation. Adds inner and outer cone angles (phi/theta) expressed as cosine values. These values are used for smooth falloff inside the spotlight cone.
More...
|
| float | m_cosHalfTheta |
| | Cosine of half the outer cone angle (theta). Defines the outer boundary of the spotlight.
|
| float | m_cosHalfPhi |
| | Cosine of half the inner cone angle (phi). Defines the fully illuminated inner region of the spotlight.
|
| 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.
|
Spot light implementation. Adds inner and outer cone angles (phi/theta) expressed as cosine values. These values are used for smooth falloff inside the spotlight cone.
◆ SpotLight() [1/3]
| SystemEx.Drawing.SpotLight.SpotLight |
( |
| ) |
|
138 : base() {
139 m_cosHalfPhi = 0.4f;
140 m_cosHalfTheta = 0.9f;
141 }
◆ SpotLight() [2/3]
| SystemEx.Drawing.SpotLight.SpotLight |
( |
float | HalfPhi, |
|
|
float | HalfTheta ) |
142 : base() {
143 m_cosHalfPhi = HalfPhi;
144 m_cosHalfTheta = HalfTheta;
145 }
◆ SpotLight() [3/3]
149 : base(position, direction, ambient, diffuse) {
150 m_cosHalfPhi = HalfPhi;
151 m_cosHalfTheta = HalfTheta;
152 }
◆ m_cosHalfPhi
| float SystemEx.Drawing.SpotLight.m_cosHalfPhi |
|
protected |
Cosine of half the inner cone angle (phi). Defines the fully illuminated inner region of the spotlight.
◆ m_cosHalfTheta
| float SystemEx.Drawing.SpotLight.m_cosHalfTheta |
|
protected |
Cosine of half the outer cone angle (theta). Defines the outer boundary of the spotlight.
◆ CosHalfPhi
| float SystemEx.Drawing.SpotLight.CosHalfPhi |
|
getset |
111{ get => m_cosHalfPhi; set => m_cosHalfPhi = value; }
◆ CosHalfTheta
| float SystemEx.Drawing.SpotLight.CosHalfTheta |
|
getset |
113{ get => m_cosHalfTheta; set => m_cosHalfTheta = value; }
◆ InnerConeAngle
| float SystemEx.Drawing.SpotLight.InnerConeAngle |
|
getset |
Inner cone angle of the spotlight in degrees. Defines the fully illuminated inner region.
119 {
120 get => MathF.Acos(m_cosHalfPhi) * 2.0f * (180.0f / MathF.PI);
121 set {
122 float halfAngleRad = (value * MathF.PI / 180.0f) * 0.5f;
123 m_cosHalfPhi = MathF.Cos(halfAngleRad);
124 }
125 }
◆ OuterConeAngle
| float SystemEx.Drawing.SpotLight.OuterConeAngle |
|
getset |
Outer cone angle of the spotlight in degrees. Defines the soft falloff region of the spotlight.
130 {
131 get => MathF.Acos(m_cosHalfTheta) * 2.0f * (180.0f / MathF.PI);
132 set {
133 float halfAngleRad = (value * MathF.PI / 180.0f) * 0.5f;
134 m_cosHalfTheta = MathF.Cos(halfAngleRad);
135 }
136 }
The documentation for this class was generated from the following file: