Sly Engine
CollisionVolume Class Referenceabstract

#include <CollisionVolume.h>

Inheritance diagram for CollisionVolume:
Inheritance graph
Collaboration diagram for CollisionVolume:
Collaboration graph

Public Member Functions

 CollisionVolume ()=default
 Default constructor. More...
 
 CollisionVolume (const CollisionVolume &)=delete
 Copy constructor. More...
 
 CollisionVolume (CollisionVolume &&)=delete
 Move constructor. More...
 
CollisionVolumeoperator= (const CollisionVolume &)=default
 Assignment operator. More...
 
CollisionVolumeoperator= (CollisionVolume &&)=delete
 Move assignment operator. More...
 
virtual ~CollisionVolume ()=default
 Deconstructor. More...
 
virtual void ComputeData (Model *mod, const Matrix &mat)=0
 Calculates the data. Pure virtual. More...
 
virtual void DebugView (const Vect &col) const =0
 Debug view for internal acknowledgment of type information on a generic collision volume. More...
 
virtual bool IntersectAccept (const CollisionVolume &other) const =0
 Intersect accept utilizing the visitor pattern. More...
 
virtual bool IntersectVisit (const CollisionVolumeBSphere &other) const =0
 Intersect visit for Sphere, using the visitor pattern. More...
 
virtual bool IntersectVisit (const CollisionVolumeAABB &other) const =0
 Intersect visit for AABB, using the visitor pattern. More...
 
virtual bool IntersectVisit (const CollisionVolumeOBB &other) const =0
 Intersect visit for OBB, using the visitor pattern. More...
 

Constructor & Destructor Documentation

◆ CollisionVolume() [1/3]

CollisionVolume::CollisionVolume ( )
default

Default constructor.

◆ CollisionVolume() [2/3]

CollisionVolume::CollisionVolume ( const CollisionVolume )
delete

Copy constructor.

◆ CollisionVolume() [3/3]

CollisionVolume::CollisionVolume ( CollisionVolume &&  )
delete

Move constructor.

◆ ~CollisionVolume()

virtual CollisionVolume::~CollisionVolume ( )
virtualdefault

Deconstructor.

Member Function Documentation

◆ ComputeData()

void CollisionVolume::ComputeData ( Model *  mod,
const Matrix &  mat 
)
pure virtual

Calculates the data. Pure virtual.

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

Implemented in CollisionVolumeOBB, CollisionVolumeAABB, and CollisionVolumeBSphere.

Here is the caller graph for this function:

◆ DebugView()

void CollisionVolume::DebugView ( const Vect &  col) const
pure virtual

Debug view for internal acknowledgment of type information on a generic collision volume.

Parameters
colThe col.

The debug view is utilizing a trick when calculating the collider visualization models. We are using a generic CollisionVolume within the visualization that does not contain information on what type of model is being passed. Forcing all derived types to implement this functions allows a generic call on specific objects to act appropriately.

Implemented in CollisionVolumeOBB, CollisionVolumeAABB, and CollisionVolumeBSphere.

Here is the caller graph for this function:

◆ IntersectAccept()

bool CollisionVolume::IntersectAccept ( const CollisionVolume other) const
pure virtual

Intersect accept utilizing the visitor pattern.

Parameters
otherThe other collision volume.
Returns
True if it succeeds, false if it fails.

Implemented in CollisionVolumeOBB, CollisionVolumeAABB, and CollisionVolumeBSphere.

Here is the caller graph for this function:

◆ IntersectVisit() [1/3]

bool CollisionVolume::IntersectVisit ( const CollisionVolumeAABB other) const
pure virtual

Intersect visit for AABB, using the visitor pattern.

Parameters
otherThe other AABB.
Returns
True if it succeeds, false if it fails.

Implemented in CollisionVolumeOBB, CollisionVolumeAABB, and CollisionVolumeBSphere.

◆ IntersectVisit() [2/3]

bool CollisionVolume::IntersectVisit ( const CollisionVolumeBSphere other) const
pure virtual

Intersect visit for Sphere, using the visitor pattern.

Parameters
otherThe other collision volume.
Returns
True if it succeeds, false if it fails.

Implemented in CollisionVolumeOBB, CollisionVolumeAABB, and CollisionVolumeBSphere.

Here is the caller graph for this function:

◆ IntersectVisit() [3/3]

bool CollisionVolume::IntersectVisit ( const CollisionVolumeOBB other) const
pure virtual

Intersect visit for OBB, using the visitor pattern.

Parameters
otherThe other OBB.
Returns
True if it succeeds, false if it fails.

Implemented in CollisionVolumeOBB, CollisionVolumeAABB, and CollisionVolumeBSphere.

◆ operator=() [1/2]

CollisionVolume& CollisionVolume::operator= ( CollisionVolume &&  )
delete

Move assignment operator.

◆ operator=() [2/2]

CollisionVolume& CollisionVolume::operator= ( const CollisionVolume )
default

Assignment operator.


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