Bimplus Renderer version : 0.4.8

Table of Contents


ClashObject

Clash Object constructor. This object is managing a concrete Clash with all its connected clash geometry


clashElements

List of the related clash elements which bear the actual geometry


status

Status of the clash


volume

Clash volume


createVisualObjects

Create the visual objects for the clash Object

Parameters


id

Id of the clash object.


clashingObjects

Array of two objects which causes the clash


clashFilter

Clash Filter Type


ContentLoader

Utility class to do the actual loading from the server.

Parameters

  • api Object Instance of the WebSdk Api wrapper. Used to make the http requests
  • viewport Viewport3D Instance of the viewport where the data should be loaded to


api

Reference to WebSDK Api wrapper


viewport

Reference to the viewport instance to load into


errorHandler

Error handler callback


canceled

Cancel flag - set if request has been canceled


resetState

Reset all loader states


loadProject

Load the given project. Only basic project information is loaded. Geometry has to be loaded via LoadModel or LoadTopologyNode

Parameters

  • projectId String Id of the project to load


loadModel

Load Project Model

Parameters


loadModelLayers

Load a set of layers for all models of the project

Parameters


loadNavigationMap

Load content into the navigation map

Parameters

  • projectId
  • modelRevisions
  • visibleLayers Array<String> Array of layers which shall be loaded
  • visibleTypes Array<String> Array of object types which should be shown
  • project ProjectContent Parent project


loadClashes

Load clashes for the given project

Parameters


loadTopologyNode

Load geometry and all necessary information for a given

Parameters

  • project ProjectContent Project
  • node ProjectTopologyNode Topology leaf node
  • layers Array<ProjectLayer> Array of layers
  • loadTemplates Boolean Load required templates from server on/off (optional, default true)
  • loadObjectTree Boolean Load node's obejct tree on/off (optional, default true)
  • objectsFilter Boolean Additional filter to remove objects (optional, default undefined)
  • objectTreeFilter (optional, default undefined)


loadObject

This is used to load all data including geometry into an ObjectContent instance. This is used for the preview rendering in the properties panel.

Parameters

  • objectId String Object Id
  • revNr Number Revision number (optional, default 1)
  • checkClashVisibilityCallback Function Callback to calculate the clash elements visibility defined in the clash module


checkModelModified

Makes head request to server to check if models have been modified

Parameters


checkModelsModified

Makes head requests to server to check if models have been modified

Parameters


checkAndRefreshProject

Checks if models have been modified and reloads all required information if necessary

Parameters


reloadClashesFromFilter

Reload clash elements including the geometry based on the clash filter response

Parameters


reloadClashes

Reload all project clashes

Parameters


reloadRevisionCompareObjects

Reload revision compare elements of the given model

Parameters


cancel

Cancel the loading process


pickObject

Pick object using GPU acceleration.


Highlight

Highlight class constructor.

Creates an instance of the highlight class which encapsulates the highlighting for vertices, faces and edges

Parameters

  • activeObjColor {Object} Color of the highlight
  • maxLineWidth
  • cursorTexture {Object} Texture of the vertex highlighting cursor


Highlight

The Allplan Bimplus renderer provides easy to use loading and rendering of Bimplus project data. It has been tuned to be able to load and display large models. This is also the renderer core used for the Bim Explorer and is also available for external app development.


isInternalLayer

Checks if a layer is in the set of internal layers

Parameters


NavigationMap

NavigationMap constructor.

Parameters

  • settings
  • api
  • domElementId


ObjectContent

Parameters


parseObjectTopologyResponse

Parse the API response of the object topology

Parameters


ObjectFactory

Factory class for the various types of objects


createVisualObject

Create a VisualObject instance

Parameters

  • params Object Creation parameters


createClashObject

Create a ClashObject instance

Parameters

  • params Object Creation parameters


createRevisionCompareObject

Create a RevisionCompareObject instance

Parameters

  • params Object Creation parameters


ObjectsContainer

Container to store the actual project objects


reset

Reset the container content


initObjects

Init all objects for the given viewport

Parameters


addObject

Add a VisualObject instance to the container

Parameters


removeObject

Remove a VisualObject instance from the container For performance reasons it is possible to set the deferredRemoval flag. This speeds up the oparation a lot but an after removing all objects a call to deferredRemoveObjects has to be made.

