63 float angle = atan2(positionL.
Y, positionL.
X);
A material class for generating spiral effects.
Encapsulates a 3D rotation using Euler angles and a specific order of application.
static const float MPI
Mathematical constant (3.14159265358979323846...).
static float Fract(float value)
Returns the fractional part of a floating-point value.
A mathematical construct representing a rotation in 3D space.
Vector2D RotateVector(const Vector2D &v) const
Rotates a 2D vector by this quaternion, projecting it in 2D.
Represents an RGB color and provides methods for manipulation.
RGBColor HueShift(const float &hueDeg)
Shifts the hue of the color by a specified angle in degrees.
Handles 3D rotations and conversions between various rotation representations.
Quaternion GetQuaternion()
Gets the quaternion representation of the rotation.
void SetPositionOffset(Vector2D positionOffset)
Sets the position offset for the spiral.
void SetRotationAngle(float rotationAngle)
Sets the rotation angle for the spiral.
RGBColor * rgbColors
Array of colors for the spiral.
Vector2D positionOffset
Offset for the position of the spiral.
void HueShift(float hueDeg)
Shifts the hue of the spiral colors.
void SetBend(float bend)
Sets the bending factor of the spiral arms.
uint8_t colorCount
Number of colors in the spiral.
float rotationAngle
Angle to rotate the spiral pattern.
RGBColor GetRGB(const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override
Retrieves the color for a given position.
void SetRotationOffset(Vector2D rotationOffset)
Sets the rotation offset for the spiral.
RGBColor * baseRGBColors
Backup array for the original colors.
SpiralMaterial(uint8_t colorCount, RGBColor *rgbColors, float width, float bend)
Constructs a SpiralMaterial instance.
void SetWidth(float width)
Sets the width of the spiral arms.
Vector2D rotationOffset
Point around which the spiral rotates.
~SpiralMaterial()
Destructor for SpiralMaterial.
float width
Width of the spiral arms.
float bend
Degree of bending for the spiral arms.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
float X
The X-component of the 2D vector.
float Y
The Y-component of the 2D vector.
float Magnitude() const
Computes the magnitude (length) of this vector using the formula sqrt(X^2 + Y^2).
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
float X
The X-component of the 3D vector.
float Y
The Y-component of the 3D vector.
const EulerOrder EulerOrderXYZS
Order: X → Y → Z, static frame.