Type IMesh
IMesh object, holds static mesh data.
Methods
| buildFromTriangles( triangles ) | Builds the mesh from the given table of triangles. |
| destroy() | Destroys the given mesh. |
| draw() | Draws the given mesh. |
| getBounds() | Gets the min and max bounding box positions of the mesh (local to the mesh). |
| isValid() | Indicates whether this mesh can still be used. |
Methods
- IMesh:buildFromTriangles( triangles )
-
Builds the mesh from the given table of triangles.
Environment:
ClientParameters:
-
triangles: Table of triangle vertices (see the MeshVertex structure).
Usage:
local OurMesh = Mesh() local Triangles = { { pos = Vector( 0, 0, 0 ), u = 0, v = 0 }, { pos = Vector( 10, 0, 0 ), u = 1, v = 0 }, { pos = Vector( 10, 10, 0 ), u = 1, v = 1 } } OurMesh:buildFromTriangles( Triangles ) -
- IMesh:destroy()
-
Destroys the given mesh. Do not attempt to use it again.
Environment:
Client - IMesh:draw()
-
Draws the given mesh.
Environment:
Client - IMesh:getBounds()
-
Gets the min and max bounding box positions of the mesh (local to the mesh).
Environment:
ClientReturn values:
-
(Vector)The bounding box minimum. -
(Vector)The bounding box maximum.
-
- IMesh:isValid()
-
Indicates whether this mesh can still be used.
Environment:
ClientReturn value:
(boolean)True if the mesh has not yet been destroyed