MeshLibrary

Inherits: Resource < Reference < Object

Category: Core

Brief Description

Library of meshes.

Methods

voidclear ( )
voidcreate_item ( int id )
intfind_item_by_name ( String name ) const
PoolIntArrayget_item_list ( ) const
Meshget_item_mesh ( int id ) const
Stringget_item_name ( int id ) const
NavigationMeshget_item_navmesh ( int id ) const
Textureget_item_preview ( int id ) const
Arrayget_item_shapes ( int id ) const
intget_last_unused_item_id ( ) const
voidremove_item ( int id )
voidset_item_mesh ( int id, Mesh mesh )
voidset_item_name ( int id, String name )
voidset_item_navmesh ( int id, NavigationMesh navmesh )
voidset_item_preview ( int id, Texture texture )
voidset_item_shapes ( int id, Array shapes )

Description

Library of meshes. Contains a list of Mesh resources, each with name and ID. Useful for GridMap or painting Terrain.

Method Descriptions

  • void clear ( )

Clear the library.


  • void create_item ( int id )

Create a new item in the library, supplied an id.



Returns the list of items.


  • Mesh get_item_mesh ( int id ) const

Returns the mesh of the item.


Returns the name of the item.





  • int get_last_unused_item_id ( ) const

Get an unused id for a new item.


  • void remove_item ( int id )

Remove the item.


  • void set_item_mesh ( int id, Mesh mesh )

Set the mesh of the item.


Set the name of the item.



  • void set_item_preview ( int id, Texture texture )

  • void set_item_shapes ( int id, Array shapes )