Lysa  0.0
Lysa 3D Engine
Mesh Class Referenceabstract

Detailed Description

A GPU mesh composed of vertices, indices, and one or more material surfaces.

Lua full name: lysa.Mesh

Public Member Functions

Material|nil get_surface_material (surfaceIndex: integer)
 Returns the material for the given surface index, or nil if none is assigned. More...
 
nil set_surface_material (surfaceIndex: integer, mat: integer)
 Sets the material id for the given surface index. More...
 

Properties

integer id
 Unique mesh identifier.
 
AABB aabb
 Axis-aligned bounding box of the mesh in model space. (read-only)
 
string name
 Human-readable name of the mesh. (read-only)
 
integer get_surface_count
 Total number of surfaces in this mesh. (read-only)
 

Member Function Documentation

Material|nil get_surface_material ( integer  surfaceIndex)

Returns the material for the given surface index, or nil if none is assigned.

Parameters
surfaceIndexinteger
Returns
Material|nil
nil set_surface_material ( integer  surfaceIndex,
integer  mat)

Sets the material id for the given surface index.

Parameters
surfaceIndexinteger
matinteger

Property Documentation

integer id

Unique mesh identifier.

AABB aabb

Axis-aligned bounding box of the mesh in model space. (read-only)

string name

Human-readable name of the mesh. (read-only)

integer get_surface_count

Total number of surfaces in this mesh. (read-only)