Wraith  0.1.5
Basic 3D game engine in C++
Collidable Class Reference
Inheritance diagram for Collidable:
Inheritance graph
Collaboration diagram for Collidable:
Collaboration graph

Public Types

enum class  VolumeType { BSPHERE , AABB , OBB }
 Values that represent volume types. More...
 
enum class  VolumeHierarchyType { OCTREE }
 Values that represent volume hierarchy htypes. More...
 

Public Member Functions

 Collidable (const Collidable &)=default
 
Collidableoperator= (const Collidable &)=default
 
 Collidable (Collidable &&)=default
 
Collidableoperator= (Collidable &&)=default
 
const CollisionVolumegetCollisionVolume () const
 Gets the current collsion volume being used. More...
 
const CollisionVolumeBSpheregetBSphere () const
 Gets the default BSphere. More...
 
virtual void terrainCollision ()
 Terrain collision callback for this object. More...
 

Protected Member Functions

void setColliderModel (Model *pColliderModel, VolumeType volumeType)
 Sets collider model and Collision Volume type. More...
 
void setColliderModel (Model *pColliderModel, VolumeHierarchyType volumeHierarchyType, int maxDepth)
 Sets collider model and Collision Volume Hierarchy type. More...
 
void updateCollisionData (const Matrix &world)
 Updates the collision data described by world matrix. More...
 
template<class UserClass >
void setCollidableGroup ()
 Sets collidable group. More...
 
void submitCollisionRegistration ()
 Submit collision registration to current scene. More...
 
void submitCollisionDeregistration ()
 Submit collision deregistration. More...
 
bool isRegisteredForCollisions () const
 Query if this object is registered for collisions. More...
 

Private Member Functions

void registerToScene ()
 Registers to the current scene. More...
 
void deregisterFromScene ()
 Deregisters from the current scene. More...
 

Private Attributes

CollisionVolume_pCollisionVolume
 
CollisionVolumeBSphere_pBSphere
 
Model * _pColliderModel
 
CollisionManager::CollisionTypeID _myCollisionTypeID
 
CollidableGroup::StorageReference _deleteReference
 
CollisionRegisterCommand_pCollisionRegisterCommand
 
CollisionDeregisterCommand_pCollisionDeregisterCommand
 
RegistrationState _currentRegistrationState
 

Friends

class CollidableAttorney
 

Member Function Documentation

◆ deregisterFromScene()

void Collidable::deregisterFromScene ( )
private

Deregisters from the current scene.

DELAYED called with a command. NOT called by the user.

◆ getBSphere()

const CollisionVolumeBSphere & Collidable::getBSphere ( ) const

Gets the default BSphere.

Returns
The BSphere.

◆ getCollisionVolume()

const CollisionVolume & Collidable::getCollisionVolume ( ) const

Gets the current collsion volume being used.

Returns
The collsion volume.

◆ registerToScene()

void Collidable::registerToScene ( )
private

Registers to the current scene.

DELAYED called with a command. NOT called by the user.


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