ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
BeeAnimation.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/Bee.h"
7
8class BeeAnimation : public Animation{
9private:
10 Bee bee;
13
14public:
15 BeeAnimation() : Animation(1) {
16 scene->AddObject(bee.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 = fGenRotationX.Update();
24 float y = fGenRotationY.Update();
25
27
28 bee.GetObject()->ResetVertices();
29
30 bee.GetObject()->GetTransform()->SetRotation(rotation);
31 bee.GetObject()->GetTransform()->SetScale(Vector3D(1.2f, 1.2f, 1.2f));
32 //bee.GetObject()->GetTransform()->SetScaleOffset(Vector3D(100.0f, 75.0f, 0.0f));
33 bee.GetObject()->GetTransform()->SetPosition(Vector3D(000.0f, -40.0f, 600.0f));
34
35 bee.GetObject()->UpdateTransform();
36 }
37};
FunctionGenerator fGenRotationX
void FadeIn(float stepRatio) override
void FadeOut(float stepRatio) override
void Update(float ratio) override
FunctionGenerator fGenRotationY
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.
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.