Loading [MathJax]/extensions/tex2jax.js
ProtoTracer  1.0
Real-time 3D rendering and animation engine
All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
CreeperAnimation Class Reference

#include <CreeperAnimation.h>

Inheritance diagram for CreeperAnimation:
Collaboration diagram for CreeperAnimation:

Public Member Functions

 CreeperAnimation ()
 
void Update (float ratio) override
 Updates the project state based on the given ratio.
 
- Public Member Functions inherited from Project
 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

- Protected Member Functions inherited from Project
void RenderStartTimer ()
 Starts the render timer for measuring render performance.
 
void RenderEndTimer ()
 Stops the render timer and records the elapsed time.
 
- Protected Attributes inherited from Project
CameraManagercameras
 Pointer to the CameraManager for managing cameras.
 
Controllercontroller
 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.
 

Detailed Description

Definition at line 12 of file CreeperAnimation.h.

Constructor & Destructor Documentation

◆ CreeperAnimation()

CreeperAnimation ( )
inline

Definition at line 20 of file CreeperAnimation.h.

References Scene::AddObject(), creeper, and Project::scene.

Member Function Documentation

◆ Update()

void Update ( float  ratio)
inlineoverridevirtual

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.

Parameters
ratioA 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().

Member Data Documentation

◆ creeper

Creeper creeper
private

Definition at line 14 of file CreeperAnimation.h.

Referenced by CreeperAnimation(), and Update().

◆ fGenPos

FunctionGenerator fGenPos = FunctionGenerator(FunctionGenerator::Sine, 0.0f, 300.0f, 3.1f)
private

Definition at line 17 of file CreeperAnimation.h.

Referenced by Update().

◆ fGenRotation

FunctionGenerator fGenRotation = FunctionGenerator(FunctionGenerator::Sine, -30.0f, 30.0f, 2.6f)
private

Definition at line 15 of file CreeperAnimation.h.

Referenced by Update().

◆ fGenScale

FunctionGenerator fGenScale = FunctionGenerator(FunctionGenerator::Sine, 0.5f, 1.75f, 2.2f)
private

Definition at line 16 of file CreeperAnimation.h.

Referenced by Update().


The documentation for this class was generated from the following file: