The simplest way to achieve sharp edges is to add the vertices for all the triangles in
mesh and not use the
addTriangle() function at all and then call the
mesh.setupIndicesAuto() function, which sets indices automatically such that vertices (0, 1, 2) are used for drawing the first triangle, vertices (4, 5, 6) for the second triangle, and so on.
This is example
07-3D/04-PyramidSharpEdges. This example is a good starting point for drawing sharp 3D objects.
It is based on example
In the example with the pyramid, replace all the lines with
addTriangle() with the following lines:
//Pyramid's base vertices ofPoint v0 = ofPoint( -200, -100, 0 ); ofPoint v1 = ofPoint( 200, -100, 0 ); ofPoint ...