API for manipulating procedurally generated meshes.
Related sample code
MO_ALL_CONTEXTS : integerVisibility context for both regular rendering and shadow casting.
|
MO_DISABLE_CULLING_FLAG : integerMesh always passes culling, i.e its bounding volume state is ignored.
|
Note: might significantly impact performance.
MO_LINE_LIST : integerLine list primitive
|
MO_SHADOW_CASTER_CONTEXT : integerVisibility context for shadow casting.
|
MO_SHADOW_CASTER_FLAG : integerMesh is a part of shadow rendering.
|
Related sample code
MO_TRIANGLE_LIST : integerTriangle list primitive.
|
Related sample code
MO_VIEWPORT_CONTEXT : integerVisibility context for regular rendering.
|
MO_VIEWPORT_VISIBLE_FLAG : integerMesh is a part of rendering.
|
Related sample code
add_resource ( handle, resource_handle )Adds a resource (vertex buffer or description) to a mesh.
|
handle : | integer | A handle to the mesh that we are adding resources to. |
resource_handle : | integer | Handle to the resource (buffer or description from RenderBuffer) that we are adding. |
This function does not return any values. |
Related sample code
Other related reference items
clear_resources ( handle )Removes all added resources form the mesh.
|
handle : | integer | A handle to the mesh that we are clearing. |
This function does not return any values. |
create ( unit, node, mesh_name, flags ) : integerCreates a new mesh object and returns a handle to it.
|
unit : | The unit that should own the new mesh. | |
node : | string | The name of the node in the unit that the mesh should be attached to. |
mesh_name : | string | The name of the newly created mesh (for debugging purposes). |
flags : | integer | A MO_*_FLAG value for the mesh. |
integer |
A handle to the newly created mesh. |
Related sample code
Other related reference items
destroy_mesh ( handle )Destroys a mesh created by create().
|
handle : | integer | A handle to the mesh to be destroyed. |
This function does not return any values. |
flags ( handle ) : integerReturns the MO_*_FLAG flags for the mesh.
|
handle : | integer | A handle to the mesh. |
integer |
The MO_*_FLAG flags for the mesh. |
remove_resource ( handle, resource_handle )Removes a resource added with add_resource().
|
handle : | integer | A handle to the mesh that we are removing resources from. |
resource_handle : | integer | Handle to the resource (buffer or description from RenderBuffer) that we are removing. |
This function does not return any values. |
set_batch_info ( handle, batches )Sets the batch/drawcall information for the mesh.
|
handle : | integer | A handle to the mesh who's batches we are describing. |
batches : | table | Describes the rendering bathces for the mesh. |
This function does not return any values. |
batches should be a table of tables, with each subtable describing one batch. The subtables should have the following fields:
Related sample code
set_bounding_box ( handle, min, max )Sets the AABB bounding box for the mesh.
|
handle : | integer | A handle to the mesh. |
min : | Minimum corner of the AABB. | |
max : | Maximum corner of the AABB. |
This function does not return any values. |
Related sample code
set_flags ( handle, flags )Sets the MO_*_FLAG flags for the mesh.
|
handle : | integer | A handle to the mesh. |
flags : | integer | The flags to set. |
This function does not return any values. |
set_materials ( handle, materials )Sets the materials for the mesh.
|
handle : | integer | A handle to the mesh who's materials we should set. |
materials : | string[] | A list of materials for the mesh. The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown. |
This function does not return any values. |
Related sample code
Other related reference items
set_visibility ( handle, context, visible )Sets the visiblity of the mesh in the context.
|
handle : | integer | A handle to the mesh. |
context : | integer | The MO_*_CONTEXT we are setting the visiblity for. |
visible : | boolean | True if the mesh should be visible. |
This function does not return any values. |
visibility ( handle, context ) : booleanReturns the visiblity in the context.
|
handle : | integer | A handle to the mesh. |
context : | integer | The MO_*_CONTEXT we are checking the visiblity for. |
boolean |
The visiblity in the context. |