Camera

Interfaces

Type Aliases

Variables

  • MAX_ANGLE

  • MAX_TILT

  • MIN_ANGLE

  • MIN_TILT


Type Aliases

CameraRotateFunction

Variables

Camera.MAX_ANGLE
Type

150

Camera.MAX_TILT
Type

45

Camera.MIN_ANGLE
Type

30

Camera.MIN_TILT
Type

-45

Functions

applyGravity

Operators.Camera.applyGravity(view, pointObject, downVector, maxFallDistance)
Arguments
  • view (View()) – The View of the scene.

  • pointObject (Point3()) – The point object to fall.

  • downVector (Point3()) – The vector used to determine the direction of fall.

  • maxFallDistance (null | number()) – If the fall distance would exceed this value, then gravity is not applied at all.

This returns the final position of a point object when gravity is applied. If there are no floors to collide with, null is returned.

It is the caller’s responsibility to interpolate smooth motion if desired.

Return type

Promise <Point3 | null>

buildCollisionRayConfig

Operators.Camera.buildCollisionRayConfig(bimMask, maxWorldDistance)
Arguments
  • bimMask (BimMask()) – Restricts the objects the selection ray can select to the BIM types present in the mask.

  • maxWorldDistance (null | number()) – If non-null, this limits the distance the selection ray can travel to hit an object.

Returns

A ray pick config object suitable for BIM collision tests.

Return type

PickConfig

clamp

Operators.Camera.clamp(value, min, max)
Arguments
  • value (number()) – None

  • min (number()) – None

  • max (number()) – None

Return type

number

getDownAxis

Operators.Camera.getDownAxis(model)
Arguments

Returns the vector pointing down in the scene.

Return type

Point3

normalizeDirections

Operators.Camera.normalizeDirections(directions)
Arguments
  • directions (Set) – None

Normalizes a set of directions such that it does not contain opposing directions. If opposing directions do exist, then they cancel each other and are removed from the set.

Return type

void

removeOpposing

Operators.Camera.removeOpposing(set, x, y)
Arguments
  • set (Set) – The set to inspect and alter.

  • x (T()) – The value that cancels with y.

  • y (T()) – The value that cancels with x.

If the input set contains both x and y, then both x and y are removed from the set. Otherwise this function does nothing.

Return type

void

testWallCollision

Operators.Camera.testWallCollision(view, position, movementVector, maxCollisionDistance)
Arguments
  • view (View()) – None

  • position (Point3()) – None

  • movementVector (Point3()) – None

  • maxCollisionDistance (number()) – None

Returns the point of collision or null if there is none.

Return type

Promise <FaceSelectionItem | null>