PlayRho  2.0.0
An interactive physics engine & library.
playrho::ContactFeature Struct Reference

The contact feature. More...

#include <playrho/ContactFeature.hpp>

Public Types

using Index = std::uint8_t
 Index type.
 
enum  Type : std::uint16_t { e_vertex = 0 , e_face = 1 }
 Type of the associated index value.
 

Public Member Functions

constexpr ContactFeature () noexcept
 Default constructor. More...
 
constexpr ContactFeature (Type tA, Index iA, Type tB, Index iB) noexcept
 Initializing constructor. More...
 

Public Attributes

Index indexA
 Feature index on shape A.
 
Index indexB
 Feature index on shape B.
 
Type other: 14
 Private for internal use!
 
Type typeA: 1
 The feature type on shape A.
 
Type typeB: 1
 The feature type on shape B.
 

Related Functions

(Note that these are not member functions.)

constexpr ContactFeature Flip (ContactFeature val) noexcept
 Flips contact features information.
 
constexpr ContactFeature GetFaceFaceContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept
 Gets the face face contact feature for the given indices.
 
constexpr ContactFeature GetFaceVertexContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept
 Gets the face vertex contact feature for the given indices.
 
constexpr ContactFeature GetVertexFaceContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept
 Gets the vertex face contact feature for the given indices.
 
constexpr ContactFeature GetVertexVertexContactFeature (ContactFeature::Index a, ContactFeature::Index b) noexcept
 Gets the vertex vertex contact feature for the given indices.
 
constexpr bool operator!= (ContactFeature lhs, ContactFeature rhs) noexcept
 Determines if the given two contact features are not equal.
 
constexpr bool operator== (ContactFeature lhs, ContactFeature rhs) noexcept
 Determines if the given two contact features are equal.
 

Detailed Description

The contact feature.

The features that intersect to form the contact point.

Note
This structure is intended to be compact and passed-by-value.
Possible type combinations are: vertex-vertex, vertex-face, face-vertex, or face-face.

Constructor & Destructor Documentation

◆ ContactFeature() [1/2]

constexpr playrho::ContactFeature::ContactFeature ( )
inlineconstexprnoexcept

Default constructor.

Postcondition
typeA == e_vertex, typeB == e_vertex, other == 0, indexA == InvalidVertex, indexB == InvalidVertex.

◆ ContactFeature() [2/2]

constexpr playrho::ContactFeature::ContactFeature ( Type  tA,
Index  iA,
Type  tB,
Index  iB 
)
inlineconstexprnoexcept

Initializing constructor.

Postcondition
typeA == tA, typeB == tB, other == 0, indexA == iA, indexB == iB.

The documentation for this struct was generated from the following file: