PlayRho  2.0.0
An interactive physics engine & library.
Contact.hpp File Reference

Definition of the Contact class and closely related code. More...

#include <cassert>
#include <cstdint>
#include <limits>
#include <optional>
#include <playrho/BodyID.hpp>
#include <playrho/Contactable.hpp>
#include <playrho/Math.hpp>
#include <playrho/NonNegative.hpp>
#include <playrho/Real.hpp>
#include <playrho/Settings.hpp>
#include <playrho/ShapeID.hpp>
#include <playrho/UnitInterval.hpp>
#include <playrho/Units.hpp>
Include dependency graph for Contact.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  playrho::Contact
 A potential contact between the children of two body associated shapes. More...
 

Namespaces

 playrho
 

Functions

constexpr void playrho::FlagForFiltering (Contact &contact) noexcept
 Flags the contact for filtering. More...
 
constexpr void playrho::FlagForUpdating (Contact &contact) noexcept
 Flags the contact for updating. More...
 
constexpr BodyID playrho::GetBodyA (const Contact &contact) noexcept
 Gets the body A ID of the given contact.
 
constexpr BodyID playrho::GetBodyB (const Contact &contact) noexcept
 Gets the body B ID of the given contact.
 
constexpr ChildCounter playrho::GetChildIndexA (const Contact &contact) noexcept
 Gets the child index A of the given contact.
 
constexpr ChildCounter playrho::GetChildIndexB (const Contact &contact) noexcept
 Gets the child index B of the given contact.
 
constexpr auto playrho::GetFriction (const Contact &contact) noexcept
 Gets the coefficient of friction. More...
 
constexpr auto playrho::GetOtherBody (const Contact &c, BodyID bodyID) noexcept
 Gets the other body ID for the contact than the one given.
 
constexpr auto playrho::GetRestitution (const Contact &contact) noexcept
 Gets the coefficient of restitution. More...
 
constexpr ShapeID playrho::GetShapeA (const Contact &contact) noexcept
 Gets the shape A associated with the given contact.
 
constexpr ShapeID playrho::GetShapeB (const Contact &contact) noexcept
 Gets the shape B associated with the given contact.
 
constexpr auto playrho::GetTangentSpeed (const Contact &contact) noexcept
 Gets the desired tangent speed. More...
 
constexpr auto playrho::GetToi (const Contact &contact) noexcept
 Gets the time of impact (TOI) as a fraction. More...
 
constexpr auto playrho::GetToiCount (const Contact &contact) noexcept
 Gets the time of impact count. More...
 
constexpr auto playrho::HasValidToi (const Contact &contact) noexcept
 Gets whether a TOI is set. More...
 
constexpr auto playrho::IsDestroyed (const Contact &c) noexcept -> bool
 Whether or not the given contact was destroyed. More...
 
constexpr bool playrho::IsEnabled (const Contact &contact) noexcept
 Gets whether the given contact is enabled or not.
 
constexpr bool playrho::IsFor (const Contact &c, BodyID bodyID, ShapeID shapeID) noexcept
 Is-for convenience function. More...
 
constexpr bool playrho::IsFor (const Contact &c, ShapeID shapeID) noexcept
 Is-for convenience function. More...
 
constexpr bool playrho::IsImpenetrable (const Contact &contact) noexcept
 Whether the given contact is "impenetrable". More...
 
constexpr bool playrho::IsSensor (const Contact &contact) noexcept
 Gets whether the given contact is for sensors or not.
 
constexpr bool playrho::IsTouching (const Contact &contact) noexcept
 Gets whether the given contact is touching or not.
 
auto playrho::MixFriction (NonNegativeFF< Real > friction1, NonNegativeFF< Real > friction2)
 Mixes friction. More...
 
auto playrho::MixRestitution (Real restitution1, Real restitution2) noexcept
 Mixes restitution. More...
 
constexpr auto playrho::NeedsFiltering (const Contact &contact) noexcept
 Whether or not the contact needs filtering.
 
constexpr auto playrho::NeedsUpdating (const Contact &contact) noexcept
 Whether or not the contact needs updating.
 
constexpr bool playrho::operator!= (const Contact &lhs, const Contact &rhs) noexcept
 Operator not-equals.
 
constexpr bool playrho::operator== (const Contact &lhs, const Contact &rhs) noexcept
 Operator equals.
 
constexpr void playrho::SetDestroyed (Contact &c) noexcept
 Sets the destroyed property of the given contact. More...
 
constexpr void playrho::SetEnabled (Contact &contact) noexcept
 Enables the contact. More...
 
constexpr void playrho::SetFriction (Contact &contact, NonNegative< Real > value) noexcept
 Sets the friction value for the identified contact. More...
 
constexpr void playrho::SetImpenetrable (Contact &contact) noexcept
 Sets the impenetrability of the given contact. More...
 
constexpr void playrho::SetRestitution (Contact &contact, Real value)
 Sets the restitution value for the identified contact. More...
 
constexpr void playrho::SetSensor (Contact &contact) noexcept
 Sets the sensor state of the given contact. More...
 
constexpr void playrho::SetTangentSpeed (Contact &contact, LinearVelocity value) noexcept
 Sets the desired tangent speed for a conveyor belt behavior. More...
 
constexpr void playrho::SetToi (Contact &contact, const std::optional< UnitIntervalFF< Real >> &toi) noexcept
 Sets the time of impact (TOI). More...
 
constexpr void playrho::SetToiCount (Contact &contact, Contact::substep_type value) noexcept
 Sets the TOI count to the given value. More...
 
constexpr void playrho::UnflagForFiltering (Contact &contact) noexcept
 Unflags this contact for filtering. More...
 
constexpr void playrho::UnflagForUpdating (Contact &contact) noexcept
 Unflags this contact for updating. More...
 
constexpr void playrho::UnsetDestroyed (Contact &c) noexcept
 Unsets the destroyed property of the given contact. More...
 
constexpr void playrho::UnsetEnabled (Contact &contact) noexcept
 Disables the identified contact. More...
 
constexpr void playrho::UnsetImpenetrable (Contact &contact) noexcept
 Unsets the impenetrability of the given contact. More...
 
constexpr void playrho::UnsetSensor (Contact &contact) noexcept
 Unsets the sensor state of the given contact. More...
 

Detailed Description

Definition of the Contact class and closely related code.