Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DCollisionDetection Class Reference

The U4DCollisionDetection is in charge of implementing the collision detection algorithm. More...

Inherited by U4DEngine::U4DCollisionAlgorithm, and U4DEngine::U4DManifoldGeneration.

Public Member Functions

 U4DCollisionDetection ()
 Constructor for class.
 
virtual ~U4DCollisionDetection ()
 Destructor for class.
 
virtual bool collision (U4DDynamicAction *uAction1, U4DDynamicAction *uAction2, float dt)
 Method with returns true if a collision between two 3D entities have occurred. More...
 
virtual void determineCollisionManifold (U4DDynamicAction *uAction1, U4DDynamicAction *uAction2, std::vector< SIMPLEXDATA > uQ)
 Method which determines the collision manifold. More...
 
SIMPLEXDATA calculateSupportPointInDirection (U4DBoundingVolume *uBoundingVolume1, U4DBoundingVolume *uBoundingVolume2, U4DVector3n &uDirection)
 Method which computes the supporting point in a given direction. More...
 
U4DPoint3n determineClosestPointOnSimplexToPoint (U4DPoint3n &uPoint, std::vector< SIMPLEXDATA > uQ)
 Method which determines the closest 3D point on a simplex to a 3D point. More...
 
std::vector< float > determineBarycentricCoordinatesInSimplex (U4DPoint3n &uClosestPointToOrigin, std::vector< SIMPLEXDATA > uQ)
 Method which determines the Barycentric coordinates in a Simplex. More...
 

Detailed Description

The U4DCollisionDetection is in charge of implementing the collision detection algorithm.

Member Function Documentation

◆ calculateSupportPointInDirection()

SIMPLEXDATA U4DEngine::U4DCollisionDetection::calculateSupportPointInDirection ( U4DBoundingVolume uBoundingVolume1,
U4DBoundingVolume uBoundingVolume2,
U4DVector3n uDirection 
)

Method which computes the supporting point in a given direction.

Parameters
uBoundingVolume1Bounding volume of a 3D model entity
uBoundingVolume2Bounding volume of a 3D model entity
uDirection3D vector direction to compute the supporting points
Returns
Returns the supporting point as a SIMPLEXDATA object

◆ collision()

virtual bool U4DEngine::U4DCollisionDetection::collision ( U4DDynamicAction uAction1,
U4DDynamicAction uAction2,
float  dt 
)
inlinevirtual

Method with returns true if a collision between two 3D entities have occurred.

Parameters
uAction13D model entity
uAction23D model entity
dtTime-step value
Returns
Returns true if collision occurred

Reimplemented in U4DEngine::U4DGJKAlgorithm, and U4DEngine::U4DCollisionAlgorithm.

◆ determineBarycentricCoordinatesInSimplex()

std::vector< float > U4DEngine::U4DCollisionDetection::determineBarycentricCoordinatesInSimplex ( U4DPoint3n uClosestPointToOrigin,
std::vector< SIMPLEXDATA uQ 
)

Method which determines the Barycentric coordinates in a Simplex.

Parameters
uClosestPointToOrigin3D point closest to the origin
uQSimplex data
Returns
Returns the barycentric coordinates in a simplex

◆ determineClosestPointOnSimplexToPoint()

U4DPoint3n U4DEngine::U4DCollisionDetection::determineClosestPointOnSimplexToPoint ( U4DPoint3n uPoint,
std::vector< SIMPLEXDATA uQ 
)

Method which determines the closest 3D point on a simplex to a 3D point.

Parameters
uPoint3D point to compute clostest 3D point
uQSimplex data
Returns
Returns 3D point closest to the simplex

◆ determineCollisionManifold()

virtual void U4DEngine::U4DCollisionDetection::determineCollisionManifold ( U4DDynamicAction uAction1,
U4DDynamicAction uAction2,
std::vector< SIMPLEXDATA uQ 
)
inlinevirtual

Method which determines the collision manifold.

Parameters
uAction13D model entity
uAction23D model entity
uQTime-step value