MeshInstance

Node that instances meshes into a scenario.

MeshInstance is a node that takes a Mesh resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single Mesh in many places. This allows to reuse geometry and save on resources. When a Mesh has to be instanced more than thousands of times at close proximity, consider using a MultiMesh in a MultiMeshInstance instead.

Members

Aliases

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

Functions

_meshChanged
void _meshChanged()
createConvexCollision
void createConvexCollision()

This helper creates a StaticBody child node with a ConvexPolygonShape collision shape calculated from the mesh geometry. It's mainly used for testing.

createDebugTangents
void createDebugTangents()

This helper creates a MeshInstance child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing.

createTrimeshCollision
void createTrimeshCollision()

This helper creates a StaticBody child node with a ConcavePolygonShape collision shape calculated from the mesh geometry. It's mainly used for testing.

getMesh
Ref!Mesh getMesh()
getSkeletonPath
NodePath getSkeletonPath()
getSurfaceMaterial
Ref!Material getSurfaceMaterial(long surface)

Returns the Material for a surface of the Mesh resource.

getSurfaceMaterialCount
long getSurfaceMaterialCount()
opAssign
MeshInstance opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(MeshInstance other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setMesh
void setMesh(Mesh mesh)
setSkeletonPath
void setSkeletonPath(NodePathArg0 skeleton_path)
setSurfaceMaterial
void setSurfaceMaterial(long surface, Material material)

Sets the Material for a surface of the Mesh resource.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

mesh
Mesh mesh [@property getter]
Mesh mesh [@property setter]

The Mesh resource for the instance.

skeleton
NodePath skeleton [@property getter]
NodePath skeleton [@property setter]

NodePath to the Skeleton associated with the instance.

Static functions

_new
MeshInstance _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
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
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
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