Class: Mesh

Core. Mesh


new Mesh()

This class represents a Mesh.

Properties:
Name Type Description
vertices Array.<module:Core.Vertex>

The vertices contained in this mesh.

edges Array.<module:Core.Edge>

The edges contained in this mesh.

faces Array.<module:Core.Face>

The faces contained in this mesh.

corners Array.<module:Core.Corner>

The corners contained in this mesh.

halfedges Array.<module:Core.Halfedge>

The halfedges contained in this mesh.

boundaries Array.<module:Core.Face>

The boundary loops contained in this mesh.

generators Array.<Array.<module:Core.Halfedge>>

An array of halfedge arrays, i.e.,
[[h11, h21, ..., hn1], [h12, h22, ..., hm2], ...] representing this mesh's
homology generators.

Methods


eulerCharacteristic()

Computes the euler characteristic of this mesh.

Returns:
Type
number

build(polygonSoup)

Constructs this mesh.

Parameters:
Name Type Description
polygonSoup Object

A polygon soup mesh containing vertex positions and indices.

Properties
Name Type Description
v Array.<module:LinearAlgebra.Vector>

The vertex positions of the polygon soup mesh.

f Array.<number>

The indices of the polygon soup mesh.

Returns:

True if this mesh is constructed successfully and false if not
(when this mesh contains any one or a combination of the following - non-manifold vertices,
non-manifold edges, isolated vertices, isolated faces).

Type
boolean