Sly Engine
CollisionVolumeAABB Class Reference

#include <CollisionVolumeAABB.h>

Inheritance diagram for CollisionVolumeAABB:
Inheritance graph
Collaboration diagram for CollisionVolumeAABB:
Collaboration graph

Public Member Functions

 CollisionVolumeAABB ()
 Default constructor. More...
 
 CollisionVolumeAABB (const CollisionVolumeAABB &)=delete
 Copy constructor. More...
 
 CollisionVolumeAABB (CollisionVolumeAABB &&)=delete
 Move constructor. More...
 
CollisionVolumeAABBoperator= (const CollisionVolumeAABB &)=delete
 Assignment operator. More...
 
CollisionVolumeAABBoperator= (CollisionVolumeAABB &&)=delete
 Move assignment operator. More...
 
virtual ~CollisionVolumeAABB ()=default
 Deconstructor. More...
 
 CollisionVolumeAABB (Model *pModel)
 
virtual void DebugView (const Vect &col) const override
 Call to visualize the internal AABB from a generic CollisionVolume type. More...
 
virtual void ComputeData (Model *pModel, const Matrix &mat) override
 Calculates the data that is required for the AABB to know. More...
 
virtual void ComputeData (Vect &min, Vect &max)
 
virtual bool IntersectAccept (const CollisionVolume &otherVolume) const override
 Intersect accept for a generic collision volume. More...
 
virtual bool IntersectVisit (const CollisionVolumeBSphere &other) const override
 Intersect visit for another collision volume of type BSphere. More...
 
virtual bool IntersectVisit (const CollisionVolumeAABB &other) const override
 Intersect visit for another collision volume of similar type (AABB). More...
 
virtual bool IntersectVisit (const CollisionVolumeOBB &other) const override
 Intersect visit for another collision volume of type OBB. More...
 
Vect GetCenter () const
 Gets the center of the AABB and returns it. More...
 
Vect GetMin () const
 Gets the minimum of the AABB (calculated through ComputeData) and returns it. More...
 
Vect GetMax () const
 Gets the maximum of the AABB (calculated through ComputeData) and returns it. More...
 
Vect GetHalfDiagonal () const
 Gets half diagonal. More...
 
float GetScale () const
 Gets the scale. More...
 
Matrix GetWorld () const
 Gets the world matrix. More...
 
Matrix GetOriginalWorld () const
 
void SetMinMax (Vect &min, Vect &max)
 Sets minimum and maximum corners of the AABB, no additional computation. 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
 Stored Center from ComputeData. More...
 
Vect minCorner
 Stored minimum corner from ComputeData. More...
 
Vect maxCorner
 Stored maximum corner from ComputeData. More...
 
Vect halfDiagonal
 
float scaleSquared
 

Constructor & Destructor Documentation

◆ CollisionVolumeAABB() [1/4]

CollisionVolumeAABB::CollisionVolumeAABB ( )

Default constructor.

◆ CollisionVolumeAABB() [2/4]

CollisionVolumeAABB::CollisionVolumeAABB ( const CollisionVolumeAABB )
delete

Copy constructor.

◆ CollisionVolumeAABB() [3/4]

CollisionVolumeAABB::CollisionVolumeAABB ( CollisionVolumeAABB &&  )
delete

Move constructor.

◆ ~CollisionVolumeAABB()

virtual CollisionVolumeAABB::~CollisionVolumeAABB ( )
virtualdefault

Deconstructor.

◆ CollisionVolumeAABB() [4/4]

CollisionVolumeAABB::CollisionVolumeAABB ( Model *  pModel)
Here is the call graph for this function:

Member Function Documentation

◆ ComputeData() [1/2]

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

Calculates the data that is required for the AABB to know.

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

Implements CollisionVolume.

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

◆ ComputeData() [2/2]

void CollisionVolumeAABB::ComputeData ( Vect &  min,
Vect &  max 
)
virtual
Here is the call graph for this function:

◆ DebugView()

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

Call to visualize the internal AABB from a generic CollisionVolume type.

Parameters
colThe color.

Implements CollisionVolume.

Here is the call graph for this function:

◆ GetCenter()

Vect CollisionVolumeAABB::GetCenter ( ) const

Gets the center of the AABB and returns it.

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

◆ GetHalfDiagonal()

Vect CollisionVolumeAABB::GetHalfDiagonal ( ) const

Gets half diagonal.

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

◆ GetMax()

Vect CollisionVolumeAABB::GetMax ( ) const

Gets the maximum of the AABB (calculated through ComputeData) and returns it.

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

◆ GetMin()

Vect CollisionVolumeAABB::GetMin ( ) const

Gets the minimum of the AABB (calculated through ComputeData) and returns it.

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

◆ GetOriginalWorld()

Matrix CollisionVolumeAABB::GetOriginalWorld ( ) const

◆ GetScale()

float CollisionVolumeAABB::GetScale ( ) const

Gets the scale.

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

◆ GetWorld()

Matrix CollisionVolumeAABB::GetWorld ( ) const

Gets the world matrix.

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

◆ IntersectAccept()

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

Intersect accept for a generic collision volume.

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

Implements CollisionVolume.

Here is the call graph for this function:

◆ IntersectVisit() [1/3]

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

Intersect visit for another collision volume of similar type (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 CollisionVolumeAABB::IntersectVisit ( const CollisionVolumeBSphere other) const
overridevirtual

Intersect visit for another collision volume of type BSphere.

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

Implements CollisionVolume.

Here is the call graph for this function:

◆ IntersectVisit() [3/3]

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

Intersect visit for another collision volume of type 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]

CollisionVolumeAABB& CollisionVolumeAABB::operator= ( CollisionVolumeAABB &&  )
delete

Move assignment operator.

◆ operator=() [2/2]

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

Assignment operator.

◆ SetMinMax()

void CollisionVolumeAABB::SetMinMax ( Vect &  min,
Vect &  max 
)

Sets minimum and maximum corners of the AABB, no additional computation.

Parameters
[in,out]minThe minimum.
[in,out]maxThe maximum.
Here is the caller graph for this function:

Member Data Documentation

◆ center

Vect CollisionVolumeAABB::center
private

Stored Center from ComputeData.

◆ halfDiagonal

Vect CollisionVolumeAABB::halfDiagonal
private

◆ maxCorner

Vect CollisionVolumeAABB::maxCorner
private

Stored maximum corner from ComputeData.

◆ minCorner

Vect CollisionVolumeAABB::minCorner
private

Stored minimum corner from ComputeData.

◆ originalWorld

Matrix CollisionVolumeAABB::originalWorld
private

◆ scaleSquared

float CollisionVolumeAABB::scaleSquared
private

◆ world

Matrix CollisionVolumeAABB::world
private

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