Clutter Engine 0.0.1
Loading...
Searching...
No Matches
DefaultMap Class Reference
Inheritance diagram for DefaultMap:
clt::Level

Public Member Functions

 DefaultMap (std::string pName="Level")
 
void Load () override
 Loads the level. Must be implemented by derived classes.
 
void Update () override
 Updates the level. Must be implemented by derived classes.
 
void Close () override
 Closes the level. Must be implemented by derived classes.
 
- Public Member Functions inherited from clt::Level
 Level (std::string pTitle="Scene")
 Constructs a new level with the given title.
 
 ~Level ()
 Destroys the level and cleans up resources.
 
void SetManager (RendererGL *pRenderer, Physics *pPhysics, LevelManager *pManager)
 Sets the renderer, physics, and manager for the level.
 
void OpenLevel (const std::string &pLevelName)
 Opens a new level by name.
 
bool LineTrace (Vector3 start, Vector3 direction, float maxDistance, raycastHit &hit, bool debugPersistant=false, Actor *self=nullptr)
 Performs a line trace (raycast) in the level.
 
void InternalUpdate ()
 Internal update function called by the engine.
 
void Unload ()
 Unloads the level and cleans up resources.
 
template<typename T , typename... Args>
T * AddActor (Args &&... args)
 Adds an actor of type T to the level.
 
template<typename T >
void DestroyActor (Actor *pActor)
 Removes an actor from the level.
 
template<typename T >
std::vector< T * > GetAllActorOfType ()
 Gets all actors of a specific type.
 
template<typename T >
T * GetActorOfType ()
 Gets the first actor of a specific type.
 
RendererGLGetRenderer () const
 Gets the renderer for the level.
 
PhysicsGetPhysics () const
 Gets the physics system for the level.
 

Additional Inherited Members

- Public Attributes inherited from clt::Level
friend LevelManager
 
- Static Public Attributes inherited from clt::Level
static LevelActiveScene
 Pointer to the currently active scene.
 
- Protected Member Functions inherited from clt::Level
- Protected Attributes inherited from clt::Level
std::string mTitle
 The title of the scene.
 
RendererGLmRenderer
 The renderer used for drawing the scene.
 
PhysicsmPhysics
 The physics system used in the level.
 
LevelManagermManager
 The manager responsible for this level.
 
std::unordered_map< size_t, std::vector< Actor * > > mActors
 Map of actors categorized by their type.
 
std::vector< Actor * > mPendingActors
 List of actors pending to be added to the level.
 
std::vector< Actor * > mDeadActors
 List of actors pending to be removed from the level.
 

Member Function Documentation

◆ Close()

void DefaultMap::Close ( )
overridevirtual

Closes the level. Must be implemented by derived classes.

Implements clt::Level.

◆ Load()

void DefaultMap::Load ( )
overridevirtual

Loads the level. Must be implemented by derived classes.

Implements clt::Level.

◆ Update()

void DefaultMap::Update ( )
overridevirtual

Updates the level. Must be implemented by derived classes.

Implements clt::Level.


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