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 | |
CollidableGroup & | operator= (const CollidableGroup &)=delete |
void | Register (Collidable *c) |
Registers a collidable object. | |
void | Deregister (Collidable *c) |
Deregisters a collidable object. | |
const CollidableCollection & | GetColliderCollection () |
Gets the collection of collidable objects. | |
CollisionVolumeAABB & | GetGroupAABB () |
Gets the group AABB. | |
void | UpdateGroupAABB () |
Updates the group AABB based on the collidable objects. | |
Private Attributes | |
CollidableCollection | ColCollection |
The collection of collidable objects. | |
CollisionVolumeAABB * | groupAABB |
The AABB that encloses the group of collidable objects. | |
Collidable * | firstCollidable |
Pointer to the first collidable object in the collection. | |
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.
void CollidableGroup::Deregister | ( | Collidable * | c | ) |
Deregisters a collidable object.
c | Pointer to the collidable object. |
const CollidableGroup::CollidableCollection & CollidableGroup::GetColliderCollection | ( | ) |
Gets the collection of collidable objects.
CollisionVolumeAABB & CollidableGroup::GetGroupAABB | ( | ) |
Gets the group AABB.
void CollidableGroup::Register | ( | Collidable * | c | ) |
Registers a collidable object.
c | Pointer to the collidable object. |