![]() |
OpenMesh
|
Please note, that OpenMesh makes heavily use of C++ templates, generic programming and all that stuff (see Some words on the C++ implementation).
Therefore read this section carefully (else you get lost in the reference manual):
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:
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.