Mesh

verb.core.Mesh

CLASS

Source code

Mesh provides various convenience methods for working with meshes.

getTriangleNorm

STATIC METHOD

Source code

getTriangleNorm(points : Array<Point>, tri : Tri) : Point

Get triangle normal

params

returns

makeMeshAabb

STATIC METHOD

Source code

makeMeshAabb(mesh : MeshData, faceIndices : Array<Int>) : BoundingBox

Form axis-aligned bounding box from triangles of mesh

params

returns

sortTrianglesOnLongestAxis

STATIC METHOD

Source code

sortTrianglesOnLongestAxis(bb : BoundingBox, mesh : MeshData, faceIndices : Array<Int>) : Array<Int>

Sort particular faces of a mesh on the longest axis

params

returns

getTriangleCentroid

STATIC METHOD

Source code

getTriangleCentroid(points : Array<Point>, tri : Tri) : Point

Get triangle centroid

params

returns

triangleUVFromPoint

STATIC METHOD

Source code

triangleUVFromPoint(mesh : MeshData, faceIndex : Int, f : Point) : UV

Given a point on a mesh triangle, obtain the UV on the triangle

params

returns