MeshLibrary¶
Inherits: Resource < RefCounted < Object
Library of meshes.
Description¶
A library of meshes. Contains a list of Mesh resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in GridMap.
Tutorials¶
Methods¶
void |
clear ( ) |
void |
create_item ( int id ) |
find_item_by_name ( String name ) const |
|
get_item_list ( ) const |
|
get_item_mesh ( int id ) const |
|
get_item_mesh_transform ( int id ) const |
|
get_item_name ( int id ) const |
|
get_item_navigation_layers ( int id ) const |
|
get_item_navigation_mesh ( int id ) const |
|
get_item_navigation_mesh_transform ( int id ) const |
|
get_item_preview ( int id ) const |
|
get_item_shapes ( int id ) const |
|
get_last_unused_item_id ( ) const |
|
void |
remove_item ( int id ) |
void |
set_item_mesh ( int id, Mesh mesh ) |
void |
set_item_mesh_transform ( int id, Transform3D mesh_transform ) |
void |
set_item_name ( int id, String name ) |
void |
set_item_navigation_layers ( int id, int navigation_layers ) |
void |
set_item_navigation_mesh ( int id, NavigationMesh navigation_mesh ) |
void |
set_item_navigation_mesh_transform ( int id, Transform3D navigation_mesh ) |
void |
set_item_preview ( int id, Texture2D texture ) |
void |
set_item_shapes ( int id, Array shapes ) |
Method Descriptions¶
void clear ( )
Clears the library.
void create_item ( int id )
Creates a new item in the library with the given ID.
You can get an unused ID from get_last_unused_item_id.
int find_item_by_name ( String name ) const
Returns the first item with the given name.
PackedInt32Array get_item_list ( ) const
Returns the list of item IDs in use.
Mesh get_item_mesh ( int id ) const
Returns the item's mesh.
Transform3D get_item_mesh_transform ( int id ) const
Returns the transform applied to the item's mesh.
String get_item_name ( int id ) const
Returns the item's name.