template<class Context>
Rodin::Geometry::SubMesh class

Represents a subset of a Mesh.

Mapping between the SubMesh and the parent Mesh

A SubMesh object holds a reference to its parent Mesh object and includes details about how polytopes and vertices are mapped between the child and parent Mesh.

Downcasting

A Mesh that is also a SubMesh can be downcasted to access the SubMesh functionality. For instance:

if (mesh.isSubMesh())
{
  // The cast is well defined
  auto& submesh = static_cast<SubMesh&>(mesh);
}