Class: MeshSubset

Core. MeshSubset


new MeshSubset(vertices, edges, faces)

This class represents a subset of a Mesh

Parameters:
Name Type Description
vertices Set.<number>

A set of the indices of the vertices which this subset should contain. Default value is the empty set.

edges Set.<number>

A set of the indices of the edges which this subset should contain. Default value is the empty set.

faces Set.<number>

A set of the indices of the faces which this subset should contain. Default value is the empty set.

Properties:
Name Type Description
vertices Set.<number>

The set of the indices of the vertices which this subset contains.

edges Set.<number>

The set of the indices of the edges which this subset contains.

faces Set.<number>

The set of the indices of the faces which this subset contains.

Methods


<static> deepCopy(subset)

Makes a copy of a moduel:Core.MeshSubset

Parameters:
Name Type Description
subset module:Core.MeshSubset

The subset to copy.

Returns:

A copy of the given subset.

Type
module:Core.MeshSubset

addVertex(vertex)

Adds a vertex to this subset

Parameters:
Name Type Description
vertex number

The index of the vertex to add.


addVertices(vertices)

Adds set of vertices to this subset

Parameters:
Name Type Description
vertices Set.<number>

The set of indices of vertices to add.


deleteVertex(vertex)

Removes a vertex from this subset.

Parameters:
Name Type Description
vertex number

The index of the vertex to remove.


deleteVertices(vertices)

Removes a set of vertices from this subset.

Parameters:
Name Type Description
vertices Set.<number>

The indices of vertices to remove.


addEdge(edge)

Adds an edge to this subset

Parameters:
Name Type Description
edge number

The index of the edge to add.


addEdges(edges)

Adds set of edges to this subset

Parameters:
Name Type Description
edges number

The set of indices of edges to add.


deleteEdge(edge)

Removes an edge from this subset.

Parameters:
Name Type Description
edge number

The index of the edge to remove.


deleteEdges(edges)

Removes a set of edges from this subset.

Parameters:
Name Type Description
edges Set.<number>

The indices of the edges to remove.


addFace(face)

Adds a face to this subset

Parameters:
Name Type Description
face number

The index of the face to add.


addFaces(faces)

Adds set of faces to this subset

Parameters:
Name Type Description
faces number

The set of indices of faces to add.


deleteFace(face)

Removes a face from this subset.

Parameters:
Name Type Description
face number

The index of the face to remove.


deleteFaces(faces)

Removes a set of faces from this subset.

Parameters:
Name Type Description
faces Set.<number>

The indices of the faces to remove.


addSubset(subset)

Adds a subset's vertices, edges, and faces to this subset.

Parameters:
Name Type Description
subset module:Core.MeshSubset

The subset to add in.


deleteSubset(subset)

Removes a subset's vertices, edges, and faces from this subset.

Parameters:
Name Type Description
subset module:Core.MeshSubset

The subset to remove.


equals(subset)

Returns true if the input subset contains the same vertices, edges, and faces as
this subset and false otherwise.

Parameters:
Name Type Description
subset module:Core.MeshSubset

The subset to compare to.