Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlaneRotationGizmo

Single plane rotation gizmo

Hierarchy

  • Gizmo
    • PlaneRotationGizmo

Implements

Index

Constructors

constructor

  • Creates a PlaneRotationGizmo

    Parameters

    • planeNormal: Vector3

      The normal of the plane which the gizmo will be able to rotate on

    • Optional color: Color3

      The color of the gizmo

    • Optional gizmoLayer: UtilityLayerRenderer

      The utility layer the gizmo will be added to

    • Optional tessellation: number

      Amount of tessellation to be used when creating rotation circles

    • Optional parent: Nullable<RotationGizmo>
    • Optional useEulerRotation: boolean

      Use and update Euler angle instead of quaternion

    • Optional thickness: number

      display gizmo axis thickness

    Returns PlaneRotationGizmo

Properties

_rootMeshSearch playground for _rootMesh

_rootMesh: Mesh

The root mesh of the gizmo

angleSearch playground for angle

angle: number

Accumulated relative angle value for rotation on the axis. Reset to 0 when a dragStart occurs

dragBehaviorSearch playground for dragBehavior

dragBehavior: PointerDragBehavior

Drag behavior responsible for the gizmos dragging interactions

gizmoLayerSearch playground for gizmoLayer

The utility layer the gizmo will be added to

onSnapObservableSearch playground for onSnapObservable

onSnapObservable: Observable<{ snapDistance: number }>

Event that fires each time the gizmo snaps to a new location.

  • snapDistance is the the change in distance

snapDistanceSearch playground for snapDistance

snapDistance: number

Rotation distance in radians that the gizmo will snap to (Default: 0)

updateGizmoPositionToMatchAttachedMeshSearch playground for updateGizmoPositionToMatchAttachedMesh

updateGizmoPositionToMatchAttachedMesh: boolean

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

updateScaleSearch playground for updateScale

updateScale: boolean

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

Static MaxDragAngleSearch playground for MaxDragAngle

MaxDragAngle: number

The maximum angle between the camera and the rotation allowed for interaction If a rotation plane appears 'flat', a lower value allows interaction.

Static PreserveScalingSearch playground for PreserveScaling

PreserveScaling: boolean

When enabled, any gizmo operation will perserve scaling sign. Default is off. Only valid for TransformNode derived classes (Mesh, AbstractMesh, ...)

Accessors

attachedMesh

  • 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

    Returns 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

    Parameters

    Returns any

attachedNode

  • 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

    Returns 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

    Parameters

    Returns any

customRotationQuaternion

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(value: boolean): any
  • If the gizmo is enabled

    Returns boolean

  • If the gizmo is enabled

    Parameters

    • value: boolean

    Returns any

isHovered

  • get isHovered(): boolean
  • True when the mouse pointer is hovered a gizmo mesh

    Returns boolean

scaleRatio

  • get scaleRatio(): number
  • set scaleRatio(value: number): any
  • Ratio for the scale of the gizmo (Default: 1)

    Returns number

  • Ratio for the scale of the gizmo (Default: 1)

    Parameters

    • value: number

    Returns any

updateGizmoRotationToMatchAttachedMesh

  • get updateGizmoRotationToMatchAttachedMesh(): boolean
  • set updateGizmoRotationToMatchAttachedMesh(value: boolean): any

Methods

disposeSearch playground for dispose

  • dispose(): void

setCustomMeshSearch playground for setCustomMesh

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

    Parameters

    • mesh: Mesh

      The mesh to replace the default mesh of the gizmo

    Returns void

Static GizmoAxisPointerObserverSearch playground for GizmoAxisPointerObserver

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static property
  • Static method