playrho::ContactFeature Struct Reference

Contact Feature. More...

#include <ContactFeature.hpp>

Public Types

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

Public Attributes

Type typeA
 The feature type on shape A. More...
 
Index indexA
 Feature index on shape A. More...
 
Type typeB
 The feature type on shape B. More...
 
Index indexB
 Feature index on shape B. More...
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Contact Feature.

The features that intersect to form the contact point.

Note
This structure is designed to be compact and passed-by-value.
This data structure is 4-bytes large.
Possible type combinations are: vertex-vertex, vertex-face, face-vertex, or face-face.

Definition at line 39 of file ContactFeature.hpp.

Member Typedef Documentation

◆ Index

using playrho::ContactFeature::Index = std::uint8_t

Index type.

Definition at line 41 of file ContactFeature.hpp.

Member Enumeration Documentation

◆ Type

enum playrho::ContactFeature::Type : std::uint8_t

Type of the associated index value.

Enumerator
e_vertex 
e_face 

Definition at line 44 of file ContactFeature.hpp.

Friends And Related Function Documentation

◆ GetVertexVertexContactFeature()

PLAYRHO_CONSTEXPR ContactFeature GetVertexVertexContactFeature ( ContactFeature::Index  a,
ContactFeature::Index  b 
)
related

Gets the vertex vertex contact feature for the given indices.

Definition at line 60 of file ContactFeature.hpp.

◆ GetVertexFaceContactFeature()

PLAYRHO_CONSTEXPR ContactFeature GetVertexFaceContactFeature ( ContactFeature::Index  a,
ContactFeature::Index  b 
)
related

Gets the vertex face contact feature for the given indices.

Definition at line 68 of file ContactFeature.hpp.

◆ GetFaceVertexContactFeature()

PLAYRHO_CONSTEXPR ContactFeature GetFaceVertexContactFeature ( ContactFeature::Index  a,
ContactFeature::Index  b 
)
related

Gets the face vertex contact feature for the given indices.

Definition at line 76 of file ContactFeature.hpp.

◆ GetFaceFaceContactFeature()

PLAYRHO_CONSTEXPR ContactFeature GetFaceFaceContactFeature ( ContactFeature::Index  a,
ContactFeature::Index  b 
)
related

Gets the face face contact feature for the given indices.

Definition at line 84 of file ContactFeature.hpp.

◆ Flip()

Flips contact features information.

Definition at line 92 of file ContactFeature.hpp.

◆ operator==()

PLAYRHO_CONSTEXPR bool operator== ( ContactFeature  lhs,
ContactFeature  rhs 
)
related

Determines if the given two contact features are equal.

Definition at line 99 of file ContactFeature.hpp.

◆ operator!=()

PLAYRHO_CONSTEXPR bool operator!= ( ContactFeature  lhs,
ContactFeature  rhs 
)
related

Determines if the given two contact features are not equal.

Definition at line 107 of file ContactFeature.hpp.

Member Data Documentation

◆ typeA

Type playrho::ContactFeature::typeA

The feature type on shape A.

Definition at line 52 of file ContactFeature.hpp.

◆ indexA

Index playrho::ContactFeature::indexA

Feature index on shape A.

Definition at line 53 of file ContactFeature.hpp.

◆ typeB

Type playrho::ContactFeature::typeB

The feature type on shape B.

Definition at line 54 of file ContactFeature.hpp.

◆ indexB

Index playrho::ContactFeature::indexB

Feature index on shape B.

Definition at line 55 of file ContactFeature.hpp.


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