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 |
animationListeners: *[] |
|
| public |
|
|
| public |
camera: * |
|
| public |
|
|
| public |
|
|
| public |
canvas: * |
|
| public |
colorRestore: *[] |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
gl: * |
|
| public |
height: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
lighting: * |
|
| public |
modelBounds: * |
|
| public |
oitBuffer: * |
|
| public |
|
|
| public |
overlay: * |
|
| public |
pickBuffer: * |
|
| public |
|
|
| public |
pickIdToViewObject: *[] |
|
| public |
|
|
| public |
quad: * |
|
| public |
quad2: * |
|
| public |
renderLayers: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
selectionListeners: *[] |
|
| public |
settings: * |
|
| public |
stats: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
viewObjects: * |
|
| public |
|
|
| public |
width: * |
|
Method Summary
| Public Methods | ||
| public |
addAnimationListener(fn: *) |
|
| public |
addSelectionListener(selectionListener: *) |
|
| public |
addViewObject(objectId: *, viewObject: *) |
|
| public |
callByType(method: *, types: *, args: ...*): * |
|
| public |
cleanup() |
|
| public |
drawScene(buffers: *, deltaTime: *) |
|
| 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 |
getPickColor(objectId: *): * |
|
| public |
getSelected(): * |
|
| public |
getViewObject(objectId: *): * |
|
| public |
init(): * |
|
| public |
|
|
| public |
pick(params: *): * Attempts to pick an object at the given canvas coordinates. |
|
| public |
render(now: *) |
|
| public |
|
|
| public |
resetColor(elems: *): * |
|
| public |
resetColorAlreadyBatched(elems: *, bufferSetsToUpdate: *): * |
|
| public |
resetColors(): * |
|
| public |
|
|
| public |
setColor(elems: *, clr: *): * |
|
| public |
setDimensions(width: *, height: *) |
|
| public |
setModelBounds(modelBounds: *) |
|
| public |
setSelectionState(elems: *, selected: *, clear: *): * |
|
| public |
setVisibility(elems: *, visible: *): * |
|
| public |
startSectionPlane(params: *) |
|
| public |
|
|
| public |
viewFit(ids: *): * |
|
Public Constructors
public constructor() source
Public Members
public animationListeners: *[] source
public bufferSetPool: * source
public camera: * source
public cameraControl: * source
public canvas: * source
public colorRestore: *[] source
public defaultColors: * source
public geometryIdToBufferSet: * source
public gl: * source
public height: * source
public hiddenDueToSetColor: * source
public instancesWithChangedColor: * source
public invisibleElements: * 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 quad2: * source
public renderLayers: * source
public sectionPlaneValues: * source
public sectionPlaneValues2: * source
public sectionPlaneValuesDisabled: * source
public selectedElements: * source
public selectionListeners: *[] source
public settings: * source
public stats: * source
public useOrderIndependentTransparency: * source
public viewObjects: * source
public viewObjectsByType: * source
public width: * source
Public Methods
public addAnimationListener(fn: *) source
Params:
| Name | Type | Attribute | Description |
| fn | * |
public addSelectionListener(selectionListener: *) source
Params:
| Name | Type | Attribute | Description |
| selectionListener | * |
public addViewObject(objectId: *, viewObject: *) source
Params:
| Name | Type | Attribute | Description |
| objectId | * | ||
| viewObject | * |
public callByType(method: *, types: *, args: ...*): * source
Params:
| Name | Type | Attribute | Description |
| method | * | ||
| types | * | ||
| args | ...* |
Return:
| * |
public cleanup() source
public drawScene(buffers: *, deltaTime: *) source
Params:
| Name | Type | Attribute | Description |
| buffers | * | ||
| deltaTime | * |
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(objectId: *): * source
Params:
| Name | Type | Attribute | Description |
| objectId | * |
Return:
| * |
public getViewObject(objectId: *): * source
Params:
| Name | Type | Attribute | Description |
| objectId | * |
Return:
| * |
public loadingDone() source
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 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 resetVisibility() source
public setColor(elems: *, clr: *): * source
Params:
| Name | Type | Attribute | Description |
| elems | * | ||
| clr | * |
Return:
| * |
public setDimensions(width: *, height: *) source
Params:
| Name | Type | Attribute | Description |
| width | * | ||
| height | * |
public setModelBounds(modelBounds: *) source
Params:
| Name | Type | Attribute | Description |
| modelBounds | * |
public setSelectionState(elems: *, selected: *, clear: *): * source
Params:
| Name | Type | Attribute | Description |
| elems | * | ||
| selected | * | ||
| clear | * |
Return:
| * |
public setVisibility(elems: *, visible: *): * source
Params:
| Name | Type | Attribute | Description |
| elems | * | ||
| visible | * |
Return:
| * |
public startSectionPlane(params: *) source
Params:
| Name | Type | Attribute | Description |
| params | * |
