Base class: Object
The mesh class is a collection of vertices and polygons that form visible surfaces.
Property | Type | Description |
---|---|---|
bounds | Aabb | read-only mesh bounding box |
extra | Object | user-defined object |
material | Material | read-only mesh material |
materials | table | read-only mesh materials array |
name | string | user-defined name |
type | number | read-only mesh primitive type |
AddPrimitive | Method | adds a new polygon to the mesh |
AddVertex | Method | adds a new vertex to the mesh |
Copy | Method | makes a copy of the mesh |
CountPrimitives | Method | returns the number of mesh primitives |
CountVertices | Method | returns the number of mesh vertices |
GetPrimitiveAttributes | Method | gets attributes of a single primitive |
GetRenderLayers | Method | gets the mesh render layers |
GetSkinned | Method | gets the mesh render layers |
GetVertexColor | Method | gets the color of a vertex |
GetVertexPosition | Method | gets the position of a vertex |
GetVertexNormal | Method | gets the normal of a vertex |
GetVertexTexCoords | Method | gets the texture coordinates of a vertex |
Modify | Method | batch modify vertices and indices |
Recenter | Method | recenters a mesh along one or more axes |
Rotate | Method | rotates a mesh |
Scale | Method | scales a mesh |
SetMaterial | Method | sets the mesh material |
SetRenderLayers | Method | sets the mesh render layers |
SetSkinned | Method | enables or disables mesh skinning |
SetVertexColor | Method | sets the position of a vertex |
SetVertexPosition | Method | sets the position of a vertex |
SetVertexNormal | Method | sets the normal of a vertex |
SetVertexTexCoords | Method | sets the texture coordinates of one vertex |
Transform | Method | transforms a mesh |
Translate | Method | translates a mesh |
UpdateBounds | Method | updates the mesh bounding box |
UpdateNormals | Method | calculates new mesh normals |
UpdateTangents | Method | updates the mesh tangents |
CreateMesh | Function | creates a new mesh object |