ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
SimpleMaterial.cpp
Go to the documentation of this file.
1#include "SimpleMaterial.h"
2
4 this->rgb = rgb;
5 this->baseRGB = rgb;
6}
7
8void SimpleMaterial::HueShift(float hueDeg) {
9 rgb = baseRGB.HueShift(hueDeg);
10}
11
13 this->rgb = rgb;
14 this->baseRGB = rgb;
15}
16
17RGBColor SimpleMaterial::GetRGB(const Vector3D& position, const Vector3D& normal, const Vector3D& uvw) {
18 return rgb;
19}
A material class that applies a single RGB color to all surfaces.
Represents an RGB color and provides methods for manipulation.
Definition RGBColor.h:23
RGBColor HueShift(const float &hueDeg)
Shifts the hue of the color by a specified angle in degrees.
Definition RGBColor.cpp:65
RGBColor baseRGB
The base RGB color used for reference during hue shifts.
void SetRGB(RGBColor rgb)
Sets a new RGB color for the material.
void HueShift(float hueDeg)
Adjusts the hue of the material's color.
RGBColor rgb
The active RGB color applied to the surface.
SimpleMaterial(RGBColor rgb)
Constructs a SimpleMaterial with a specified RGB color.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Retrieves the RGB color for a surface.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26