4#include "../Objects/SolidCube.h"
5#include "../Math/FunctionGenerator.h"
6#include "../Morph/ProtoDRMorph.h"
8#include "../Materials/VectorField2D.h"
21 RGBColor spectrum1[6] = {
RGBColor(255, 255, 0),
RGBColor(0, 0, 0),
RGBColor(0, 255, 255),
RGBColor(0, 0, 0),
RGBColor(255, 0, 255),
RGBColor(0, 0, 0)};
22 RGBColor spectrum2[6] = {
RGBColor(255, 0, 0),
RGBColor(0, 0, 0),
RGBColor(0, 255, 0),
RGBColor(0, 0, 0),
RGBColor(0, 0, 255),
RGBColor(0, 0, 0)};
23 RGBColor spectrum3[7] = {
RGBColor(255, 0, 0),
RGBColor(255, 255, 0),
RGBColor(0, 255, 0),
RGBColor(0, 255, 255),
RGBColor(0, 0, 255),
RGBColor(255, 0, 255),
RGBColor(255, 0, 0)};
29 scene->AddObject(
cube.GetObject());
34 void FadeIn(
float stepRatio)
override {}
44 float x = sinf(ratio * 3.14159f / 180.0f * 360.0f * 4.0f) * 50.0f + sinf(ratio * 3.14159f / 180.0f * 360.0f * 3.0f) * 50.0f;
45 float y = cosf(ratio * 3.14159f / 180.0f * 360.0f * 6.0f) * 10.0f;
47 pM.SetMorphWeight(ProtoDR::HideBlush, 1.0f);
48 pM.SetMorphWeight(ProtoDR::HideSecondEye, 1.0f);
51 pM.GetObject()->GetTransform()->SetRotation(
Vector3D(0, 180.0f, 0.0f));
52 pM.GetObject()->GetTransform()->SetPosition(
Vector3D(x, y - 250.0f, 600.0f));
53 pM.GetObject()->GetTransform()->SetScale(
Vector3D(2.0f, 2.0f, 2.0f));
55 pM.GetObject()->UpdateTransform();
70 cube.GetObject()->ResetVertices();
71 cube.GetObject()->GetTransform()->SetScale(
Vector3D(1000, 1000, 1));
72 cube.GetObject()->UpdateTransform();
A class to generate various waveform functions with customizable parameters.
float Update()
Updates and calculates the next value of the waveform.
Creates a customizable gradient material for rendering.
Represents an RGB color and provides methods for manipulation.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
A class for managing and rendering 2D vector fields.
void RenderDensity()
Renders the density values of the vector field.
void Advect(float dt)
Advances the vector field using advection.
void SetPosition(float posX, float posY)
Sets the position of the vector field.
void ObjectField(Object3D *object, float intensity)
Generates a field effect based on a 3D object's position and shape.
void Diffuse(float viscosity, float dt)
Performs diffusion on the vector field.
void SetSize(float sizeX, float sizeY)
Sets the size of the vector field.
FunctionGenerator fGenMatAmpl
GradientMaterial colorDirection
FunctionGenerator fGenMatPeriod
VectorField2D vectorField
FunctionGenerator fGenMatPos
void FadeIn(float stepRatio) override
void FadeOut(float stepRatio) override
void Update(float ratio) override
FunctionGenerator fGenMatRot
FunctionGenerator fGenMatSize