SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
Drawable Class Reference

Base class for objects that can be drawn in the game loop. More...

#include <Drawable.h>

Inheritance diagram for Drawable:
Inheritance graph

Protected Member Functions

 Drawable (const Drawable &)=delete
 
Drawableoperator= (const Drawable &)=delete
 
void SubmitDrawRegistration ()
 Submits the draw registration for the GameObject.
 
void SubmitDrawDeregistration ()
 Submits the draw deregistration for the GameObject.
 

Private Member Functions

virtual void Draw ()
 Virtual method to be implemented by derived classes for draw functionality.
 
virtual void Draw2D ()
 Virtual method to be implemented by derived classes for 2D draw functionality.
 
void SceneRegistration ()
 Registers the GameObject for drawing in the scene.
 
void SceneDeregistration ()
 Deregisters the GameObject from drawing in the scene.
 

Private Attributes

RegistrationState RegStateCurr
 The current registration state of the GameObject.
 
DrawRegistrationCommandptrDrawRegistrationCmd
 Pointer to the draw registration command for the GameObject.
 
DrawDeregistrationCommandptrDrawDeregistrationCmd
 Pointer to the draw deregistration command for the GameObject.
 
DrawableManager::StorageListRef pMyDeleteRef
 Reference to the storage list iterator for the GameObject.
 

Friends

class DrawableAttorney
 

Detailed Description

Base class for objects that can be drawn in the game loop.

The Drawable class provides a base implementation for objects that need to be drawn during the game loop. It manages registration and deregistration with the DrawableManager and provides virtual draw methods that can be overridden by derived classes.

Member Function Documentation

◆ Draw2D()

virtual void Drawable::Draw2D ( )
inlineprivatevirtual

Virtual method to be implemented by derived classes for 2D draw functionality.

Reimplemented in Canvas.

Here is the caller graph for this function:

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