The library provides a set of classes ( 99% templates ;-) ), where the inheritance relationship is given by template parameterization. You might ask: "What the heck is that?" It means, a parent class is passed as a template argument to another class:
class P1 { } class P2 { } template <typename Parent> class B : public Parent {} typedef B<P1> fooB1; typedef B<P2> fooB2;
Voila, we have created two different types of B. Depending on the interface, the public member elements, provided by P1
or P2
, fooB1
and fooB2
might have different behaviours or even different interfaces! But if P1
and P2
have the some interface or at least a common interface, then from programming point of view there is no difference using fooB1
or fooB2
. And this is all about. OpenMesh defines an interface concept for the kernel which is documented in OpenMesh::Concepts::KernelT. As long as the kernel provides this the class handling polygonal meshes OpenMesh::PolyMeshT
can use any kernel.