Mesh

Extends
Renderable
Methods
10
Fields
None

Methods

MethodReturnsDescription
getVerticesCount()numberHow many vertices the mesh has.
getVerticesX(){number}The vertices' x (east), model units.
getVerticesY(){number}The vertices' y (vertical, negative up).
getVerticesZ(){number}The vertices' z (north).
getFaceCount()numberHow many faces (triangles) the mesh has.
getFaceIndices1(){number}Each face's first vertex index (0-based).
getFaceIndices2(){number}Each face's second vertex index.
getFaceIndices3(){number}Each face's third vertex index.
getFaceTransparencies(){number}?Each face's alpha as a signed byte (bit32.band(a, 255) is the alpha; 254 and 255 are fully transparent), or nil when the mesh has none.
getFaceTextures(){number}?Each face's texture id, -1 for none, or nil when the mesh has no textures.

Method details

getVerticesX

getVerticesX: (Mesh) -> {number}

The vertices' x (east), model units.

getVerticesY

getVerticesY: (Mesh) -> {number}

The vertices' y (vertical, negative up).

getFaceCount

getFaceCount: (Mesh) -> number

How many faces (triangles) the mesh has.

getFaceTransparencies

getFaceTransparencies: (Mesh) -> {number}?

Each face's alpha as a signed byte (bit32.band(a, 255) is the alpha; 254 and 255 are fully transparent), or nil when the mesh has none.

getFaceTextures

getFaceTextures: (Mesh) -> {number}?

Each face's texture id, -1 for none, or nil when the mesh has no textures.