Sly Engine
CollisionVolumeOBB Class Reference

#include <CollisionVolumeOBB.h>

Inheritance diagram for CollisionVolumeOBB:
Inheritance graph
Collaboration diagram for CollisionVolumeOBB:
Collaboration graph

Public Member Functions

 CollisionVolumeOBB ()=default
 
 CollisionVolumeOBB (const CollisionVolumeOBB &)=delete
 
 CollisionVolumeOBB (CollisionVolumeOBB &&)=delete
 
CollisionVolumeOBBoperator= (const CollisionVolumeOBB &)=delete
 
CollisionVolumeOBBoperator= (CollisionVolumeOBB &&)=delete
 
virtual ~CollisionVolumeOBB ()=default
 
 CollisionVolumeOBB (Model *pModel)
 Specialized constructor for storing the max, min, and center. More...
 
virtual void DebugView (const Vect &col) const override
 Call to visualize the OBB from a generic collision volume with the specified color. More...
 
virtual void ComputeData (Model *pModel, const Matrix &mat) override
 Calculates the data that is required to compute the OBB's location. More...
 
virtual bool IntersectAccept (const CollisionVolume &otherVolume) const override
 Intersect acceptance for the first dispatch of Collision with an OBB. More...
 
virtual bool IntersectVisit (const CollisionVolumeBSphere &other) const override
 Intersect visit for a second dispatch of BSphere. More...
 
virtual bool IntersectVisit (const CollisionVolumeAABB &other) const override
 Intersect visit for a second dispatch of AABB. More...
 
virtual bool IntersectVisit (const CollisionVolumeOBB &other) const override
 Intersect visit for a second dispatch of OBB. More...
 
Vect GetCenter () const
 Gets the center of the OBB. More...
 
Vect GetMin () const
 Gets the minimum corner of the OBB. More...
 
Vect GetMax () const
 Gets the maximum corner of the OBB. More...
 
Matrix GetWorld () const
 Gets the world matrix stored in the OBB. More...
 
Matrix GetOriginalWorld () const
 
Vect GetHalfDiagonal () const
 Gets half diagonal. More...
 
float GetScale () const
 Gets the stored scale. More...
 
- Public Member Functions inherited from CollisionVolume
 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...
 

Private Attributes

Matrix world
 
Matrix originalWorld
 
Vect center
 
Vect minCorner
 
Vect maxCorner
 
Vect halfDiagonal
 
float scaleSquared
 

Constructor & Destructor Documentation

◆ CollisionVolumeOBB() [1/4]

CollisionVolumeOBB::CollisionVolumeOBB ( )
default

◆ CollisionVolumeOBB() [2/4]

CollisionVolumeOBB::CollisionVolumeOBB ( const CollisionVolumeOBB )
delete

◆ CollisionVolumeOBB() [3/4]

CollisionVolumeOBB::CollisionVolumeOBB ( CollisionVolumeOBB &&  )
delete

◆ ~CollisionVolumeOBB()

virtual CollisionVolumeOBB::~CollisionVolumeOBB ( )
virtualdefault

◆ CollisionVolumeOBB() [4/4]

CollisionVolumeOBB::CollisionVolumeOBB ( Model *  pModel)

Specialized constructor for storing the max, min, and center.

Parameters
[in,out]pModelIf non-null, the model.

Member Function Documentation

◆ ComputeData()

void CollisionVolumeOBB::ComputeData ( Model *  pModel,
const Matrix &  mat 
)
overridevirtual

Calculates the data that is required to compute the OBB's location.

Parameters
[in,out]pModelIf non-null, the model.
matThe world matrix.

Implements CollisionVolume.

◆ DebugView()

void CollisionVolumeOBB::DebugView ( const Vect &  col) const
overridevirtual

Call to visualize the OBB from a generic collision volume with the specified color.

Parameters
colThe color.

Implements CollisionVolume.

Here is the call graph for this function:

◆ GetCenter()

Vect CollisionVolumeOBB::GetCenter ( ) const

Gets the center of the OBB.

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

◆ GetHalfDiagonal()

Vect CollisionVolumeOBB::GetHalfDiagonal ( ) const

Gets half diagonal.

Returns
The half diagonal.

◆ GetMax()

Vect CollisionVolumeOBB::GetMax ( ) const

Gets the maximum corner of the OBB.

Returns
The calculated maximum.
Here is the caller graph for this function:

◆ GetMin()

Vect CollisionVolumeOBB::GetMin ( ) const

Gets the minimum corner of the OBB.

Returns
The calculated minimum.
Here is the caller graph for this function:

◆ GetOriginalWorld()

Matrix CollisionVolumeOBB::GetOriginalWorld ( ) const

◆ GetScale()

float CollisionVolumeOBB::GetScale ( ) const

Gets the stored scale.

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

◆ GetWorld()

Matrix CollisionVolumeOBB::GetWorld ( ) const

Gets the world matrix stored in the OBB.

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

◆ IntersectAccept()

bool CollisionVolumeOBB::IntersectAccept ( const CollisionVolume otherVolume) const
overridevirtual

Intersect acceptance for the first dispatch of Collision with an OBB.

Parameters
otherVolumeThe other volume (type not known, second dispatch required).
Returns
True if it succeeds, false if it fails.

Implements CollisionVolume.

Here is the call graph for this function:

◆ IntersectVisit() [1/3]

bool CollisionVolumeOBB::IntersectVisit ( const CollisionVolumeAABB other) const
overridevirtual

Intersect visit for a second dispatch of AABB.

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

Implements CollisionVolume.

Here is the call graph for this function:

◆ IntersectVisit() [2/3]

bool CollisionVolumeOBB::IntersectVisit ( const CollisionVolumeBSphere other) const
overridevirtual

Intersect visit for a second dispatch of BSphere.

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

Implements CollisionVolume.

Here is the call graph for this function:

◆ IntersectVisit() [3/3]

bool CollisionVolumeOBB::IntersectVisit ( const CollisionVolumeOBB other) const
overridevirtual

Intersect visit for a second dispatch of OBB.

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

Implements CollisionVolume.

Here is the call graph for this function:

◆ operator=() [1/2]

CollisionVolumeOBB& CollisionVolumeOBB::operator= ( CollisionVolumeOBB &&  )
delete

◆ operator=() [2/2]

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

Member Data Documentation

◆ center

Vect CollisionVolumeOBB::center
private

◆ halfDiagonal

Vect CollisionVolumeOBB::halfDiagonal
private

◆ maxCorner

Vect CollisionVolumeOBB::maxCorner
private

◆ minCorner

Vect CollisionVolumeOBB::minCorner
private

◆ originalWorld

Matrix CollisionVolumeOBB::originalWorld
private

◆ scaleSquared

float CollisionVolumeOBB::scaleSquared
private

◆ world

Matrix CollisionVolumeOBB::world
private

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