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

The 4DCollisionAlgorithm is a virtual class in charge of implementing the algorithm used during a collision. More...

Inherits U4DEngine::U4DCollisionDetection.

Inherited by U4DEngine::U4DGJKAlgorithm.

Public Member Functions

 U4DCollisionAlgorithm ()
 Constructor for the class.
 
virtual ~U4DCollisionAlgorithm ()
 Destructor for the 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 std::vector< SIMPLEXDATAgetCurrentSimpleStruct ()
 Method which returns the currect SIMPLEXDATA structure. More...
 
virtual U4DPoint3n getClosestPointToOrigin ()
 Method which returns the closest 3D point to the origin. More...
 
virtual U4DPoint3n getClosestCollisionPoint ()
 Method which returns the closest collision point. More...
 
virtual U4DVector3n getContactCollisionNormal ()
 Method which returns the contact collision normal vector. More...
 
- Public Member Functions inherited from U4DEngine::U4DCollisionDetection
 U4DCollisionDetection ()
 Constructor for class.
 
virtual ~U4DCollisionDetection ()
 Destructor for class.
 
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 4DCollisionAlgorithm is a virtual class in charge of implementing the algorithm used during a collision.

Member Function Documentation

◆ collision()

virtual bool U4DEngine::U4DCollisionAlgorithm::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 from U4DEngine::U4DCollisionDetection.

Reimplemented in U4DEngine::U4DGJKAlgorithm.

◆ getClosestCollisionPoint()

virtual U4DPoint3n U4DEngine::U4DCollisionAlgorithm::getClosestCollisionPoint ( )
inlinevirtual

Method which returns the closest collision point.

Returns
Returns the closest collision point

Reimplemented in U4DEngine::U4DGJKAlgorithm.

◆ getClosestPointToOrigin()

virtual U4DPoint3n U4DEngine::U4DCollisionAlgorithm::getClosestPointToOrigin ( )
inlinevirtual

Method which returns the closest 3D point to the origin.

Returns
Returns closest 3D point to origin

Reimplemented in U4DEngine::U4DGJKAlgorithm.

◆ getContactCollisionNormal()

virtual U4DVector3n U4DEngine::U4DCollisionAlgorithm::getContactCollisionNormal ( )
inlinevirtual

Method which returns the contact collision normal vector.

Returns
Returns the contact collision normal vector

Reimplemented in U4DEngine::U4DGJKAlgorithm.

◆ getCurrentSimpleStruct()

virtual std::vector<SIMPLEXDATA> U4DEngine::U4DCollisionAlgorithm::getCurrentSimpleStruct ( )
inlinevirtual

Method which returns the currect SIMPLEXDATA structure.

Returns
Returns the current SIMPLEXDATA structure

Reimplemented in U4DEngine::U4DGJKAlgorithm.