BimCamera
Index
Accessors
publiccameraOptions
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
mode: CameraMode
Returns void
publicpivotOptions
Returns CameraOptions
Methods
publicattachBehavior
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
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
Returns camera forward vector.
Returns Vector3
publicgetViewAsString
Returns the current camera position and target as a string
Returns string
publiclock
Returns void
publiclookAt
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
Parameters
locked: boolean
Whether camera should be locked or not.
Returns void
publicsetMode
Parameters
mode: CameraMode
The camera mode to set.
Returns void
publicsetPivot
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
projection: CameraProjection
The camera projection to set.
Returns void
publicsetViewFromString
Sets the camera’s position and target from given string
Parameters
viewString: string
A string generated by getViewAsString
Returns void
publicunlock
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
Gets or sets options for camera pivot control.