EditorSpatialGizmo

Custom gizmo for editing Spatial objects.

Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See EditorSpatialGizmoPlugin for more information.

Members

Aliases

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

Functions

addCollisionSegments
void addCollisionSegments(PoolVector3Array segments)

Adds the specified segments to the gizmo's collision shape for picking. Call this function during redraw.

addCollisionTriangles
void addCollisionTriangles(TriangleMesh triangles)

Adds collision triangles to the gizmo for picking. A TriangleMesh can be generated from a regular Mesh too. Call this function during redraw.

addHandles
void addHandles(PoolVector3Array handles, Material material, bool billboard, bool secondary)

Adds a list of handles (points) which can be used to deform the object being edited. There are virtual functions which will be called upon editing of these handles. Call this function during redraw.

addLines
void addLines(PoolVector3Array lines, Material material, bool billboard, Color modulate)

Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during redraw.

addMesh
void addMesh(ArrayMesh mesh, bool billboard, SkinReference skeleton, Material material)

Adds a mesh to the gizmo with the specified billboard state, skeleton and material. If billboard is true, the mesh will rotate to always face the camera. Call this function during redraw.

addUnscaledBillboard
void addUnscaledBillboard(Material material, double default_scale, Color modulate)

Adds an unscaled billboard for visualization. Call this function during redraw.

clear
void clear()

Removes everything in the gizmo including meshes, collisions and handles.

commitHandle
void commitHandle(long index, VariantArg1 restore, bool cancel)

Commit a handle being edited (handles must have been previously added by addHandles). If the cancel parameter is true, an option to restore the edited value to the original is provided.

getHandleName
String getHandleName(long index)

Gets the name of an edited handle (handles must have been previously added by addHandles). Handles can be named for reference to the user when editing.

getHandleValue
Variant getHandleValue(long index)

Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling commitHandle.

getPlugin
Ref!EditorSpatialGizmoPlugin getPlugin()

Returns the EditorSpatialGizmoPlugin that owns this gizmo. It's useful to retrieve materials using EditorSpatialGizmoPlugin.getMaterial.

getSpatialNode
Spatial getSpatialNode()

Returns the Spatial node associated with this gizmo.

isHandleHighlighted
bool isHandleHighlighted(long index)

Returns true if the handle at index index is highlighted by being hovered with the mouse.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(EditorSpatialGizmo other)
opEquals
bool opEquals(typeof(null) n)
redraw
void redraw()

This function is called when the Spatial this gizmo refers to changes (the Spatial.updateGizmo is called).

setHandle
void setHandle(long index, Camera camera, Vector2 point)

This function is used when the user drags a gizmo handle (previously added with addHandles) in screen coordinates. The Camera is also provided so screen coordinates can be converted to raycasts.

setHidden
void setHidden(bool hidden)

Sets the gizmo's hidden state. If true, the gizmo will be hidden. If false, it will be shown.

setSpatialNode
void setSpatialNode(Node node)

Sets the reference Spatial node for the gizmo. node must inherit from Spatial.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
EditorSpatialGizmo _new()

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