Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for bounding box gizmo

Hierarchy

Implemented by

Index

Properties

_rootMesh: Mesh

The root mesh of the gizmo

attachedMesh: Nullable<AbstractMesh>

Mesh that the gizmo will be attached to. (eg. on a drag gizmo the mesh that will be dragged)

  • When set, interactions will be enabled
attachedNode: Nullable<Node>

Node that the gizmo will be attached to. (eg. on a drag gizmo the mesh, bone or NodeTransform that will be dragged)

  • When set, interactions will be enabled
axisFactor: Vector3

Scale factor vector used for masking some axis

customRotationQuaternion: Nullable<Quaternion>

posture that the gizmo will be display When set null, default value will be used (Quaternion(0, 0, 0, 1))

fixedDragMeshBoundsSize: boolean

If set, the rotation spheres and scale boxes will increase in size based on the size of the bounding box Note : fixedDragMeshScreenSize takes precedence over fixedDragMeshBoundsSize if both are true

fixedDragMeshScreenSize: boolean

If set, the rotation spheres and scale boxes will increase in size based on the distance away from the camera to have a consistent screen size Note : fixedDragMeshScreenSize takes precedence over fixedDragMeshBoundsSize if both are true

fixedDragMeshScreenSizeDistanceFactor: number

The distance away from the object which the draggable meshes should appear world sized when fixedDragMeshScreenSize is set to true

The utility layer the gizmo will be added to

ignoreChildren: boolean

If child meshes should be ignored when calculating the bounding box. This should be set to true to avoid perf hits with heavily nested meshes.

includeChildPredicate: Nullable<((abstractMesh: AbstractMesh) => boolean)>

Returns true if a descendant should be included when computing the bounding box. When null, all descendants are included. If ignoreChildren is set this will be ignored.

isHovered: boolean

True when the mouse pointer is hovered a gizmo mesh

onDragStartObservable: Observable<{}>

Fired when a rotation sphere or scale box is dragged

onRotationSphereDragEndObservable: Observable<{}>

Fired when a rotation sphere drag is ended

onRotationSphereDragObservable: Observable<{}>

Fired when a rotation sphere is dragged

onScaleBoxDragEndObservable: Observable<{}>

Fired when a scale box drag is ended

onScaleBoxDragObservable: Observable<{}>

Fired when a scale box is dragged

rotationSphereSize: number

The size of the rotation spheres attached to the bounding box

scaleBoxSize: number

The size of the scale boxes attached to the bounding box

scaleDragSpeed: number

Scale factor scalar affecting all axes' drag speed

scalePivot: Nullable<Vector3>

Relative bounding box pivot used when scaling the attached node.

scaleRatio: number

Ratio for the scale of the gizmo

updateGizmoPositionToMatchAttachedMesh: boolean

If set the gizmo's position will be updated to match the attached mesh each frame (Default: true)

updateGizmoRotationToMatchAttachedMesh: boolean

If set the gizmo's rotation will be updated to match the attached mesh each frame (Default: true)

updateScale: boolean

When set, the gizmo will always appear the same size no matter where the camera is (default: true)

Methods

  • dispose(): void
  • Releases all held resources

    Returns void

  • enableDragBehavior(): void
  • Enables a pointer drag behavior on the bounding box of the gizmo

    Returns void

  • Returns an array containing all boxes used for scaling (in increasing x, y and z orders)

    Returns AbstractMesh[]

  • Sets the color of the bounding box gizmo

    Parameters

    • color: Color3

      the color to set

    Returns void

  • setCustomMesh(mesh: Mesh): void
  • Disposes and replaces the current meshes in the gizmo with the specified mesh

    Parameters

    Returns void

  • setEnabledRotationAxis(axis: string): void
  • Enables rotation on the specified axis and disables rotation on the others

    Parameters

    • axis: string

      The list of axis that should be enabled (eg. "xy" or "xyz")

    Returns void

  • setEnabledScaling(enable: boolean, homogeneousScaling?: boolean): void
  • Enables/disables scaling

    Parameters

    • enable: boolean

      if scaling should be enabled

    • Optional homogeneousScaling: boolean

      defines if scaling should only be homogeneous

    Returns void

  • updateBoundingBox(): void
  • Updates the bounding box information for the Gizmo

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme