ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
CreeperAnimation.h
Go to the documentation of this file.
1#pragma once
2
5#include "../../Assets/Models/OBJ/Creeper.h"
8
11
13private:
14 Creeper creeper;
18
19public:
20 CreeperAnimation() : Animation(1) {
21 scene->AddObject(creeper.GetObject());
22 }
23
24 void Update(float ratio) override {
25 float x = fGenRotation.Update();
26 float sx = fGenScale.Update();
27 float px = fGenPos.Update() / 4.0f;
28
30
31 creeper.GetObject()->ResetVertices();
32
33 creeper.GetObject()->GetTransform()->SetRotation(rotation);
34 creeper.GetObject()->GetTransform()->SetScale(Vector3D(sx * 0.25f, sx * -0.25f, sx * 0.25f));
35 //spyro.GetObject()->GetTransform()->SetScaleOffset(Vector3D(100.0f, 75.0f, 0.0f));
36 creeper.GetObject()->GetTransform()->SetPosition(Vector3D(0.0f + 96.0f, px - 0.0f, 600.0f));
37
38 creeper.GetObject()->UpdateTransform();
39 }
40};
Provides a generator for common mathematical wave functions.
Declares the HUB75Controller class for managing HUB75 LED matrices.
A material class that visualizes surface normals.
Defines the ObjectDeformer class for deforming 3D objects using various transformations.
Declares the Project class for managing animations, rendering, and display operations.
FunctionGenerator fGenPos
FunctionGenerator fGenScale
FunctionGenerator fGenRotation
void Update(float ratio) override
Updates the project state based on the given ratio.
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.
Project(CameraManager *cameras, Controller *controller, uint8_t numObjects)
Constructs a Project with specified camera manager and controller.
Definition Project.cpp:3
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
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.