Go to the source code of this file.
§ sfVertexArray_append()
Add a vertex to a vertex array array.
- Parameters
-
vertexArray | Vertex array objet |
vertex | Vertex to add |
§ sfVertexArray_clear()
Clear a vertex array.
This function removes all the vertices from the array. It doesn't deallocate the corresponding memory, so that adding new vertices after clearing doesn't involve reallocating all the memory.
- Parameters
-
vertexArray | Vertex array object |
§ sfVertexArray_copy()
Copy an existing vertex array.
- Parameters
-
vertexArray | Vertex array to copy |
- Returns
- Copied object
§ sfVertexArray_create()
Create a new vertex array.
- Returns
- A new sfVertexArray object
§ sfVertexArray_destroy()
Destroy an existing vertex array.
- Parameters
-
vertexArray | Vertex array to delete |
§ sfVertexArray_getBounds()
Compute the bounding rectangle of a vertex array.
This function returns the axis-aligned rectangle that contains all the vertices of the array.
- Parameters
-
vertexArray | Vertex array objet |
- Returns
- Bounding rectangle of the vertex array
§ sfVertexArray_getPrimitiveType()
Get the type of primitives drawn by a vertex array.
- Parameters
-
vertexArray | Vertex array objet |
- Returns
- Primitive type
§ sfVertexArray_getVertex()
Get access to a vertex by its index.
This function doesn't check index, it must be in range [0, vertex count - 1]. The behaviour is undefined otherwise.
- Parameters
-
vertexArray | Vertex array object |
index | Index of the vertex to get |
- Returns
- Pointer to the index-th vertex
§ sfVertexArray_getVertexCount()
Return the vertex count of a vertex array.
- Parameters
-
vertexArray | Vertex array object |
- Returns
- Number of vertices in the array
§ sfVertexArray_resize()
Resize the vertex array.
If vertexCount is greater than the current size, the previous vertices are kept and new (default-constructed) vertices are added. If vertexCount is less than the current size, existing vertices are removed from the array.
- Parameters
-
vertexArray | Vertex array objet |
vertexCount | New size of the array (number of vertices) |
§ sfVertexArray_setPrimitiveType()
Set the type of primitives of a vertex array.
This function defines how the vertices must be interpreted when it's time to draw them:
- As points
- As lines
- As triangles
- As quads The default primitive type is sfPoints.
- Parameters
-
vertexArray | Vertex array objet |
type | Type of primitive |