![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
#include <CreeperAnimation.h>
Public Member Functions | |
CreeperAnimation () | |
void | Update (float ratio) override |
Updates the project state based on the given ratio. | |
![]() | |
Project (CameraManager *cameras, Controller *controller, uint8_t numObjects) | |
Constructs a Project with specified camera manager and controller. | |
float | GetAnimationTime () |
Retrieves the time spent on animations. | |
float | GetRenderTime () |
Retrieves the time spent on rendering. | |
float | GetDisplayTime () |
Retrieves the time spent on display operations. | |
float | GetFrameRate () |
Retrieves the current frame rate. | |
virtual void | Initialize ()=0 |
Initializes the project. | |
void | Animate (float ratio) |
Animates the project state based on the given ratio. | |
void | Render () |
Renders the scene. | |
void | Display () |
Updates the display with the rendered content. | |
void | PrintStats () |
Prints performance statistics such as frame rate and operation times. | |
Private Attributes | |
Creeper | creeper |
FunctionGenerator | fGenRotation = FunctionGenerator(FunctionGenerator::Sine, -30.0f, 30.0f, 2.6f) |
FunctionGenerator | fGenScale = FunctionGenerator(FunctionGenerator::Sine, 0.5f, 1.75f, 2.2f) |
FunctionGenerator | fGenPos = FunctionGenerator(FunctionGenerator::Sine, 0.0f, 300.0f, 3.1f) |
Additional Inherited Members | |
![]() | |
void | RenderStartTimer () |
Starts the render timer for measuring render performance. | |
void | RenderEndTimer () |
Stops the render timer and records the elapsed time. | |
![]() | |
CameraManager * | cameras |
Pointer to the CameraManager for managing cameras. | |
Controller * | controller |
Pointer to the Controller for controlling the display. | |
Scene | scene |
The Scene object representing the rendered environment. | |
RunningAverageFilter< 50 > | avgFPS = RunningAverageFilter<50>(0.05f) |
Running average filter for frame rate calculation. | |
long | previousAnimationTime = 0 |
Time of the previous animation frame in microseconds. | |
long | previousRenderTime = 0 |
Time of the previous render frame in microseconds. | |
long | previousDisplayTime = 0 |
Time of the previous display frame in microseconds. | |
float | fade = 0.0f |
Fade parameter for animations. | |
float | animationTime = 0.0f |
Time spent on animation in milliseconds. | |
float | renderTime = 0.0f |
Time spent on rendering in milliseconds. | |
float | displayTime = 0.0f |
Time spent on display in milliseconds. | |
Definition at line 12 of file CreeperAnimation.h.
|
inline |
Definition at line 20 of file CreeperAnimation.h.
References Scene::AddObject(), creeper, and Project::scene.
Updates the project state based on the given ratio.
This method is intended to be overridden by derived classes to define specific update logic for animations or state transitions.
ratio | A float representing the interpolation ratio for updates. |
Implements Project.
Definition at line 24 of file CreeperAnimation.h.
References creeper, EulerConstants::EulerOrderXZYS, fGenPos, fGenRotation, fGenScale, Rotation::GetQuaternion(), and FunctionGenerator::Update().
|
private |
Definition at line 14 of file CreeperAnimation.h.
Referenced by CreeperAnimation(), and Update().
|
private |
Definition at line 17 of file CreeperAnimation.h.
Referenced by Update().
|
private |
Definition at line 15 of file CreeperAnimation.h.
Referenced by Update().
|
private |
Definition at line 16 of file CreeperAnimation.h.
Referenced by Update().