Parameters

  • obj VisualObject Object to remove
  • removeChildlessParent Boolean Remove also parent if object is the last child (optional, default true)
  • removeChildren Boolean Remove all children from the container (optional, default false)
  • deferredRemoval Boolean If this flag is set, the obejcts won't be removed from the array but substituted with null (optional, default false)


removeObjects

Removes an array of objects from the container

Parameters

  • objects Array<VisualObject> Array of objects to remove
  • removeChildlessParent Boolean Remove also parent if object is the last child (optional, default true)


deferredRemoveObjects

Remove all null values from the objects array - this is the preprocessing step after removeObject with deferredRemoval enabled


getObjectCount

Returns the count of VisualObject instances inside the container


getObject

Get the Object with the given Id

Parameters


getObjects

Get the objects with the given ids

Parameters


forEachObject

Loop through all contained objects and call the given function

Parameters

  • func Function Function to execute for each object
  • skipVirtualObjects Boolean Flag to ignore virtual objects in the loop (optional, default true)


getObjectAt

Get the object at the given index

Parameters


getObjectRoot

Get the root object

Parameters


getObjectParent

Get the parent object

Parameters


bubbleUp

Traverse the object tree upwards and call the function for every instace

Parameters


traverseDown

Traverse the object tree downwards and call the function for every instace

Parameters


getObjectsArray

Get the objects array


objectLoop

Run a callback function on all objects and the corresponding children

Parameters

Meta

  • deprecated: This is deprecated.


findSubsetIdsObjects

Get all objects associated with the object with the given id

Parameters

  • objectId String Source object id

Meta

  • deprecated: This is deprecated.


addClashObject

Add a ClashObject instance to the container

Parameters


getClashObject

Get the ClashObject instance with the given id

Parameters


getClashObjectCount

Get the number of ClashObjects


removeClashObject

Remvoe a ClashObject instance from the container

Parameters


clearClashObjects

Remove all ClashObject instances


forEachClashObject

Loop through all ClashObjects and run the function

Parameters


addRevisionCompareObject

Add a RevisisonCompareObject to the container

Parameters


clearRevisionCompareObjects

Remove all RevisionCompareObject instances


getRevisionCompareObject

Get the RevisionCompareObject with the given id

Parameters


forEachRevisionCompareObject

Loop through all RevisionCompareObjects and run the function

Parameters


ProjectContent

Root class for all project related data

Parameters


addModel

Add a ProjectModel instance to the project

Parameters


getModel

Get the model with the given id

Parameters


getModels

Get all models of the project


findModel

Find a specific model based on the filter function

Parameters


forEachModel

Run function for each project model

Parameters


getTopologyLeafNode

Get the topology leaf node with the given id

Parameters


forEachTopologyLeafNode

Run function for each topology leaf node

Parameters


parseProjectDetailsResponse

Parst the response from the project API

Parameters


disposeClashObjectsByFilter

Dispose all clash objects belonging to a certain filter

Parameters

  • filterId String Clash filter id


disposeObjects

Dispose all objects of the given layer

Parameters

  • layerId String Layer id to dispose


disposeLayerGeometry

Dispose geometry of the given layer

Parameters


disposeClashObjects

Dispose all clash object


disposeRevisionCompareObjects

Dispose all revision compare objects


parseClashFilterResponse

Parse the repsonse of the clash filter API

Parameters


parseRevisionCompareResultResponse

Parse the result of the revision comparision API

Parameters


parseProjectTopologyResponse

Parse the response of the project topology API

Parameters


parseObjectTopologyResponse

Parse the response of the object topology API

Parameters

  • r Object Response
  • revision Number Active revision
  • objectFilter


parseGeometryTemplateChunks

Parse the response of the geometry template API

Parameters

  • disciplineId String Id of the layer
  • chunks Array Chunked response


unloadNode

Unload the the given topology node's geometry for the given discipline and revision

Parameters


unloadModel

Unload all nodes and objects of a given model of the given revision

Parameters

  • model ProjectModel Model to unload
  • revNr Numer Revision number
  • onlyObjects Boolean unload only the objects without clearing the model data


getDisciplineNode

Get the discipline geometry node for the layer

Parameters


ProjectLayer

Parameters


getProject

Get the parent project


getModel

Get the parent model


setModel

Set the parent modal

Parameters


isInternal

Checks if the layer is marked as internal


asLegacyDiscipline

Converion function to support old data input

Meta

  • deprecated: This is deprecated.


