ReactPhysics3D: reactphysics3d::ContactPoint Class Reference

| ReactPhysics3D v0.10.2 C++ Physics engine library

Loading...
Searching...
No Matches
Public Member Functions | List of all members
reactphysics3d::ContactPoint Class Reference

This class represents a collision contact point between two bodies in the physics engine. More...

`#include <include/reactphysics3d/constraint/ContactPoint.h>`

## Public Member Functions
| ContactPoint (const ContactPointInfo *contactInfo, decimal persistentContactDistanceThreshold)
| Constructor.
| ContactPoint (const ContactPointInfo &contactInfo, decimal persistentContactDistanceThreshold)
| Constructor.
| ~ContactPoint ()=default
| Destructor.
| ContactPoint (const ContactPoint &contact)=default
| Copy-constructor.
ContactPoint & | operator= (const ContactPoint &contact)=default
| Assignment operator.
const Vector3 & | getNormal () const
| Return the normal vector of the contact.
const Vector3 & | getLocalPointOnShape1 () const
| Return the contact point on the first collider in the local-space of the collider.
const Vector3 & | getLocalPointOnShape2 () const
| Return the contact point on the second collider in the local-space of the collider.
decimal | getPenetrationImpulse () const
| Return the cached penetration impulse.
bool | getIsRestingContact () const
| Return true if the contact is a resting contact.
decimal | getPenetrationDepth () const
| Return the penetration depth.
size_t | getSizeInBytes () const
| Return the number of bytes used by the contact point.

## Detailed Description

This class represents a collision contact point between two bodies in the physics engine.

## Member Function Documentation

## ◆ getIsRestingContact()

RP3D_FORCE_INLINE bool reactphysics3d::ContactPoint::getIsRestingContact | ( |  | ) | const

Return true if the contact is a resting contact.

Returns
  True if it is a resting contact

## ◆ getLocalPointOnShape1()

RP3D_FORCE_INLINE const Vector3 & reactphysics3d::ContactPoint::getLocalPointOnShape1 | ( |  | ) | const

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

Returns
  The contact point on the first collider in the local-space of the collider

## ◆ getLocalPointOnShape2()

RP3D_FORCE_INLINE const Vector3 & reactphysics3d::ContactPoint::getLocalPointOnShape2 | ( |  | ) | const

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

Returns
  The contact point on the second collider in the local-space of the collider

## ◆ getNormal()

RP3D_FORCE_INLINE const Vector3 & reactphysics3d::ContactPoint::getNormal | ( |  | ) | const

Return the normal vector of the contact.

Returns
  The contact normal

## ◆ getPenetrationDepth()

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

Return the penetration depth.

Returns
  the penetration depth (in meters)

## ◆ getPenetrationImpulse()

RP3D_FORCE_INLINE decimal reactphysics3d::ContactPoint::getPenetrationImpulse | ( |  | ) | const

Return the cached penetration impulse.

Returns
  The penetration impulse

## ◆ getSizeInBytes()

RP3D_FORCE_INLINE size_t reactphysics3d::ContactPoint::getSizeInBytes | ( |  | ) | const

Return the number of bytes used by the contact point.

Returns
  The size of the contact point in memory (in bytes)

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

- include/reactphysics3d/constraint/ContactPoint.h
- src/constraint/ContactPoint.cpp