![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Generates striped patterns with configurable properties. More...
#include <StripeMaterial.h>
Public Member Functions | |
StripeMaterial (uint8_t colorCount, RGBColor *rgbColors, float stripeWidth, float wavePeriod, float waveAmplitude) | |
Constructs a StripeMaterial with given properties. | |
void | SetPositionOffset (Vector2D positionOffset) |
Sets the position offset for the pattern. | |
void | SetRotationOffset (Vector2D rotationOffset) |
Sets the rotation offset (center point) for the pattern. | |
void | SetRotationAngle (float rotationAngle) |
Sets the rotation angle for the pattern. | |
void | SetStripeWidth (float stripeWidth) |
Sets the stripe width. | |
void | SetWavePeriod (float wavePeriod) |
Sets the wave period for the sinusoidal effect. | |
void | SetWaveAmplitude (float waveAmplitude) |
Sets the wave amplitude for the sinusoidal effect. | |
void | HueShift (float hueDeg) |
Applies a hue shift to the stripe colors. | |
RGBColor | GetRGB (const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override |
Computes the color at a given position. | |
![]() | |
virtual | ~Material ()=default |
Virtual destructor for proper cleanup in derived classes. | |
Private Attributes | |
RGBColor * | rgbColors |
Array of colors used for the stripes. | |
RGBColor * | baseRGBColors |
Backup of the original colors for hue adjustments. | |
uint8_t | colorCount |
Number of colors in the stripe pattern. | |
Vector2D | positionOffset |
Offset for the stripe position. | |
Vector2D | rotationOffset |
Rotation center for the pattern. | |
float | stripeWidth |
Width of each stripe in the pattern. | |
float | wavePeriod |
Period of the sinusoidal wave effect. | |
float | waveAmplitude |
Amplitude of the sinusoidal wave effect. | |
float | rotationAngle |
Angle for rotating the pattern. | |
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... | |
Generates striped patterns with configurable properties.
The StripeMaterial
class provides methods for creating and manipulating striped patterns that can include wave effects, color gradients, and rotational transformations.
Definition at line 27 of file StripeMaterial.h.
StripeMaterial | ( | uint8_t | colorCount, |
RGBColor * | rgbColors, | ||
float | stripeWidth, | ||
float | wavePeriod, | ||
float | waveAmplitude | ||
) |
Constructs a StripeMaterial with given properties.
colorCount | Number of colors in the stripe pattern. |
rgbColors | Array of RGB colors for the stripes. |
stripeWidth | Width of each stripe. |
wavePeriod | Period of the wave effect. |
waveAmplitude | Amplitude of the wave effect. |
|
overridevirtual |
Computes the color at a given position.
position | 3D position in the scene. |
normal | Normal vector at the position (not used for this material). |
uvw | Texture coordinates at the position (not used for this material). |
Implements Material.
Applies a hue shift to the stripe colors.
hueDeg | The degree of hue shift to apply. |
Sets the position offset for the pattern.
positionOffset | The desired position offset. |
Referenced by AlphaAnimation::Update(), and FullScreenAnimation::Update().
Sets the rotation angle for the pattern.
rotationAngle | The desired rotation angle in degrees. |
Referenced by AlphaAnimation::Update(), and FullScreenAnimation::Update().
Sets the rotation offset (center point) for the pattern.
rotationOffset | The center point for rotation. |
Sets the stripe width.
stripeWidth | The desired stripe width. |
Referenced by AlphaAnimation::Update(), and FullScreenAnimation::Update().
Sets the wave amplitude for the sinusoidal effect.
waveAmplitude | The desired wave amplitude. |
Referenced by AlphaAnimation::Update(), and FullScreenAnimation::Update().
Sets the wave period for the sinusoidal effect.
wavePeriod | The desired wave period. |
Referenced by AlphaAnimation::Update(), and FullScreenAnimation::Update().
|
private |
Backup of the original colors for hue adjustments.
Definition at line 30 of file StripeMaterial.h.
|
private |
Number of colors in the stripe pattern.
Definition at line 31 of file StripeMaterial.h.
|
private |
Offset for the stripe position.
Definition at line 32 of file StripeMaterial.h.
|
private |
Array of colors used for the stripes.
Definition at line 29 of file StripeMaterial.h.
|
private |
Angle for rotating the pattern.
Definition at line 37 of file StripeMaterial.h.
|
private |
Rotation center for the pattern.
Definition at line 33 of file StripeMaterial.h.
|
private |
Width of each stripe in the pattern.
Definition at line 34 of file StripeMaterial.h.
|
private |
Amplitude of the sinusoidal wave effect.
Definition at line 36 of file StripeMaterial.h.
|
private |
Period of the sinusoidal wave effect.
Definition at line 35 of file StripeMaterial.h.