getDisciplineNodes

Get the layers discipline nodes


setBackground

Set the layer to be in background

Parameters

  • value Boolean Background true/false


isBackground

Check if the layer is currently set to background


setVisible

Set layer visiblity

Parameters


isVisible

Checks if the layer is visible


setUserColor

Set the layer to be shown in a custom color - if value is no color the object colors are restored

Parameters


getUserColor

Get the currently set user color


setUserOpacity

Set the custom opacity for the layer. Pass undefined to reset to object opacity.

Parameters

  • value Number Opacity between 0.0 (fullt transparent) and 1.0 (fully opaque)


getUserOpacity

Get the current custom layer opacity


ProjectModel

ProjectModel class represents a model inside a project

Parameters


getProject

Get parent project


addLayer

Add layer to the model

Parameters


getLayer

Get the layer with the given id

Parameters


getClashLayer

Get the clash layer of the model


getRevisionCompareLayer

Get the model's revision compare layer


getLayerArray

Get the array of layers


forEachLayer

Loop through each layer and run given function

Parameters


setCurrentRevision

Set the currently active revision for the model

Parameters


getCurrentRevision

Get the currently active revision


hasRevisions

Check if model has revisions


addTopologyLeafNode

Add a topology leaf node to the model

Parameters


getTopologyLeafNodes

Get all attached topology leaf nodes


getTopologyLeafNode

Get the topology leaf node

Parameters


forEachTopologyLeafNode

Loop through all attached topology leaf nodes and call the given function

Parameters

  • func Function Function to run on each node


parseProjectTopologySubTree

Parse the project topology subtree

Parameters


clear

Clear the model data


setVisible

Set model visibility

Parameters


ProjectTopologyNode

Class Represents a leaf node of the topology tree

Parameters


isLayerGeometryLoaded

Checks if given layer has geometry loaded or not

Parameters


setLayerGeometryLoaded

Set or reset the geometry loaded flag for the given layer

Parameters


setVisible

Set the node's visiblity

Parameters

  • value Boolean Node visisble true/false


isVisible

Checks if the node is currently visible


setLayerVisible

Set a given layer's visibility for the current node

Parameters


isLayerVisible

Checks if the layer of the node is visisble

Parameters


getGeometryNode

Get the node's corresponding geomtry node


getDisciplineNode

Get the node's corresponding discipline node

Parameters


disposeLayerGeometry

Dispose the layer geometry for the node

Parameters


getModel

Get the node's parent model


setLayerUserColor

Set layer user color - use null to reset it

Parameters


getLayerUserColor

Get layer user color - returns null if no user color is set

Parameters


setLayerUserOpacity

Set layer user opacity - use null to reset it

Parameters

  • layer ProjectLayer Layer for which to set the user opycity
  • value Array Opacity value (0..1)


getLayerUserOpacity

Get layer user opacity - returns null if no user opacity is set

Parameters


RevisionCompareObject

This class represents the Revision comparison object which holds the information of the actual compared objects


Viewport3D

Viewport class constructor.

Parameters

  • p {object} set of initialization parameters,


normFactor

Normalization factor to scale down the project to an appropriate size to get rid of rendering artifacts


minmaxbox

Bounding box of the drawing. {x, y, z} -- center point of the box (camera look at) {w, d, h} -- width, depth and height of the box


initRenderer

Initialize renderer. A part of init() method

Parameters

  • r {object} set of render parameters


dispose

Dispose the viewport and all loaded content


setContent

Set the Viewport content

Parameters


isMultiselectActive

Check if multiselection is active (ctrl pressed)


showDivisionBoundingBox

show the boundingbox of a given division

Parameters

  • divTopoId {object} division topo node id


hideDivisionBoundingBox

hide the boundingbox of a given division

Parameters

  • divTopoId {object} division topo node id


setDivisionVisible

Set visibilty for given divisions and adjust scene viewbox accordingly

Parameters

  • divTopoId {object} division topo node id
  • visible {Boolean} division visible
  • allowRecalc


centerBoundingSphere

Move the camera to zoom to the given sphere

Parameters

  • boundingSphere Object Bounding sphere


calcObjectsBoundingbox

Calculate the overall bounding box of a list of objects

Parameters


centerObjects

Adjust camera position to fit all objects in the view frustum

Parameters


clipObjects

Create clippingbox around the selected objects or the working objects

