ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
PikachuAnimation.h
Go to the documentation of this file.
1#pragma once
2
3#include "Animation.h"
4#include "../Objects/Cube.h"
5#include "../Math/FunctionGenerator.h"
6#include "../Objects/Pikachu.h"
7
8class PikachuAnimation : public Animation{
9private:
10 Pikachu pikachu;
13
14public:
15 PikachuAnimation() : Animation(1) {
16 scene->AddObject(pikachu.GetObject());
17 }
18
19 void FadeIn(float stepRatio) override {}
20 void FadeOut(float stepRatio) override {}
21
22 void Update(float ratio) override {
23 float x = fGenRotation.Update();
24 float sx = fGenScale.Update();
25
27
28 pikachu.GetObject()->ResetVertices();
29
30 pikachu.GetObject()->GetTransform()->SetRotation(rotation);
31 pikachu.GetObject()->GetTransform()->SetScale(Vector3D(sx, sx, sx));
32 //pikachu.GetObject()->GetTransform()->SetScaleOffset(Vector3D(100.0f, 75.0f, 0.0f));
33 pikachu.GetObject()->GetTransform()->SetPosition(Vector3D(000.0f, 0.0f, 600.0f));
34
35 pikachu.GetObject()->UpdateTransform();
36 }
37};
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.
FunctionGenerator fGenScale
FunctionGenerator fGenRotation
void FadeIn(float stepRatio) override
void FadeOut(float stepRatio) override
void Update(float ratio) override
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.