ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
SpyroRotateAnimation.h
Go to the documentation of this file.
1#pragma once
2
3#include "Animation.h"
4#include "../Math/FunctionGenerator.h"
5#include "../Objects/Spyro.h"
6#include "../Sensors/SerialInterpreter.h"
7
8class SpyroRotateAnimation : public Animation{
9private:
10 Spyro spyro;
13
14public:
15 SpyroRotateAnimation() : Animation(1) {
16 scene->AddObject(spyro.GetObject());
17
19
20 //spyro.GetObject()->SetMaterial(&sM);
21 }
22
23 void FadeIn(float stepRatio) override {}
24 void FadeOut(float stepRatio) override {}
25
26 void Update(float ratio) override {
28
29 float sx = fGenScale.Update();
30
33
34 spyro.GetObject()->ResetVertices();
35
36 spyro.GetObject()->GetTransform()->SetRotation(rotation);
37 spyro.GetObject()->GetTransform()->SetScale(Vector3D(sx, sx, sx));
38 spyro.GetObject()->GetTransform()->SetPosition(Vector3D(120.0f, 40.0f, 600.0f));
39
40 spyro.GetObject()->UpdateTransform();
41 }
42};
A class to generate various waveform functions with customizable parameters.
@ Sine
Sine waveform.
float Update()
Updates and calculates the next value of the waveform.
A mathematical construct representing a rotation in 3D space.
Definition Quaternion.h:30
Represents an RGB color and provides methods for manipulation.
Definition RGBColor.h:23
static RGBColor GetColor()
static void Initialize()
static Quaternion GetOrientation()
A material that applies a single, solid RGB color to surfaces.
void SetRGB(RGBColor rgb)
Sets a new RGB color for the material.
FunctionGenerator fGenScale
void FadeIn(float stepRatio) override
void FadeOut(float stepRatio) override
void Update(float ratio) override
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26