Documentation
¶
Overview ¶
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.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- 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) Mesh.Instance
- func (self Instance) GetItemMeshCastShadow(id int) RenderingServer.ShadowCastingSetting
- 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) NavigationMesh.Instance
- func (self Instance) GetItemNavigationMeshTransform(id int) Transform3D.BasisOrigin
- func (self Instance) GetItemPreview(id int) Texture2D.Instance
- func (self Instance) GetItemShapes(id int) []Shape3D.Instance
- func (self Instance) GetLastUnusedItemId() int
- func (self Instance) ID() ID
- func (self Instance) RemoveItem(id int)
- func (self Instance) SetItemMesh(id int, mesh Mesh.Instance)
- func (self Instance) SetItemMeshCastShadow(id int, shadow_casting_setting RenderingServer.ShadowCastingSetting)
- 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 NavigationMesh.Instance)
- func (self Instance) SetItemNavigationMeshTransform(id int, navigation_mesh Transform3D.BasisOrigin)
- func (self Instance) SetItemPreview(id int, texture Texture2D.Instance)
- func (self Instance) SetItemShapes(id int, shapes []Shape3D.Instance)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- 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 Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsMeshLibrary ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.MeshLibrary
Instance of the class with convieniently typed arguments and results.
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 GetLastUnusedItemId.
func (Instance) FindItemByName ¶
Returns the first item with the given name, or -1 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) GetItemMeshCastShadow ¶
func (self Instance) GetItemMeshCastShadow(id int) RenderingServer.ShadowCastingSetting
Returns the item's shadow casting mode.
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) NavigationMesh.Instance
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 SetItemPreview. 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.BasisOrigin.
func (Instance) GetLastUnusedItemId ¶
Gets an unused ID for a new item.
func (Instance) SetItemMesh ¶
Sets the item's mesh.
func (Instance) SetItemMeshCastShadow ¶
func (self Instance) SetItemMeshCastShadow(id int, shadow_casting_setting RenderingServer.ShadowCastingSetting)
Sets the item's shadow casting mode to 'shadow_casting_setting'.
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 FindItemByName.
func (Instance) SetItemNavigationLayers ¶
Sets the item's navigation layers bitmask.
func (Instance) SetItemNavigationMesh ¶
func (self Instance) SetItemNavigationMesh(id int, navigation_mesh NavigationMesh.Instance)
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.BasisOrigin that will be applied to it. For shapes that should not have a transform, use [Transform3d.Identity].