Public Member Functions | |
| FaceHandle * | addFace (VertexHandleList *verticesList) |
| FaceHandle * | addFace (VertexHandle *v0, VertexHandle *v1, VertexHandle *v2) |
| FaceHandle * | addFace (VertexHandle *v0, VertexHandle *v1, VertexHandle *v2, VertexHandle *v3) |
| void | deleteVertex (VertexHandle *handle, bool deleteIsolatedVertices=false) |
| VertexHandleList * | face (unsigned int index) |
| VertexHandleList * | face (FaceHandle &handle) |
| Vector3 * | faceNormal (unsigned int index) |
| Vector3 * | faceNormal (FaceHandle *handle) |
| void | setFaceNormal (FaceHandle *handle, Vector3 *vertexValue) |
| VertexHandleList * | edge (unsigned int index) |
| VertexHandleList * | edge (EdgeHandle &handle) |
| uint | edgeCount (void) const |
| void | deleteEdge (EdgeHandle *handle, bool deleteIsolatedVertices=false) |
| VertexHandle * | addVertex (Vector3 *vertexValue) |
| void | setVertex (VertexHandle *handle, Vector3 *vertexValue) |
| void | setVertexNormal (VertexHandle *handle, Vector3 *vertexValue) |
| void | deleteVertex (VertexHandle *handle, bool deleteIsolatedVertices=false) |
| uint | vertexCount (void) const |
| Vector3 * | vertex (unsigned int index) |
| Vector3 * | vertex (VertexHandle *handle) |
| Vector3 * | vertexNormal (unsigned int index) |
| Vector3 * | vertexNormal (VertexHandle *handle) |
| int | materialId (int face_idx) |
| int | materialsCount (void) |
| void | setMaterialId (int face_idx, int matId) |
| void | removeMaterial (int matId) |
| int | textureId (int face_idx) |
| int | texturesCount (void) |
| void | setTextureId (int face_idx, int texId) |
| void | removeTexture (int texId) |
| void | collectGarbage (void) |
| void | deleteIsolatedVertices (void) |
| void | update (void) |
| void | updateNormals (bool updateFace=true, bool updateVertex=true) |
| void | subtract (Mesh *second_arg, bool reorient, float tolerance) |
The Mesh class wraps all Mesh functionality for a given NodeGraph. Note that child NodeGraphs can have their own Mesh. A Mesh is represented by a Mesh Editor node inside a NodeGraph.
| FaceHandle* Mesh::addFace | ( | VertexHandleList * | verticesList) |
Adds a face to the mesh.
| verticesList | The list of vertices which make up the new face. |
| FaceHandle* Mesh::addFace | ( | VertexHandle * | v0, |
| VertexHandle * | v1, | ||
| VertexHandle * | v2 | ||
| ) |
This function overloads NGMesh::addFace(NGVertexHandleList *list)
| The | list of vertices which make up the new face. |
| FaceHandle* Mesh::addFace | ( | VertexHandle * | v0, |
| VertexHandle * | v1, | ||
| VertexHandle * | v2, | ||
| VertexHandle * | v3 | ||
| ) |
This function overloads NGMesh::addFace(NGVertexHandleList *list)
| The | list of vertices which make up the new face. |
| VertexHandle* Mesh::addVertex | ( | Vector3 * | vertexValue) |
Adds a vertex to the mesh.
| vertexValue | The Vector3 values to be applied to the new vertex. |
| void Mesh::collectGarbage | ( | void | ) |
Removes items marked as deleted from the mesh. Always call this method after deleting items. Note that all handles will be invalid after using this function.
| void Mesh::deleteEdge | ( | EdgeHandle * | handle, |
| bool | deleteIsolatedVertices = false |
||
| ) |
Deletes the given edge, optionally also deletes all isolated vertices too.
| handle | The EdgeHandle of the edge to be deleted. |
| deleteIsolatedVertices | If set, isolated vertices will also be deleted. |
| void Mesh::deleteIsolatedVertices | ( | void | ) |
Deletes isolated vertices from the mesh.
| void Mesh::deleteVertex | ( | VertexHandle * | handle, |
| bool | deleteIsolatedVertices = false |
||
| ) |
Deletes the given face, optionally also deletes all isolated vertices too.
| handle | The FaceHandle of the face to be deleted. |
| deleteIsolatedVertices | If set, isolated vertices will also be deleted. |
| void Mesh::deleteVertex | ( | VertexHandle * | handle, |
| bool | deleteIsolatedVertices = false |
||
| ) |
Deletes the given vertex, optionally also deletes all isolated vertices too.
| handle | The VertexHandle of the vertex to be deleted. |
| deleteIsolatedVertices | If set, isolated vertices will also be deleted. |
| VertexHandleList* Mesh::edge | ( | unsigned int | index) |
Returns two VertexHandles which define the edge at the given index.
| index | The index of the edge. Must be smaller than edgeCount(). |
| VertexHandleList* Mesh::edge | ( | EdgeHandle & | handle) |
Returns two VertexHandles which define the edge for the given EdgeHandle.
| handle | The EdgeHandle of the edge. |
| uint Mesh::edgeCount | ( | void | ) | const |
Returns the number of edges in the mesh.
| VertexHandleList* Mesh::face | ( | unsigned int | index) |
Returns a list of VertexHandles which form the face at the given index.
| index | The index of the face. Mus be smaller than faceCount(). |
| VertexHandleList* Mesh::face | ( | FaceHandle & | handle) |
Returns a list of VertexHandles which form the face of the given handle.
| handle | The FaceHandle of the face. |
| Vector3* Mesh::faceNormal | ( | unsigned int | index) |
| Vector3* Mesh::faceNormal | ( | FaceHandle * | handle) |
Returns a Vector3 for the face normal of the given FaceHandle.
| handle | The FaceHandle representing the face. |
| int Mesh::materialId | ( | int | face_idx) |
Returns the material id of the given face.
| face_idx | The index of the face. |
| int Mesh::materialsCount | ( | void | ) |
Returns the number of materials in the mesh.
| void Mesh::removeMaterial | ( | int | matId) |
Removes the given material id from the mesh. If face has an material id equal to matId, this material id is set to 0. Otherwise material id is decremented.
| matId | The material id to remove from the mesh. |
| void Mesh::removeTexture | ( | int | texId) |
Removes the given texture id from the mesh. If face has an texture id equal to texId, this texture id is set to 0. Otherwise the texture id is decremented.
| texId | The texture id to remove from the mesh. |
| void Mesh::setFaceNormal | ( | FaceHandle * | handle, |
| Vector3 * | vertexValue | ||
| ) |
Assigns a new value to the normal of the given face.
| handle | The FaceHandle of the face to be changed. |
| faceValue | The Vector3 values to be applied as the new normal of the face. |
| void Mesh::setMaterialId | ( | int | face_idx, |
| int | matId | ||
| ) |
Sets the material id of the given face to a new value.
| face_idx | The face index of the material to assign a new materal id to. |
| matId | The new material id to assign to the face. |
| void Mesh::setTextureId | ( | int | face_idx, |
| int | texId | ||
| ) |
Sets the texture id of the given face to a new value.
| face_idx | The face index of the texture to assign a new texture id to. |
| texId | The new texture id to assign to the face. |
| void Mesh::setVertex | ( | VertexHandle * | handle, |
| Vector3 * | vertexValue | ||
| ) |
Assigns a new value to the given vertex.
| handle | The VertexHandle of the vertex to be changed. |
| vertexValue | The Vector3 values to be applied to the vertex. |
| void Mesh::setVertexNormal | ( | VertexHandle * | handle, |
| Vector3 * | vertexValue | ||
| ) |
Assigns a new value to the normal of the given vertex.
| handle | The VertexHandle of the vertex to be changed. |
| vertexValue | The Vector3 values to be applied to the normal of the vertex. |
| void Mesh::subtract | ( | Mesh * | second_arg, |
| bool | reorient, | ||
| float | tolerance | ||
| ) |
Subtracts second_arg from "this".
| second_arg | Deduction. |
| reorient | Turn on/off cell reorientation of the intersection portion of the surface. Defaults to on. |
| tolerance | The tolerance used to determine when a point's absolute distance is considered to be zero. Defaults to 1e-6. |
| int Mesh::textureId | ( | int | face_idx) |
Returns the texture id of the given face.
| face_idx | The index of the face. |
| int Mesh::texturesCount | ( | void | ) |
Returns the number of textures in the mesh.
| void Mesh::update | ( | void | ) |
Upates the structure of the mesh and also calls updateNormals(). You need to call this function after you have finalized work on a given mesh to make it work in RaySupreme.
| void Mesh::updateNormals | ( | bool | updateFace = true, |
| bool | updateVertex = true |
||
| ) |
Updates the normals in the mesh.
| updateFace | If true, updates the face normals. |
| updateVertex | If true, updates the vertex normals. |
| Vector3* Mesh::vertex | ( | unsigned int | index) |
Returns a Vector3 representing the vertex at the given index.
| index | The index of the vertex, has to be smaller than the value returned by vertexCount(). |
| Vector3* Mesh::vertex | ( | VertexHandle * | handle) |
Returns a Vector3 containing the coordinates of the vertex represented by the given VertexHandle.
| handle | The VertexHandle representing the vertex. |
| uint Mesh::vertexCount | ( | void | ) | const |
Returns the number of vertices in the mesh.
| Vector3* Mesh::vertexNormal | ( | unsigned int | index) |
Returns a Vector3 representing the vertex normal for the vertex at the given index.
| index | The index of the vertex, has to be smaller than the value returned by vertexCount(). |
| Vector3* Mesh::vertexNormal | ( | VertexHandle * | handle) |
Returns a Vector3 containing the coordinates of the vertex normal for the vertex of the given VertexHandle.
| handle | The VertexHandle representing the vertex. |
1.8.4