Parameters

  • ignoreSelection Boolean True : Take the working set objects, false : Take the selection set (optional, default false)


isolateObjects

Isolate the objects and put the other ones in the background

Parameters


addObjectsToWorkingSet

Add the objects to the working set

Parameters


removeObjectsFromWorkingSet

Remove the objects from the working set

Parameters


addObjectsToSelectedSet

Add the objects to the selected set

Parameters


addObjectsToHiddenSet

Add the objects to the hidden set

Parameters


addObjectsToColoredSet

Add the objects to the colored set and set paint it in the given custom color

Parameters


disposeIsolatedSet

Dispose the isolated set


makeIsolatedSet

Make isolated set from the objects in the working set


restoreSelectedObjects

Restore selection color based on the objects in the selected set


hideIsolateObjects

Hide the objects which are not in the working or selected set


resetHideIsolateObjects

Reset hidden isolate mode


hideObjects

Hides the objects with the given ids

Parameters


getSelected3DObjectId

Get id of 3D object currently selected in the viewport. Check all three object types: simple object, grouped geometry and clash objects.

Returns String id object id


getAllSelected3DObjectIds

Get list of all selected object ids

Parameters

  • id

Returns any


getObjectRevision

Get object revision.

Parameters

  • id Object id

Returns any


highlightObject

Highlight object by id. Used in object navigator and in object details view for highlighting object in 3D viewport when respective object selected in the topology or in the grid.

Parameters

  • id String Id of the object
  • multiselect Boolean Flag to use multiselect (Ctrl)
  • skipBubbleUp Boolean Flag to forward selection to parent or not


highlightObjects

Highlight objects by id. Used in object navigator and in object details view for highlighting object in 3D viewport when respective object selected in the topology or in the grid.

Parameters

  • ids Array<String> Ids of the objects
  • multiselect Boolean Flag to use multiselect (Ctrl)
  • skipBubbleUp Boolean Flag to forward selection to parent or not


disposePinObject

Dispose single pin object. Used in pinListController to remove particular pin object from isolated set.

Parameters

  • object {Object} object object


subscribeToSelectionModeChanges

callback which is called everytime the selection mode has been changed

Parameters

  • handler


setSelectionMode

Set selection mode. Set selection mode array according to viewport settings:

  • hidden
  • isolated
  • hideIsolated
  • clipIsolated
  • section
  • add pin Prepare environment for defined object selection. Modes can be combined. Object selection will work according to current set of selection modes.

Parameters

  • mode {String} selection mode name

Returns Viewport3D Viewport3D class


unsetSelectionMode

Unset selection mode. Unset particular selection mode and prepare environments to updated mode.

Parameters

  • mode {String} mode name

Returns Viewport3D Viewport3D class


setIsolationMode

Switch isolation mode on


resetIsolationMode

Switch isolation mode off


makeColoredSet

Create colored object set out of the given objects

Parameters


resetSelectionMode

Reset selection mode. Reset selection, dispose isolated mesh, remove sectioning and selection, show hidden objects and reset selection mode to default.

Returns Viewport3D Viewport3D class


checkSelectionMode

Check selection mode. Check if selection mode present in the modes array.

Parameters

  • mode {String} name of selection mode
  • strict {Boolean} strict check, if selection mode exactly match to given

Returns boolean


getRotationCenter

Get the current rotation center


setRotationCenter

Set the current rotation center

Parameters

  • c THREE.Vector3 center


setCameraResetAxis

Set camera reset axis. Set axis, which will be used on camera reset. Used to show different model views like front, top, side, perspective.

Parameters

  • a {String} axis, i.e. 'x', 'y', 'z'


setSectionAxis

Set section axis. Set axis (x, y, z) which will be used in section view, recreate visible section plane object, update environment variables.

Parameters

  • a {String} axis, i.e. 'x', 'y', 'z'


setViewportSize

Set viewport size. Reset viewport size according to the container size. Used when any viewport size updates are made, f. e. on main window resize or DOM layout change. If width or height are not passed explicitly the innerWidth or height is taken from the viewport's domElement

Parameters


resetViewport

Reset viewport. Dispose model and reset viewport setting to default. Used when new model must be loaded.


restoreViewbox

Restore viewbox. Restore viewbox size to saved size and reinitialize camera.


resetCamera

Reset camera. Recalculate scene and camera parameters and set them according to default or given model bounding box, make camera fly effect to defined position.

