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

Manages a collection of collidable objects. More...

#include <CollidableGroup.h>

Public Types

using CollidableCollection = std::list<Collidable*>
 Type alias for the collection of collidable objects.
 
using CollidableCollectionRef = CollidableCollection::iterator
 Type alias for the collection iterator.
 

Public Member Functions

 CollidableGroup (const CollidableGroup &)=delete
 
CollidableGroupoperator= (const CollidableGroup &)=delete
 
void Register (Collidable *c)
 Registers a collidable object.
 
void Deregister (Collidable *c)
 Deregisters a collidable object.
 
const CollidableCollectionGetColliderCollection ()
 Gets the collection of collidable objects.
 
CollisionVolumeAABBGetGroupAABB ()
 Gets the group AABB.
 
void UpdateGroupAABB ()
 Updates the group AABB based on the collidable objects.
 

Private Attributes

CollidableCollection ColCollection
 The collection of collidable objects.
 
CollisionVolumeAABBgroupAABB
 The AABB that encloses the group of collidable objects.
 
CollidablefirstCollidable
 Pointer to the first collidable object in the collection.
 

Detailed Description

Manages a collection of collidable objects.

The CollidableGroup class is responsible for managing a collection of collidable objects. It provides methods to register, deregister, and retrieve the collection of collidable objects.

Member Function Documentation

◆ Deregister()

void CollidableGroup::Deregister ( Collidable * c)

Deregisters a collidable object.

Parameters
cPointer to the collidable object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetColliderCollection()

const CollidableGroup::CollidableCollection & CollidableGroup::GetColliderCollection ( )

Gets the collection of collidable objects.

Returns
The collection of collidable objects.

◆ GetGroupAABB()

CollisionVolumeAABB & CollidableGroup::GetGroupAABB ( )

Gets the group AABB.

Returns
The group AABB.
Here is the caller graph for this function:

◆ Register()

void CollidableGroup::Register ( Collidable * c)

Registers a collidable object.

Parameters
cPointer to the collidable object.
Here is the call graph for this function:
Here is the caller graph for this function:

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