![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
A material class that incorporates multiple light sources for rendering. More...
#include <LightMaterial.h>
Public Member Functions | |
LightMaterial () | |
Constructs a LightMaterial object with the specified number of lights. | |
Light * | GetLights () |
Retrieves the array of lights. | |
uint8_t | GetLightCount () |
Retrieves the number of lights in the material. | |
RGBColor | GetRGB (const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override |
Calculates the RGB color at a specific position using the light sources. | |
![]() | |
virtual | ~Material ()=default |
Virtual destructor for proper cleanup in derived classes. | |
Private Attributes | |
Light | lights [lightCount] |
Array of lights used for lighting calculations. | |
Additional Inherited Members | |
![]() | |
enum | Method { Base , Add , Subtract , Multiply , Divide , Darken , Lighten , Screen , Overlay , SoftLight , Replace , EfficientMask , Bypass } |
Defines blending methods for combining colors. More... | |
A material class that incorporates multiple light sources for rendering.
This template-based material class allows for dynamic lighting by utilizing a fixed number of light sources. The lighting calculations take into account position, normal, and texture coordinates to determine the final color output.
lightCount | The number of lights included in the material. |
Definition at line 29 of file LightMaterial.h.
LightMaterial | ( | ) |
Constructs a LightMaterial
object with the specified number of lights.
Retrieves the number of lights in the material.
lightCount
). Retrieves the array of lights.
Light
objects. Referenced by Boot::Boot(), and Boot::Update().
|
overridevirtual |
Calculates the RGB color at a specific position using the light sources.
position | 3D position in the scene. |
normal | Normal vector at the position. |
uvw | Texture coordinates at the position. |
Implements Material.
|
private |
Array of lights used for lighting calculations.
Definition at line 31 of file LightMaterial.h.