Documentation
¶
Overview ¶
Package MeshLibrary provides methods for working with MeshLibrary object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsMeshLibrary() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) Clear()
- func (self Instance) CreateItem(id int)
- func (self Instance) FindItemByName(name string) int
- func (self Instance) GetItemList() []int32
- func (self Instance) GetItemMesh(id int) [1]gdclass.Mesh
- func (self Instance) GetItemMeshTransform(id int) Transform3D.BasisOrigin
- func (self Instance) GetItemName(id int) string
- func (self Instance) GetItemNavigationLayers(id int) int
- func (self Instance) GetItemNavigationMesh(id int) [1]gdclass.NavigationMesh
- func (self Instance) GetItemNavigationMeshTransform(id int) Transform3D.BasisOrigin
- func (self Instance) GetItemPreview(id int) [1]gdclass.Texture2D
- func (self Instance) GetItemShapes(id int) []any
- func (self Instance) GetLastUnusedItemId() int
- func (self Instance) RemoveItem(id int)
- func (self Instance) SetItemMesh(id int, mesh [1]gdclass.Mesh)
- func (self Instance) SetItemMeshTransform(id int, mesh_transform Transform3D.BasisOrigin)
- func (self Instance) SetItemName(id int, name string)
- func (self Instance) SetItemNavigationLayers(id int, navigation_layers int)
- func (self Instance) SetItemNavigationMesh(id int, navigation_mesh [1]gdclass.NavigationMesh)
- func (self Instance) SetItemNavigationMeshTransform(id int, navigation_mesh Transform3D.BasisOrigin)
- func (self Instance) SetItemPreview(id int, texture [1]gdclass.Texture2D)
- func (self Instance) SetItemShapes(id int, shapes []any)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.MeshLibrary
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].
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsMeshLibrary ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) CreateItem ¶
Creates a new item in the library with the given ID. You can get an unused ID from [method get_last_unused_item_id].
func (Instance) FindItemByName ¶
Returns the first item with the given name, or [code]-1[/code] if no item is found.
func (Instance) GetItemList ¶
Returns the list of item IDs in use.
func (Instance) GetItemMesh ¶
Returns the item's mesh.
func (Instance) GetItemMeshTransform ¶
func (self Instance) GetItemMeshTransform(id int) Transform3D.BasisOrigin
Returns the transform applied to the item's mesh.
func (Instance) GetItemName ¶
Returns the item's name.
func (Instance) GetItemNavigationLayers ¶
Returns the item's navigation layers bitmask.
func (Instance) GetItemNavigationMesh ¶
func (self Instance) GetItemNavigationMesh(id int) [1]gdclass.NavigationMesh
Returns the item's navigation mesh.
func (Instance) GetItemNavigationMeshTransform ¶
func (self Instance) GetItemNavigationMeshTransform(id int) Transform3D.BasisOrigin
Returns the transform applied to the item's navigation mesh.
func (Instance) GetItemPreview ¶
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 [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project.
func (Instance) GetItemShapes ¶
Returns an item's collision shapes. The array consists of each [Shape3D] followed by its [Transform3D].
func (Instance) GetLastUnusedItemId ¶
Gets an unused ID for a new item.
func (Instance) SetItemMesh ¶
Sets the item's mesh.
func (Instance) SetItemMeshTransform ¶
func (self Instance) SetItemMeshTransform(id int, mesh_transform Transform3D.BasisOrigin)
Sets the transform to apply to the item's mesh.
func (Instance) SetItemName ¶
Sets the item's name. This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].
func (Instance) SetItemNavigationLayers ¶
Sets the item's navigation layers bitmask.
func (Instance) SetItemNavigationMesh ¶
func (self Instance) SetItemNavigationMesh(id int, navigation_mesh [1]gdclass.NavigationMesh)
Sets the item's navigation mesh.
func (Instance) SetItemNavigationMeshTransform ¶
func (self Instance) SetItemNavigationMeshTransform(id int, navigation_mesh Transform3D.BasisOrigin)
Sets the transform to apply to the item's navigation mesh.
func (Instance) SetItemPreview ¶
Sets a texture to use as the item's preview icon in the editor.
func (Instance) SetItemShapes ¶
Sets an item's collision shapes. The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY].