Sly Engine
CollidableGroup Class Reference

#include <CollidableGroup.h>

Inheritance diagram for CollidableGroup:
Inheritance graph
Collaboration diagram for CollidableGroup:
Collaboration graph

Public Types

typedef std::list< Collidable * > CollidableCollection
 Defines an alias representing collection of collidables. More...
 
typedef CollidableCollection::iterator CollidableCollectionRef
 Defines an alias representing the collidable collection reference. More...
 

Public Member Functions

 CollidableGroup ()
 Default constructor. More...
 
 CollidableGroup (const CollidableGroup &)=delete
 Copy constructor. More...
 
 CollidableGroup (CollidableGroup &&)=delete
 Move constructor. More...
 
CollidableGroupoperator= (const CollidableGroup &)=delete
 Assignment operator. More...
 
CollidableGroupoperator= (CollidableGroup &&)=delete
 Move assignment operator. More...
 
 ~CollidableGroup ()
 Deconstructor. More...
 
void Register (Collidable *c, CollidableCollectionRef &ref)
 Registers this. More...
 
void Deregister (const CollidableCollectionRef &ref)
 Deregisters given collidable. More...
 
const CollidableCollectionGetColliderCollection ()
 Gets collider collection. More...
 
CollisionVolumeAABBprivGetAABB ()
 Gives the stored AABB for the collider group. More...
 
void UpdateAABB ()
 Updates the AABB Collision data (ONCE PER FRAME) More...
 

Private Attributes

CollidableCollection CollideCol
 The collidable collection. More...
 
CollisionVolumeAABBgroupAABB
 The shared AABB for the group. More...
 

Member Typedef Documentation

◆ CollidableCollection

Defines an alias representing collection of collidables.

◆ CollidableCollectionRef

CollidableCollection::iterator CollidableGroup::CollidableCollectionRef

Defines an alias representing the collidable collection reference.

Constructor & Destructor Documentation

◆ CollidableGroup() [1/3]

CollidableGroup::CollidableGroup ( )

Default constructor.

◆ CollidableGroup() [2/3]

CollidableGroup::CollidableGroup ( const CollidableGroup )
delete

Copy constructor.

◆ CollidableGroup() [3/3]

CollidableGroup::CollidableGroup ( CollidableGroup &&  )
delete

Move constructor.

◆ ~CollidableGroup()

CollidableGroup::~CollidableGroup ( )

Deconstructor.

Member Function Documentation

◆ Deregister()

void CollidableGroup::Deregister ( const CollidableCollectionRef ref)

Deregisters given collidable.

Parameters
refThe reference.
Here is the caller graph for this function:

◆ GetColliderCollection()

const CollidableCollection & CollidableGroup::GetColliderCollection ( )

Gets collider collection.

Returns
The collider collection.
Here is the caller graph for this function:

◆ operator=() [1/2]

CollidableGroup& CollidableGroup::operator= ( CollidableGroup &&  )
delete

Move assignment operator.

◆ operator=() [2/2]

CollidableGroup& CollidableGroup::operator= ( const CollidableGroup )
delete

Assignment operator.

◆ privGetAABB()

CollisionVolumeAABB & CollidableGroup::privGetAABB ( )

Gives the stored AABB for the collider group.

Returns
A reference to a CollisionVolumeAABB.
Here is the caller graph for this function:

◆ Register()

void CollidableGroup::Register ( Collidable c,
CollidableCollectionRef ref 
)

Registers this.

Parameters
[in,out]cIf non-null, a Collidable to process.
[in,out]refThe reference to the collidable storage.
Here is the caller graph for this function:

◆ UpdateAABB()

void CollidableGroup::UpdateAABB ( )

Updates the AABB Collision data (ONCE PER FRAME)

Here is the call graph for this function:

Member Data Documentation

◆ CollideCol

CollidableCollection CollidableGroup::CollideCol
private

The collidable collection.

◆ groupAABB

CollisionVolumeAABB* CollidableGroup::groupAABB
private

The shared AABB for the group.

To work with Tiered collision, a group AABB was added for cheaper intersection testing with multiple collider volumes.


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