ImFusion Web SDK

VolumeView

A Volumetric 3D View.

Extends

Properties

PropertyTypeDescription
renderModeRenderModeThe render mode of the underlying volume renderer.

Methods

MethodDescription
camera()Returns a copy of the current Camera defining the view and projection matrix.
reset()Resets the view to its default state.
setCamera()Sets the Camera, using a smooth animation unless suppressed.
setMatrix()Sets the camera-to-world matrix, using a smooth animation unless suppressed.

Inherited from View

MethodDescription
addObject()Add a custom GlObject to this view
removeObject()Remove a custom GlObject from this view
onVisibleDataChanged()Fires when the visible data in the view changes.
setBorderColor()Set the border color for this view.
screenshot()Creates a screenshot of the this view.
setBackgroundColor()Set the optional background color used to clear the viewport before rendering anything.

Inherited from ClassHandle

MethodDescription
isAliasOf()Returns true if this handle and other alias the same underlying C++ object.
delete()Releases this JavaScript handle.
deleteLater()Schedules this handle for deferred deletion and returns this handle.
isDeleted()Returns true if this handle has already been deleted.
[dispose]()Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually.
clone()Returns a new JavaScript handle aliasing the same underlying C++ object.

camera()

ts
camera(): Camera;

Returns a copy of the current Camera defining the view and projection matrix.

Returns

Camera


reset()

ts
reset(options?: VolumeViewResetOption[]): void;

Resets the view to its default state.

Parameters

ParameterTypeDescription
options?VolumeViewResetOption[]Which aspects to reset. Omit to reset everything.

Returns

void


setCamera()

ts
setCamera(camera: Camera, suppressAnimation?: boolean): void;

Sets the Camera, using a smooth animation unless suppressed.

Parameters

ParameterTypeDescription
cameraCamera-
suppressAnimation?booleanIf true, the camera snaps to the new pose instead of animating. Defaults to false.

Returns

void


setMatrix()

ts
setMatrix(camToWorldMatrix: mat4, suppressAnimation?: boolean): void;

Sets the camera-to-world matrix, using a smooth animation unless suppressed. This has the same effect as calling setCamera with the inverse of camToWorldMatrix as camera pose.

Parameters

ParameterTypeDescription
camToWorldMatrixmat4-
suppressAnimation?booleanIf true, the camera snaps to the new pose instead of animating. Defaults to false.

Returns

void

On this page