MeshVertexList

MeshVertexList

Provides access to the vertices and vertex-related functionality of a mesh.

Members

count :int

Gets or sets the number of mesh vertices.
Type:
  • int

useDoublePrecisionVertices :bool

Set to true if the vertices should be stored in double precision
Type:
  • bool

Methods

add(x, y, z) → {int}

Adds a new vertex to the end of the Vertex list.
Parameters:
Name Type Description
x float X component of new vertex coordinate.
y float Y component of new vertex coordinate.
z float Z component of new vertex coordinate.
Returns:
The index of the newly added vertex.
Type
int

clear()

Clears the Vertex list on the mesh.

combineIdentical(ignoreNormals, ignoreAdditional) → {bool}

Merges identical vertices.
Parameters:
Name Type Description
ignoreNormals bool If true, vertex normals will not be taken into consideration when comparing vertices.
ignoreAdditional bool If true, texture coordinates, colors, and principal curvatures will not be taken into consideration when comparing vertices.
Returns:
true if the mesh is changed, in which case the mesh will have fewer vertices than before.
Type
bool

cullUnused() → {int}

Removes all vertices that are currently not used by the Face list.
Returns:
The number of unused vertices that were removed.
Type
int

destroy()

Releases all memory allocated to store faces. The list capacity will be 0 after this call. Subsequent calls can add new items.

get()

...

hide(vertexIndex)

Hides the vertex at the given index.
Parameters:
Name Type Description
vertexIndex int Index of vertex to hide.

hideAll()

Hides all vertices in the mesh.

isHidden(vertexIndex) → {bool}

Gets a value indicating whether or not a vertex is hidden.
Parameters:
Name Type Description
vertexIndex int Index of vertex to query.
Returns:
true if the vertex is hidden, false if it is not.
Type
bool

set()

...

setCount()

...

show(vertexIndex)

Shows the vertex at the given index.
Parameters:
Name Type Description
vertexIndex int Index of vertex to show.

showAll()

Shows all vertices in the mesh.