MeshDataCopyElementGroup

class Communicator.MeshDataCopyElementGroup()

Provides access to all data of a particular type (faces, lines or points) within a MeshDataCopy

This object additionally supports the ECMAScript 2015 iterable protocol and therefore can be iterated over using a for..of loop.


Properties

Communicator.MeshDataCopyElementGroup.elementCount

The number of elements in this group.

Communicator.MeshDataCopyElementGroup.hasNormals

Whether the vertices in this element group have normals.

Communicator.MeshDataCopyElementGroup.hasRGBAs

Whether the vertices in this element group have colors.

Communicator.MeshDataCopyElementGroup.hasUVs

Whether the vertices in this element group have texture coordinates.

Communicator.MeshDataCopyElementGroup.vertexCount

The total number of vertices in all elements in this group.

Methods

element

Communicator.MeshDataCopyElementGroup.element(index)

Provides access to mesh data of a single element. Throws RangeError if index is invalid.

Arguments
  • index (number()) – the element’s index

Return type

Communicator.MeshDataCopyElement

iterate

Communicator.MeshDataCopyElementGroup.iterate()
Return type

Communicator.MeshDataCopyIterator

Returns

An iterator over all the vertices in all the elements in this group.