ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::CollisionCallback::ContactPoint Class Reference

This class represents a contact point between two colliders of the physics world. More...

#include <include/reactphysics3d/collision/CollisionCallback.h>

Public Member Functions

 ContactPoint (const ContactPoint &contactPoint)=default
 Copy constructor.
 
ContactPointoperator= (const ContactPoint &contactPoint)=delete
 Assignment operator.
 
 ~ContactPoint ()=default
 Destructor.
 
decimal getPenetrationDepth () const
 Return the penetration depth.
 
const Vector3getWorldNormal () const
 Return the world-space contact normal.
 
const Vector3getLocalPointOnCollider1 () const
 Return the contact point on the first collider in the local-space of the first collider.
 
const Vector3getLocalPointOnCollider2 () const
 Return the contact point on the second collider in the local-space of the second collider.
 

Detailed Description

This class represents a contact point between two colliders of the physics world.

Member Function Documentation

◆ getLocalPointOnCollider1()

RP3D_FORCE_INLINE const Vector3 & reactphysics3d::CollisionCallback::ContactPoint::getLocalPointOnCollider1 ( ) const

Return the contact point on the first collider in the local-space of the first collider.

Returns
The local-space contact point on the first collider
The contact point in the local-space of the first collider (from body1) in contact

◆ getLocalPointOnCollider2()

RP3D_FORCE_INLINE const Vector3 & reactphysics3d::CollisionCallback::ContactPoint::getLocalPointOnCollider2 ( ) const

Return the contact point on the second collider in the local-space of the second collider.

Returns
The local-space contact point on the second collider
The contact point in the local-space of the second collider (from body2) in contact

◆ getPenetrationDepth()

RP3D_FORCE_INLINE decimal reactphysics3d::CollisionCallback::ContactPoint::getPenetrationDepth ( ) const

Return the penetration depth.

Returns
The penetration depth between the two colliders at this contact point
The penetration depth (larger than zero)

◆ getWorldNormal()

RP3D_FORCE_INLINE const Vector3 & reactphysics3d::CollisionCallback::ContactPoint::getWorldNormal ( ) const

Return the world-space contact normal.

Returns
The world-space contact normal
The contact normal direction at the contact point (in world-space)

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