VisualInstance

Parent of all visual 3D nodes.

The VisualInstance is used to connect a resource to a visual representation. All visual 3D nodes inherit from the VisualInstance. In general, you should not access the VisualInstance properties directly as they are accessed and managed by the nodes that inherit from VisualInstance. VisualInstance is the node representation of the VisualServer instance.

Members

Aliases

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

Functions

_getVisualInstanceRid
RID _getVisualInstanceRid()
getAabb
AABB getAabb()

Returns the AABB (also known as the bounding box) for this VisualInstance. See also getTransformedAabb.

getBase
RID getBase()

Returns the RID of the resource associated with this VisualInstance. For example, if the Node is a MeshInstance, this will return the RID of the associated Mesh.

getInstance
RID getInstance()

Returns the RID of this instance. This RID is the same as the RID returned by VisualServer.instanceCreate. This RID is needed if you want to call VisualServer functions directly on this VisualInstance.

getLayerMask
long getLayerMask()
getLayerMaskBit
bool getLayerMaskBit(long layer)

Returns true when the specified layer is enabled in layers and false otherwise.

getTransformedAabb
AABB getTransformedAabb()

Returns the transformed AABB (also known as the bounding box) for this VisualInstance. Transformed in this case means the AABB plus the position, rotation, and scale of the Spatial's Transform. See also getAabb.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(VisualInstance other)
opEquals
bool opEquals(typeof(null) n)
setBase
void setBase(RID base)

Sets the resource that is instantiated by this VisualInstance, which changes how the engine handles the VisualInstance under the hood. Equivalent to VisualServer.instanceSetBase.

setLayerMask
void setLayerMask(long mask)
setLayerMaskBit
void setLayerMaskBit(long layer, bool enabled)

Enables a particular layer in layers.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

layers
long layers [@property getter]
long layers [@property setter]

The render layer(s) this VisualInstance is drawn on. This object will only be visible for Cameras whose cull mask includes the render object this VisualInstance is set to.

Static functions

_new
VisualInstance _new()

Construct a new instance of VisualInstance. Note: use memnew!VisualInstance 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