Skip to main content

BimCamera

Index

Accessors

publiccameraOptions

  • Gets or sets options for camera pivot control.


    Returns CameraOptions

publicmode

  • Gets the camera mode (pivot, fps or all). See CameraMode for more information


    Returns CameraMode

  • Sets the camera mode (pivot, fps or all). See CameraMode for more information


    Parameters

    Returns void

publicpivotOptions

Methods

publicattachBehavior

  • attachBehavior(behavior: TwinfinityCameraBehavior): boolean
  • Attaches a behavior to the camera.


    Parameters

    • behavior: TwinfinityCameraBehavior

      The behavior to be attached to the camera.

    Returns boolean

    true if the behavior was successfully attached to the camera, otherwise false.

publicdefaultView

  • Resets the camera to the default view. Camera is positioned to view entire building


    Parameters

    • optionaldirection: CameraDirection

      Optional. Direction camera should look at building from. Default is a angled top position.

    Returns void

publicdetachBehavior

  • detachBehavior(behavior: TwinfinityCameraBehavior): boolean
  • Detaches a behavior from the camera.


    Parameters

    • behavior: TwinfinityCameraBehavior

      The behavior to be detached from the camera.

    Returns boolean

    true if the behavior was successfully detached to the camera, otherwise false.

publicforwardVector

  • forwardVector(): Vector3
  • Returns camera forward vector.


    Returns Vector3

publicgetViewAsString

  • getViewAsString(): string
  • Returns the current camera position and target as a string


    Returns string

publiclock

  • lock(): void
  • @deprecated

    Use cameraOptions instead Locks camera to prevent user interaction.


    Returns void

publiclookAt

  • lookAt(eye: Vector3, target: Vector3): void
  • Sets camera position at eye and rotation to look towards target.


    Parameters

    • eye: Vector3

      Point to look from.

    • target: Vector3

      Point to look towards.

    Returns void

publiclookFrom

  • Sets camera rotation to look towards the specified direction and zooms to extent of visible objects.


    Parameters

    • direction: CameraDirection

      The direction to look from (top = -Z, bottom = +Z, front = +Y, back = -Y, left = +X, right = -X).

    Returns void

publicsetLock

  • setLock(locked: boolean): void
  • @deprecated

    Use cameraOptions instead Sets whether camera should prevent user interaction or not.


    Parameters

    • locked: boolean

      Whether camera should be locked or not.

    Returns void

publicsetMode

  • @deprecated

    Use the mode property instead Sets camera mode.


    Parameters

    Returns void

publicsetPivot

  • setPivot(mode: Auto): void
  • setPivot(mode: Fixed, pivot: Vector3 | BimIfcObject): void
  • Sets the pivot point to be either based on mouse cursor position (Auto) or a fixed point (Fixed).


    Parameters

    • mode: Auto

      Whether to use a cursor-based pivot point (Auto) or a fixed pivot point (Fixed).

    Returns void

publicsetProjection

  • Sets camera projection.


    Parameters

    Returns void

publicsetViewFromString

  • setViewFromString(viewString: string): void
  • Sets the camera’s position and target from given string


    Parameters

    • viewString: string

      A string generated by getViewAsString

    Returns void

publicunlock

  • unlock(): void
  • @deprecated

    Use Use cameraOptions instead Unlocks camera to allow for user interaction.


    Returns void

publiczoomToExtent

  • Zooms camera to the extent of the specified bounding box.


    Parameters

    • extent: Bound

      Bounding box in format [minX, minY, minZ, maxX, maxY, maxZ].

    • optionaldirection: CameraDirection

      [Optional]. If set, the camera is positioned according to the direction during zoom. Otherwise, the current direction is kept.

    Returns void