15#include "../Material.h"
16#include "../../../Utils/Math/Mathematics.h"
17#include "../../../Utils/Math/Rotation.h"
18#include "../../../Utils/Math/Vector2D.h"
29template<
size_t colorCount>
Creates a customizable gradient material for rendering.
RGBColor rgbColors[colorCount]
Array of colors used in the gradient.
GradientMaterial(RGBColor *rgbColors, float gradientPeriod, bool isRadial, bool isStepped=false)
Constructs a GradientMaterial instance.
bool isRadial
Whether the gradient is radial.
void SetPositionOffset(Vector2D positionOffset)
Sets the position offset for the gradient.
void SetRotationAngle(float rotationAngle)
Sets the rotation angle for the gradient.
Vector2D positionOffset
Offset for the gradient's position.
bool isStepped
Whether the gradient is stepped.
void UpdateGradient(RGBColor *rgbColors)
Updates the colors of the gradient.
void HueShift(float hueDeg)
Shifts the hue of the gradient by a specified degree.
void GradientShift(float ratio)
Shifts the gradient by a ratio.
float rotationAngle
Angle for rotating the gradient.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Gets the RGB color for a given position in the gradient.
void SetRotationOffset(Vector2D rotationOffset)
Sets the rotation offset for the gradient.
RGBColor * baseRGBColors
Pointer to the base RGB colors.
float gradientPeriod
Period of the gradient repetition.
void UpdateRGB()
Updates the RGB colors in the gradient.
Vector2D rotationOffset
Point about which the gradient rotates.
float gradientShift
Shift in the gradient pattern.
void SetGradientPeriod(float gradientPeriod)
Sets the gradient's period of repetition.
Abstract base class for rendering materials.
Represents an RGB color and provides methods for manipulation.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.