flimEngine
CollidableGroup< C > Class Template Reference

#include <CollidableGroup.h>

Inheritance diagram for CollidableGroup< C >:
Inheritance graph
Collaboration diagram for CollidableGroup< C >:
Collaboration graph

Static Public Member Functions

static const std::set< C * > & GetCollection ()
 Gets the collection of collidables. More...
 
static errcode Register (C *c)
 Registers a collidable to this group. More...
 
static errcode Deregister (C *c)
 Deregisters the collidable to this group. More...
 
static errcode Terminate ()
 Singleton termination method. More...
 
static errcode setAABB (const Vect &min, const Vect &max)
 
static const CollisionVolumeAABBgetAABB ()
 

Private Member Functions

 CollidableGroup ()
 
 CollidableGroup (const CollidableGroup &)=delete
 
CollidableGroupoperator= (const CollidableGroup &)=delete
 
 ~CollidableGroup ()
 
const std::set< C * > & privGetCollection ()
 
errcode privRegister (C *c)
 
errcode privDeregister (C *c)
 
errcode privTerminate ()
 
errcode privSetAABB (const Vect &min, const Vect &max)
 
const CollisionVolumeAABBprivGetAABB ()
 

Static Private Member Functions

static CollidableGroupInstance ()
 

Private Attributes

std::set< C * > collidables
 
CollisionVolumeAABB collVolumeAABB
 

Static Private Attributes

static CollidableGroupinstance = nullptr
 

Constructor & Destructor Documentation

◆ CollidableGroup() [1/2]

template<typename C >
CollidableGroup< C >::CollidableGroup ( )
private

◆ CollidableGroup() [2/2]

template<typename C>
CollidableGroup< C >::CollidableGroup ( const CollidableGroup< C > &  )
privatedelete

◆ ~CollidableGroup()

template<typename C>
CollidableGroup< C >::~CollidableGroup ( )
inlineprivate

Member Function Documentation

◆ Deregister()

template<typename C>
static errcode CollidableGroup< C >::Deregister ( C *  c)
inlinestatic

Deregisters the collidable to this group.

Author
Jack Campbell
Date
3/5/2017
Parameters
[in,out]cIf non-null, the collidable to deregister.
Returns
An errcode.

◆ getAABB()

template<typename C>
static const CollisionVolumeAABB& CollidableGroup< C >::getAABB ( )
inlinestatic

◆ GetCollection()

template<typename C>
static const std::set< C * > & CollidableGroup< C >::GetCollection ( )
inlinestatic

Gets the collection of collidables.

Author
Jack Campbell
Date
3/5/2017
Returns
Null if it fails, else the collection.

◆ Instance()

template<typename C>
static CollidableGroup& CollidableGroup< C >::Instance ( )
inlinestaticprivate

◆ operator=()

template<typename C>
CollidableGroup& CollidableGroup< C >::operator= ( const CollidableGroup< C > &  )
privatedelete

◆ privDeregister()

template<typename C >
errcode CollidableGroup< C >::privDeregister ( C *  c)
inlineprivate

◆ privGetAABB()

template<typename C >
const CollisionVolumeAABB & CollidableGroup< C >::privGetAABB ( )
inlineprivate

◆ privGetCollection()

template<typename C >
const std::set< C * > & CollidableGroup< C >::privGetCollection ( )
inlineprivate

◆ privRegister()

template<typename C >
errcode CollidableGroup< C >::privRegister ( C *  c)
inlineprivate

◆ privSetAABB()

template<typename C >
errcode CollidableGroup< C >::privSetAABB ( const Vect &  min,
const Vect &  max 
)
inlineprivate

◆ privTerminate()

template<typename C >
errcode CollidableGroup< C >::privTerminate ( )
inlineprivate

◆ Register()

template<typename C>
static errcode CollidableGroup< C >::Register ( C *  c)
inlinestatic

Registers a collidable to this group.

Author
Jack Campbell
Date
3/5/2017
Parameters
[in,out]cCollidable to register
Returns
An errcode.

◆ setAABB()

template<typename C>
static errcode CollidableGroup< C >::setAABB ( const Vect &  min,
const Vect &  max 
)
inlinestatic

◆ Terminate()

template<typename C>
static errcode CollidableGroup< C >::Terminate ( )
inlinestatic

Singleton termination method.

Author
Jack Campbell
Date
3/5/2017
Returns
An errcode.

Member Data Documentation

◆ collidables

template<typename C>
std::set<C*> CollidableGroup< C >::collidables
private

◆ collVolumeAABB

template<typename C>
CollisionVolumeAABB CollidableGroup< C >::collVolumeAABB
private

◆ instance

template<typename C>
CollidableGroup< C > * CollidableGroup< C >::instance = nullptr
staticprivate

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