BimSurfer
Extends:
Entry point for the public BimSurfer API.
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
addSelectedHandler(handler: {handler: ?Function}) Add a handler which is called when an object is selected in the viewer |
|
public |
cleanup() |
|
public |
getCamera(): {type: String, eye: Float32Array, target: Float32Array, up: Float32Array, fovy: ?Number} Gets a javascript representation of the current camera orientation |
|
public |
getSelected(): Number[] Gets the currently selected elements |
|
public |
Loads a BIMserver project into the specified domNode for rendering. |
|
public |
Resets part of the viewer to its default state. |
|
public |
resetColor(params: {ids: Number[]}): * Resets the color for the specified elements (to their original color) |
|
public |
setCamera(params: {type: String, eye: Float32Array, target: Float32Array, up: Float32Array, fovy: ?Number}) Sets the current camera orientation based on specified parameters |
|
public |
Sets the color for the specified elements |
|
public |
setSelectionState(params: {ids: Number[], selected: Boolean, clear: ?Boolean}): * Sets the selection state for the specified elements |
|
public |
setVisibility(params: {ids: Number[], visible: Boolean}): * Sets the visibility for the specified elements |
|
public |
Zooms the current camera in or out the fit the specified elements in the viewport |
Private Methods | ||
private |
|
|
private |
loadProjects(roid: Number): * Loads project meta-data} from a BIMserver and searches for the specified revision id. |
|
private |
loadRevision(project: Object, domNode: HTMLElement): * |
Public Constructors
public constructor() source
Public Members
public settings: * source
Private Members
private _api: * source
private _bimServerViewer: * source
Public Methods
public addSelectedHandler(handler: {handler: ?Function}) source
Add a handler which is called when an object is selected in the viewer
Params:
Name | Type | Attribute | Description |
handler | {handler: ?Function} | Handler (function) |
public cleanup() source
public getCamera(): {type: String, eye: Float32Array, target: Float32Array, up: Float32Array, fovy: ?Number} source
Gets a javascript representation of the current camera orientation
Return:
{type: String, eye: Float32Array, target: Float32Array, up: Float32Array, fovy: ?Number} | Camera parameters |
public load(params: {username: String, password: String, roid: Number, domNode: HTMLElement}): Promise source
Loads a BIMserver project into the specified domNode for rendering.
public reset(params: {cameraPosition: ?Boolean, colors: ?Boolean, visibility: ?Boolean}) source
Resets part of the viewer to its default state.
public resetColor(params: {ids: Number[]}): * source
Resets the color for the specified elements (to their original color)
Params:
Name | Type | Attribute | Description |
params | {ids: Number[]} |
Return:
* |
public setCamera(params: {type: String, eye: Float32Array, target: Float32Array, up: Float32Array, fovy: ?Number}) source
Sets the current camera orientation based on specified parameters
Params:
Name | Type | Attribute | Description |
params | {type: String, eye: Float32Array, target: Float32Array, up: Float32Array, fovy: ?Number} | Camera parameters |
public setColor(params: {ids: Number[], color: {r: Number, g: Number, b: Number, a: Number}}): * source
Sets the color for the specified elements
Return:
* |
public setSelectionState(params: {ids: Number[], selected: Boolean, clear: ?Boolean}): * source
Sets the selection state for the specified elements
Return:
* |
public setVisibility(params: {ids: Number[], visible: Boolean}): * source
Sets the visibility for the specified elements
Return:
* |
public viewFit(params: {ids: Number[]}): * source
Zooms the current camera in or out the fit the specified elements in the viewport
Params:
Name | Type | Attribute | Description |
params | {ids: Number[]} |
Return:
* |
Private Methods
private loadModel(project: Object, domNode: HTMLElement): * source
Params:
Name | Type | Attribute | Description |
project | Object | Project meta-data object |
|
domNode | HTMLElement | The parent HTMLElement in which to create a CANVAS for WebGL rendering |
Return:
* |