Slippers Engine
 
Loading...
Searching...
No Matches
Updatable Class Reference

Responsible for Update functions. More...

#include <Updatable.h>

Collaboration diagram for Updatable:
Collaboration graph

Protected Member Functions

void SubmitRegistration ()
 Called when wanting to make changes every frame.
 
void SubmitDeregistration ()
 Called when wanting to stop making changes every frame.
 

Private Member Functions

virtual void Update ()
 Fill this with code that occurs during the Update phase.
 

Detailed Description

Responsible for Update functions.

Member Function Documentation

◆ SubmitDeregistration()

void Updatable::SubmitDeregistration ( )
protected

Called when wanting to stop making changes every frame.

Example:

void SubmitDeregistration()
Called when wanting to stop making changes every frame.
Definition Updatable.cpp:45

◆ SubmitRegistration()

void Updatable::SubmitRegistration ( )
protected

Called when wanting to make changes every frame.

Example:

void SubmitRegistration()
Called when wanting to make changes every frame.
Definition Updatable.cpp:37

◆ Update()

virtual void Updatable::Update ( )
privatevirtual

Fill this with code that occurs during the Update phase.

This function will be where you want to add code that will execute every frame.

Example:

void DemoObj::Update() {
//This will spin the object counter clockwise
MathTools::ChangeRotDeg(demoGraphicsObjOne->getWorld(), 0, 100 * TimeManager::GetFrameTime(), 0);
//Adjust collision to match new rotation
Collidable::UpdateCollisionData(demoGraphicsObjOne->getWorld());
}
void UpdateCollisionData(const Matrix &mat)
Updates Objects Collision Model for proper scaling and positioning.
Definition Collidable.cpp:65
static float GetFrameTime()
Returns Time Passed since Last Frame.
Definition TimeManager.h:66
static void ChangeRotDeg(Matrix &world, float x, float y, float z)
Changes rotation in degrees of object relative to current object: Rot * World.
Definition MathTools.cpp:172