Developer Documentation

draw_normals.cc
1 #include <OpenMesh/Core/Utils/GenProg.hh>
2
3 // draw a face normal if we have one
4 void drawFaceNormal(const MyMesh::Face& _f) {
5 drawFaceNormal(_f, GenProg::Bool2Type<OM_Check_Attrib(MyMesh::Face, Normal)>());
6 }
7
8 // normal exists -> use it
9 void drawFaceNormal(const MyMesh::Face& _f, GenProg::Bool2Type<true>) {
10 glNormal3fv(_f.normal());
11 }
12
13 // empty dummy (no normals)
14 void drawFaceNormal(const MyMesh::Face& _f, GenProg::Bool2Type<false>){}
OpenMesh::PolyMeshT::Face
Kernel::Face Face
Face type.
Definition: PolyMeshT.hh:130