Sly Engine
Collidable Class Reference

#include <Collidable.h>

Inheritance diagram for Collidable:
Inheritance graph
Collaboration diagram for Collidable:
Collaboration graph

Public Types

enum  VolumeType { VolumeType::BSPHERE, VolumeType::AABB, VolumeType::OBB }
 

Public Member Functions

 Collidable ()
 Default constructor. More...
 
 Collidable (const Collidable &)=delete
 Copy constructor. More...
 
 Collidable (Collidable &&)=delete
 Move constructor. More...
 
Collidableoperator= (const Collidable &)=delete
 Assignment operator. More...
 
Collidableoperator= (Collidable &&)=delete
 Move assignment operator. More...
 
virtual ~Collidable ()
 Deconstructor. More...
 
CollisionVolumeBSphereGetBSphere ()
 A reference to the stored Bsphere. More...
 
CollisionVolumeGetCollisionVolume ()
 A reference. More...
 
virtual void CollisionTerrain ()
 

Protected Member Functions

template<typename C >
void SetCollidableGroup ()
 Sets collidable group. More...
 
void SubmitCollisionRegistration ()
 Submits the collision registration from the user's perspective. More...
 
void SubmitCollisionDeregistration ()
 Submit collision deregistration. More...
 
void SetColliderModel (Model *mod, VolumeType vol)
 Sets collider model. More...
 
void UpdateCollisionData (const Matrix &mat)
 Updates the collision data described by mat. More...
 

Protected Attributes

CollidableGroup::CollidableCollectionRef pMyDeleteRef
 

Private Member Functions

void SceneRegistration ()
 Scene registration. More...
 
void SceneDeregistration ()
 Scene deregistration. More...
 

Private Attributes

CollisionManager::PWTypeID myID = CollisionManager::PWID_UNDEFINED
 Identifier for an ID number. More...
 
RegistrationState RegStateCurr
 
CollisionRegistrationCommandpRegCmd
 
CollisionDeregistrationCommandpDeregCmd
 
Model * pColModel
 To be used for collision tests. More...
 
CollisionVolumeColVolume
 The stored collision volume. More...
 
CollisionVolumeBSpheredefaultBS
 The default bSphere. More...
 

Friends

class CollidableAttorney
 

Member Enumeration Documentation

◆ VolumeType

Enumerator
BSPHERE 
AABB 
OBB 

Constructor & Destructor Documentation

◆ Collidable() [1/3]

Collidable::Collidable ( )

Default constructor.

◆ Collidable() [2/3]

Collidable::Collidable ( const Collidable )
delete

Copy constructor.

◆ Collidable() [3/3]

Collidable::Collidable ( Collidable &&  )
delete

Move constructor.

◆ ~Collidable()

Collidable::~Collidable ( )
virtual

Deconstructor.

Member Function Documentation

◆ CollisionTerrain()

void Collidable::CollisionTerrain ( )
virtual

◆ GetBSphere()

CollisionVolumeBSphere & Collidable::GetBSphere ( )

A reference to the stored Bsphere.

Here is the caller graph for this function:

◆ GetCollisionVolume()

CollisionVolume & Collidable::GetCollisionVolume ( )

A reference.

Here is the caller graph for this function:

◆ operator=() [1/2]

Collidable& Collidable::operator= ( Collidable &&  )
delete

Move assignment operator.

◆ operator=() [2/2]

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

Assignment operator.

◆ SceneDeregistration()

void Collidable::SceneDeregistration ( )
private

Scene deregistration.

Internal call to scenederegistration, called after the command has triggered. Performs the actual removal.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SceneRegistration()

void Collidable::SceneRegistration ( )
private

Scene registration.

Internal call to sceneregistraiton, called after the command has triggered. Performs the actual registration.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCollidableGroup()

template<typename C >
template< typename C > void Collidable::SetCollidableGroup ( )
inlineprotected

Sets collidable group.

Template Parameters
CType of the c.
Here is the call graph for this function:

◆ SetColliderModel()

void Collidable::SetColliderModel ( Model *  mod,
VolumeType  vol 
)
protected

Sets collider model.

Parameters
[in,out]modIf non-null, the modifier.

Sets which model to associate with the collision testing.

◆ SubmitCollisionDeregistration()

void Collidable::SubmitCollisionDeregistration ( )
protected

Submit collision deregistration.

This tells the engine to remove this object from the interest of collisions, once the command has triggered the object will no longer be processed for collision tests.

Here is the call graph for this function:

◆ SubmitCollisionRegistration()

void Collidable::SubmitCollisionRegistration ( )
protected

Submits the collision registration from the user's perspective.

Using this command will tell the engine that this game object is currently being processed for collision data given that the correct collider was setup.

Here is the call graph for this function:

◆ UpdateCollisionData()

void Collidable::UpdateCollisionData ( const Matrix &  mat)
protected

Updates the collision data described by mat.

Parameters
matThe matrix to adjust the relative bsphere

Call this whenever a matrix assoicated with the collidable object is adjusted.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ CollidableAttorney

friend class CollidableAttorney
friend

Member Data Documentation

◆ ColVolume

CollisionVolume* Collidable::ColVolume
private

The stored collision volume.

◆ defaultBS

CollisionVolumeBSphere* Collidable::defaultBS
private

The default bSphere.

◆ myID

Identifier for an ID number.

◆ pColModel

Model* Collidable::pColModel
private

To be used for collision tests.

◆ pDeregCmd

CollisionDeregistrationCommand* Collidable::pDeregCmd
private

◆ pMyDeleteRef

CollidableGroup::CollidableCollectionRef Collidable::pMyDeleteRef
protected

◆ pRegCmd

CollisionRegistrationCommand* Collidable::pRegCmd
private

◆ RegStateCurr

RegistrationState Collidable::RegStateCurr
private

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