Parameters

  • fly {Boolean} if fly effect should be applied
  • vb {Object} bounding box


setTargetToObject

Set controls target (rotation center) to object's center.

Parameters

  • oid {String} object id
  • fly {Boolean} if transition must be done softly


calculateBoundingBox

Calculate bounding box of the object. Applied to simple object (one geometry) and complex geometry with cjild / related -- including all children objects.

Parameters

  • oid {String} object id


toggleDisciplinesOpacity

Toggle disciplines opacity. Make all disciplines transparent or restore initial discipline opacity. Used in isolated mode.

Parameters

  • restore {Boolean} if initial discipline opacity must be restored
  • ignoreVisibility

Returns Viewport3D reference to Viewport3D class instance


toggleObjectNode

Toggle object node (visibility). Used in object details view. Make all node children visible / invisible according to parent visibility.

Parameters

  • node {Object} object node object


toggleObjectNodeOpacity

Toggle object node (opacity). Used in object details view. Make all node children visible / invisible according to parent visibility.

Parameters

  • node {Object} object node object


setDisciplineOpacity

Set discipline opacity. Check if node exists and set its transparency to given or default value.

Parameters

  • discipline {Object} discipline object
  • opacity {Number} number 0..1


updateStats

Update status info widow. Show debug information in the debug window if debug mode active.


setLocalizationFnc

set function used for text localization

Parameters

  • locFnc


prototype

Define Viewport3D prototype and common properties and methods for all instances.


MeasureInteractor

Measure interactor, used to create dimension lines

Parameters

  • vp {Object} Viewport


ViewportInteractor

Base class for user interactions with scene

Parameters

  • vp {Object} Viewport


RenderableObject

Meta

  • author: julianwa / https://github.com/julianwa


OrbitControls

Parameters

  • object
  • domElement
  • localElement

Meta

  • author: mrflix / http://felixniklas.de



released under MIT License (MIT)


LegacyJSONLoader

Meta

  • author: alteredq / http://alteredqualia.com/


calcNDCScreenPos

Calculates the projection of 3D point onto the near plane in NDC coordinates

Parameters

  • pos {Object} 3D Point
  • projector {Object} Projector
  • camera {Number} Camera


ViewportContent

Base class for viewport content

Parameters


VisualObject

This is the class representing an object in the view


init

Initialize the object

Parameters

  • viewport Viewport3D Viewport
  • index Number Index of the object inside the ObjectsContainer


clone

Shallow clone the object


setFromVisualObject

Copy object data from another instance

Parameters


addRelation

Add a relation the object

Parameters


hasRelation

Check if object has a relation

Parameters


getRelations

Get all relations with given name

Parameters


addChild

Add object as child to this object

Parameters


removeChild

Remove a child object from this object

Parameters


addChildGeometry

Add object as child geometry to this object

Parameters


removeChildGeometry

Remove a child geometry object from this object

Parameters


isDisciplineNodeVisible

Checks if the object's discipline node is visible

Parameters

  • viewport


getDisciplineNode

Get the corresponding discipline node

Parameters


getDisciplineNodeMesh

Get the corresponding discipline node mesh

Parameters


getMesh

Get the corresponding mesh

Parameters


getMeshGeometry

Get the mesh geometry

Parameters


getVertexAttributeArray

Get a vertex attribute data array

Parameters


getPositionArray

Get the vertex positions array

Parameters


setVertexAttributeArray

Set the vertex attribute to given values

Parameters


getNumberOfFaces

Get the number of triangles


getStartIndex

Get the object's start index


hide

Hide the object

Parameters


show

Show the object

Parameters


setIsolation

Set isolation mode on or off for this object

Parameters


getIsolation

Get isolatation flag

Parameters


setForceObjectColor

Set the force object color flag. If set, object won't be affected by any color changes. Its always drawn in object color.

Parameters


getForceObjectColor

Get force object color flag

Parameters


setBackground

Set object background flag

Parameters


getBackground

Get the object background flag

Parameters


resetObjectFlags

Reset all object flags

Parameters


paint

Paint the object in the given color or reset to original color by passing no color value

Parameters


setPaintColor

Set the object's color to a custom one

Parameters


resetPaintColor

Reset the custom color to the object's original color

Parameters


hasOwnGeometry

Check if this objects has own geometry


getBoundingBox

Get the object's bounding box

  • No labels