![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
A dynamic material creating a colorful rainbow spiral animation. More...
#include <RainbowSpiral.h>
Public Member Functions | |
RainbowSpiral () | |
Default constructor for RainbowSpiral. | |
void | Update (float ratio) |
Updates the material animation based on the time ratio. | |
Material * | GetMaterial () |
Retrieves the associated spiral material. | |
RGBColor | GetRGB (const Vector3D &position, const Vector3D &normal, const Vector3D &uvw) override |
Computes the color at a given position in the material. | |
![]() | |
virtual | ~Material ()=default |
Virtual destructor for proper cleanup in derived classes. | |
Private Attributes | |
FunctionGenerator | fGenMatBend = FunctionGenerator(FunctionGenerator::Sine, 0.8f, 0.9f, 6.7f) |
Function generator for animating spiral bending. | |
RGBColor | rainbowSpectrum [6] = {RGBColor(255, 0, 0), RGBColor(255, 255, 0), RGBColor(0, 255, 0), RGBColor(0, 255, 255), RGBColor(0, 0, 255), RGBColor(255, 0, 255)} |
Predefined rainbow color spectrum. | |
SpiralMaterial | spiralMaterial = SpiralMaterial(6, rainbowSpectrum, 3.0f, 7.0f) |
Spiral material configured with rainbow spectrum and scale parameters. | |
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 dynamic material creating a colorful rainbow spiral animation.
The RainbowSpiral class generates a visually dynamic effect by combining a spiral material with a rainbow gradient and function-driven animation.
Definition at line 25 of file RainbowSpiral.h.
|
inline |
Default constructor for RainbowSpiral.
Definition at line 35 of file RainbowSpiral.h.
|
virtual |
Retrieves the associated spiral material.
Implements AnimatedMaterial.
Definition at line 9 of file RainbowSpiral.cpp.
References spiralMaterial.
|
overridevirtual |
Computes the color at a given position in the material.
position | The position in 3D space. |
normal | The surface normal vector. |
uvw | The texture coordinates. |
Implements Material.
Definition at line 13 of file RainbowSpiral.cpp.
References SpiralMaterial::GetRGB(), and spiralMaterial.
Updates the material animation based on the time ratio.
ratio | The time ratio used for animation updates. |
Implements AnimatedMaterial.
Definition at line 3 of file RainbowSpiral.cpp.
References fGenMatBend, SpiralMaterial::SetBend(), SpiralMaterial::SetPositionOffset(), SpiralMaterial::SetRotationAngle(), spiralMaterial, and FunctionGenerator::Update().
Referenced by AphoriAnimation::Update(), ArtleckAnimationV2::Update(), BasilGardenAnimation::Update(), BroookAnimation::Update(), ElGatoAnimation::Update(), GalaxyAnimation::Update(), HertzzAnimation::Update(), InfraredAnimation::Update(), LeonHuskyAnimation::Update(), ProtobottAnimation::Update(), SammyAnimation::Update(), SergaliciousAnimation::Update(), StrawberryAnimation::Update(), TamamoAnimation::Update(), TechSaneAnimation::Update(), VesperAnimation::Update(), WaffleDaProtoAnimation::Update(), WarzoneAnimation::Update(), Warzone2Animation::Update(), XenraxAnimation::Update(), ClockAnimation::Update(), AlphaAnimation::Update(), GammaAnimation::Update(), HUB75AnimationSplit::Update(), WS35AnimationSplit::Update(), VerifyEngine::Update(), and ProtogenProject::UpdateFace().
|
private |
Function generator for animating spiral bending.
Definition at line 27 of file RainbowSpiral.h.
Referenced by Update().
|
private |
Predefined rainbow color spectrum.
Definition at line 28 of file RainbowSpiral.h.
|
private |
Spiral material configured with rainbow spectrum and scale parameters.
Definition at line 29 of file RainbowSpiral.h.
Referenced by GetMaterial(), GetRGB(), and Update().