ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
SpyroAnimation.h
Go to the documentation of this file.
1#pragma once
2
3#include "../Templates/Project.h"
4#include "../../Utils/Signals/FunctionGenerator.h"
5#include "../../Assets/Models/OBJ/Spyro.h"
6#include "../../Scene/Materials/Static/NormalMaterial.h"
7#include "../../Scene/Objects/ObjectDeformer.h"
8
9#include "../../Camera/CameraManager/Implementations/HUB75DeltaCameras.h"
10#include "../../Controller/HUB75Controller.h"
11
12class SpyroAnimation : public Project{
13private:
16
17 Spyro spyro;
23
24public:
26 scene.AddObject(spyro.GetObject());
27
28 //spyro.GetObject()->SetMaterial(&nM);
29 }
30
31 void Initialize() override {
33 }
34
35 void Update(float ratio) override {
36 float x = fGenRotation.Update();
37 float sx = fGenScale.Update();
38
40
41 spyro.GetObject()->ResetVertices();
42
43 spyro.GetObject()->GetTransform()->SetRotation(rotation);
44 spyro.GetObject()->GetTransform()->SetScale(Vector3D(sx, sx, sx));
45 spyro.GetObject()->GetTransform()->SetPosition(Vector3D(96.0f, 0.0f, 0.0f));
46
47 spyro.GetObject()->UpdateTransform();
48
49 //oD.SineWaveSurfaceDeform(Vector3D(), 15.0f, 1.0f, 0.25f, 0.1f, ObjectDeformer::Axis::XAxis);
50 //oD.PerspectiveDeform(fGenPersp.Update(), Vector3D(0, 0, 0), ObjectDeformer::Axis::ZAxis);
51 }
52};
Encapsulates a 3D rotation using Euler angles and a specific order of application.
Definition EulerAngles.h:25
A class to generate various waveform functions with customizable parameters.
@ Sine
Sine waveform.
float Update()
Updates and calculates the next value of the waveform.
Manages HUB75 LED matrices with camera integration.
void Initialize() override
Initializes the HUB75Controller and sets up the LED matrix.
A material that visualizes surface normals as RGB colors.
Applies geometric transformations to one or more 3D objects.
Manages animations, rendering, and display operations.
Definition Project.h:31
Scene scene
The Scene object representing the rendered environment.
Definition Project.h:35
A mathematical construct representing a rotation in 3D space.
Definition Quaternion.h:30
Handles 3D rotations and conversions between various rotation representations.
Definition Rotation.h:32
Quaternion GetQuaternion()
Gets the quaternion representation of the rotation.
Definition Rotation.cpp:234
void AddObject(Object3D *object)
Adds a 3D object to the scene.
Definition Scene.cpp:31
ObjectDeformer oD
void Initialize() override
Initializes the project.
NormalMaterial nM
FunctionGenerator fGenScale
FunctionGenerator fGenRotation
FunctionGenerator fGenPersp
void Update(float ratio) override
Updates the project state based on the given ratio.
HUB75Controller controller
HUB75DeltaCameraManager cameras
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26
const EulerOrder EulerOrderXZYS
Order: X → Z → Y, static frame.