MeshLibrary

Library of meshes.

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.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

clear
void clear()

Clears the library.

createItem
void createItem(long id)

Creates a new item in the library with the given ID. You can get an unused ID from getLastUnusedItemId.

findItemByName
long findItemByName(String name)

Returns the first item with the given name.

getItemList
PoolIntArray getItemList()

Returns the list of item IDs in use.

getItemMesh
Ref!Mesh getItemMesh(long id)

Returns the item's mesh.

getItemName
String getItemName(long id)

Returns the item's name.

getItemNavmesh
Ref!NavigationMesh getItemNavmesh(long id)

Returns the item's navigation mesh.

getItemNavmeshTransform
Transform getItemNavmeshTransform(long id)

Returns the transform applied to the item's navigation mesh.

getItemPreview
Ref!Texture getItemPreview(long id)

When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using setItemPreview. Returns an empty Texture if no preview was manually set in a running project.

getItemShapes
Array getItemShapes(long id)

Returns an item's collision shapes. The array consists of each Shape followed by its Transform.

getLastUnusedItemId
long getLastUnusedItemId()

Gets an unused ID for a new item.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(MeshLibrary other)
opEquals
bool opEquals(typeof(null) n)
removeItem
void removeItem(long id)

Removes the item.

setItemMesh
void setItemMesh(long id, Mesh mesh)

Sets the item's mesh.

setItemName
void setItemName(long id, String name)

Sets the item's name. This name is shown in the editor. It can also be used to look up the item later using findItemByName.

setItemNavmesh
void setItemNavmesh(long id, NavigationMesh navmesh)

Sets the item's navigation mesh.

setItemNavmeshTransform
void setItemNavmeshTransform(long id, Transform navmesh)

Sets the transform to apply to the item's navigation mesh.

setItemPreview
void setItemPreview(long id, Texture texture)

Sets a texture to use as the item's preview icon in the editor.

setItemShapes
void setItemShapes(long id, Array shapes)

Sets an item's collision shapes. The array should consist of Shape objects, each followed by a Transform that will be applied to it. For shapes that should not have a transform, use constant Transform.IDENTITY.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
MeshLibrary _new()

Construct a new instance of MeshLibrary. Note: use memnew!MeshLibrary instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta