-
Book Overview & Buying
-
Table Of Contents
Mastering openFrameworks: Creative Coding Demystified
By :
There are a number of functions for accessing the vertices and their properties:
The getNumVertices() function returns the number of vertices.
The getVertex( i ) function returns the position of the vertex with index i.
The setVertex( i, p ) function sets the position of vertex i to p. Note that this function can change the vertex but it cannot add a new vertex. So if i is greater or equal to mesh.getNumVertices(), you need to add a vertex (or vertices) using the mesh.addVertex( p ) function as described in the Using ofMesh section.
The removeVertex( i ) function deletes the vertex with index i. Be very careful when using this function; after deleting a vertex, you should probably also delete the corresponding normal, color, and texture coordinate, and change the indices of the triangles to keep its coherence.
The clearVertices() function deletes all the vertices. See corresponding cautions for removeVertex().
The clear() function clears the mesh, including its vertices,...
Change the font size
Change margin width
Change background colour