cubos::engine::ContactFeatureId class

Indicates the type of a geometric feature (vertex, edge, or face) and the feature index. Currently each feature index is simply the index in the array with that information in the shape.

Public static variables

static const uint32_t UNDEFINED
Feature id identifying an undefined feature.

Public functions

void setAsVertex(uint32_t vertexId)
Assign a vertex feature id.
void setAsEdge(uint32_t edgeId)
Assign an edge feature id.
void setAsFace(uint32_t faceId)
Assign a face feature id.
auto isVertex() const -> bool
Check if the feature type is a vertex.
auto isEdge() const -> bool
Check if the feature type is an edge.
auto isFace() const -> bool
Check if the feature type is a face.

Public variables

uint32_t id
Container of the current feature Id.

Function documentation

void cubos::engine::ContactFeatureId::setAsVertex(uint32_t vertexId)

Assign a vertex feature id.

Parameters
vertexId index of the vertex on the shape.

void cubos::engine::ContactFeatureId::setAsEdge(uint32_t edgeId)

Assign an edge feature id.

Parameters
edgeId index of the edge on the shape.

void cubos::engine::ContactFeatureId::setAsFace(uint32_t faceId)

Assign a face feature id.

Parameters
faceId index of the face on the shape.

bool cubos::engine::ContactFeatureId::isVertex() const

Check if the feature type is a vertex.

Returns true if it identifies a vertex.

bool cubos::engine::ContactFeatureId::isEdge() const

Check if the feature type is an edge.

Returns true if it identifies an edge.

bool cubos::engine::ContactFeatureId::isFace() const

Check if the feature type is a face.

Returns true if it identifies a face.