Class: Mesh

shf3d.Mesh

Class representing a base class for mesh models.

new shf3d.Mesh ()

Properties:
Name Type Description
clockWise bool

(default: false) If true, the model's surfaces are considered to be defined in clockwise order instead of being in counter-clockwise order.

Extends

Methods

shf3d.Mesh.Mesh#buildMesh (vertices, normals, texAnchors, surfaces) static

Builds a mesh.

Name Type Description
vertices Array.<Array.<number>>

The vertices.

normals Array.<Array.<number>>

The vertex normals.

texAnchors Array.<Array.<number>>

The texture anchor points.

surfaces Array.<object>

The surfaces.

assignMaterial (material, from, to)

Assigns a material to a range of surfaces of the mesh.

Name Type Description
material shf3d.Material

The material.

from number

The first surface of the range.

to number

The last surface of the range.