Viewer
The idea is that this class doesn't know anything about BIMserver, and can possibly be reused in classes other than BimServerViewer
Main viewer class, too many responsibilities:
- Keep track of width/height of viewport
- Keeps track of dirty scene
- Contains the basic render loop (and delegates to the render layers)
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
|
|
public |
animationListeners: *[] |
|
public |
|
|
public |
camera: * |
|
public |
|
|
public |
|
|
public |
canvas: * |
|
public |
colorRestore: *[] |
|
public |
|
|
public |
|
|
public set |
|
|
public get |
dirty: * |
|
public |
eventHandler: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
gl: * |
|
public |
height: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
lighting: * |
|
public |
modelBounds: * |
|
public |
|
|
public |
oitBuffer: * |
|
public |
|
|
public |
overlay: * |
|
public |
pickBuffer: * |
|
public |
|
|
public |
pickIdToViewObject: *[] |
|
public |
|
|
public |
quad: * |
|
public |
|
|
public |
renderLayers: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
settings: * |
|
public |
stats: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
viewObjects: * |
|
public |
|
|
public |
width: * |
Private Members | ||
private |
|
Method Summary
Public Methods | ||
public |
addAnimationListener(fn: *) |
|
public |
addSelectionListener(listener: *) |
|
public |
addToSelection(uniqueId: *) |
|
public |
addViewObject(uniqueId: *, viewObject: *) |
|
public |
callByType(method: *, types: *, args: ...*): * |
|
public |
cleanup() |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
enableSectionPlane(params: *): boolean |
|
public |
generateBufferSetToOidsMap(elems: *): * This will create a mapping from BufferSetId -> {bufferSet, oids[]} This is useful when we want to do batch updates of BufferSets, instead of randomly updating single objects in BufferSets The order already in elems will stay intact |
|
public |
getAabbFor(ids: *): * |
|
public |
getPickColor(uniqueId: *): * |
|
public |
getPickColorForPickId(pickId: *): * |
|
public |
getSelected(): * |
|
public |
getViewObject(uniqueId: *): * |
|
public |
init(): * |
|
public |
internalRender(elems: *, t: *) |
|
public |
|
|
public |
moveSectionPlane(params: *) |
|
public |
pick(params: *): * Attempts to pick an object at the given canvas coordinates. |
|
public |
positionSectionPlaneWidget(params: *) |
|
public |
|
|
public |
render(now: *) |
|
public |
|
|
public |
resetColor(elems: *): * |
|
public |
resetColorAlreadyBatched(elems: *, bufferSetsToUpdate: *): * |
|
public |
resetColors(): * |
|
public |
resetToDefaultView(modelBounds: *, animate: boolean) |
|
public |
|
|
public |
screenshot(callback: *): * |
|
public |
|
|
public |
setDimensions(width: *, height: *) |
|
public |
setMeasurementPoint(params: *) |
|
public |
setModelBounds(modelBounds: *, force: boolean) |
|
public |
setSelectionState(elems: *, selected: *, clear: *, fireEvent: boolean): * |
|
public |
setVisibility(elems: *, visible: *, sort: boolean, fireEvent: boolean): * |
|
public |
splitElementsPerRenderLayer(elems: *): * |
|
public |
|
|
public |
viewFit(ids: *, settings: *): * |
Public Constructors
public constructor() source
Public Members
public activeMeasurement: * source
public animationListeners: *[] source
public bufferSetPool: * source
public camera: * source
public cameraControl: * source
public canvas: * source
public colorRestore: *[] source
public currentSectionPlane: * source
public defaultColors: * source
public set dirty source
public get dirty: * source
public eventHandler: * source
public gl: * source
public height: * source
public hiddenDueToSetColor: * source
public idAugmentationFunction: * source
public instancesWithChangedColor: * source
public inverseUniqueIdCompareFunction: * source
public invisibleElements: * source
public lastRecordedDepth: * source
public lighting: * source
public modelBounds: * source
public oitBuffer: * source
public originalColors: * source
public overlay: * source
public pickBuffer: * source
public pickIdToViewObject: *[] source
public programManager: * source
public quad: * source
public renderLayers: * source
public sectionPlanes: * source
public selectedElements: * source
public settings: * source
public stats: * source
public tmp_unproject: * source
public uniqueIdCompareFunction: * source
public uniqueIdToBufferSet: * source
public useFloatColorBuffer: * source
public useOrderIndependentTransparency: * source
public viewObjects: * source
public viewObjectsByType: * source
public width: * source
Private Members
Public Methods
public addAnimationListener(fn: *) source
Params:
Name | Type | Attribute | Description |
fn | * |
public addSelectionListener(listener: *) source
Params:
Name | Type | Attribute | Description |
listener | * |
public addToSelection(uniqueId: *) source
Params:
Name | Type | Attribute | Description |
uniqueId | * |
public addViewObject(uniqueId: *, viewObject: *) source
Params:
Name | Type | Attribute | Description |
uniqueId | * | ||
viewObject | * |
public callByType(method: *, types: *, args: ...*): * source
Params:
Name | Type | Attribute | Description |
method | * | ||
types | * | ||
args | ...* |
Return:
* |
public cleanup() source
public commitActiveMeasurement() source
public deleteAllMeasurements() source
public destroyActiveMeasurement() source
public drawScene(reason: *, what: {"without": undefined}) source
Params:
Name | Type | Attribute | Description |
reason | * | ||
what | {"without": undefined} |
|
public generateBufferSetToOidsMap(elems: *): * source
This will create a mapping from BufferSetId -> {bufferSet, oids[]} This is useful when we want to do batch updates of BufferSets, instead of randomly updating single objects in BufferSets The order already in elems will stay intact
Params:
Name | Type | Attribute | Description |
elems | * |
Return:
* |
public getPickColor(uniqueId: *): * source
Params:
Name | Type | Attribute | Description |
uniqueId | * |
Return:
* |
public getPickColorForPickId(pickId: *): * source
Params:
Name | Type | Attribute | Description |
pickId | * |
Return:
* |
public getViewObject(uniqueId: *): * source
Params:
Name | Type | Attribute | Description |
uniqueId | * |
Return:
* |
public internalRender(elems: *, t: *) source
Params:
Name | Type | Attribute | Description |
elems | * | ||
t | * |
public loadingDone() source
public moveSectionPlane(params: *) source
Params:
Name | Type | Attribute | Description |
params | * |
public pick(params: *): * source
Attempts to pick an object at the given canvas coordinates.
Params:
Name | Type | Attribute | Description |
params | * | ||
params.canvasPos | Array | Canvas coordinates |
Return:
* | Information about the object that was picked, if any. |
public positionSectionPlaneWidget(params: *) source
Params:
Name | Type | Attribute | Description |
params | * |
public removeSectionPlaneWidget() source
public render(now: *) source
Params:
Name | Type | Attribute | Description |
now | * |
public resetCamera() source
public resetColorAlreadyBatched(elems: *, bufferSetsToUpdate: *): * source
Params:
Name | Type | Attribute | Description |
elems | * | ||
bufferSetsToUpdate | * |
Return:
* |
public resetToDefaultView(modelBounds: *, animate: boolean) source
Params:
Name | Type | Attribute | Description |
modelBounds | * |
|
|
animate | boolean |
|
public resetVisibility() source
public setColor(elems: *, clr: *, fireEvent: boolean): * source
Params:
Name | Type | Attribute | Description |
elems | * | ||
clr | * | ||
fireEvent | boolean |
|
Return:
* |
public setDimensions(width: *, height: *) source
Params:
Name | Type | Attribute | Description |
width | * | ||
height | * |
public setMeasurementPoint(params: *) source
Params:
Name | Type | Attribute | Description |
params | * |
public setModelBounds(modelBounds: *, force: boolean) source
Params:
Name | Type | Attribute | Description |
modelBounds | * | ||
force | boolean |
|
public setSelectionState(elems: *, selected: *, clear: *, fireEvent: boolean): * source
Params:
Name | Type | Attribute | Description |
elems | * | ||
selected | * | ||
clear | * | ||
fireEvent | boolean |
|
Return:
* |
public splitElementsPerRenderLayer(elems: *): * source
Params:
Name | Type | Attribute | Description |
elems | * |
Return:
* |
public updateViewport() source
public viewFit(ids: *, settings: *): * source
Params:
Name | Type | Attribute | Description |
ids | * | ||
settings | * |
Return:
* |