You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Bimplus Renderer version : 0.0.11

Table of Contents

 

DimensionLine

DimensionLine class constructor.

Creates an instance of a 3D dimension line consisting of start and end symbol, connection line and the corresponding dimension label

Parameters

  • symbolTex {Object} Texture object for the start/end symbols
  • symbolTexAllowed
  • symbolTexBlocked
  • deleteButtonTex
  • maxLineWidth

 

updateGeometry

Update the dimension line geometry and labeling

Parameters

  • orthoScene
  • units {Object} unit settings
  • scale {Number} scene dependent scaling factor
  • projector
  • camera
  • scene {Object} scene object

 

updateLabel

Updates the dimension label screen position

Parameters

  • projector {Object} Projector
  • camera {Object} Camera
  • width
  • height

 

setVisible

Set the dimension line visibility

Parameters

  • visible {boolean} visible

 

addToScene

Add the dimension label representations to the given sceene

Parameters

  • scene {Object} scene object
  • orthoScene

 

removeFromScene

Remove the dimension label representations from the given sceene

Parameters

  • scene {Object} scene object
  • orthoScene

 

DimensionLine

NEMETSCHEK BIM Plus Viewer. Base 3D viewport class.

Meta

  • copyright: Copyright NEMETSCHEK AG.

  • author: Alexey Zerkalenkov [a.zerkalenkov@smart-image.eu]

 

updateGeometry

Update the dimension line geometry and labeling

Parameters

  • orthoScene
  • units {Object} unit settings
  • scale {Number} scene dependent scaling factor
  • projector
  • camera
  • scene {Object} scene object

 

updateLabel

Updates the dimension label screen position

Parameters

  • projector {Object} Projector
  • camera {Object} Camera
  • width
  • height

 

setVisible

Set the dimension line visibility

Parameters

  • visible {boolean} visible

 

addToScene

Add the dimension label representations to the given sceene

Parameters

  • scene {Object} scene object
  • orthoScene

 

removeFromScene

Remove the dimension label representations from the given sceene

Parameters

  • scene {Object} scene object
  • orthoScene

 

GPUPicker

Helper class for GPU Picking

Parameters

  • viewport {Object} viewport

 

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

 

updateCursorPosition

Calulates projected cursor position

Parameters

  • projector {Object} projector
  • camera {Object} camera

 

MeshPartSearcher

MeshPartSearcher class constructor.

Creates an instance of the MeshPartSearcher class which encapsulates the functionality for finding faces, edges and vertices of a given mesh at given screen coordiantes

 

Viewport3D

Viewport class constructor. Created as native Javascript class because of local 3D context, which will be lost, if the class instantiated as Ember Object / Controller class. Used in the viewport3d (main view) and object 3d (object details view) classes.

Parameters

  • p {object} set of initialization parameters,

 

normFactor

Normalization factor for recalculating vertices coordinates 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

 

initCamera

Initialize camera

Parameters

  • pars {Object} parameters for camera initialization

 

initControls

Initialize viewport controls.

Parameters

  • c {object} set of controls parameters

 

addAxisHelper

Axis helper. Used for debugging.

Parameters

  • len {Number} length of helper axes
  • pos {Object} position of helper

 

draw

Render viewport if rendering enabled and update statistic in the debug mode.

 

moveDivisionBoundingBox

Move the boundingbox of a given division

Parameters

  • divTopoId {object} division topo node id
  • dx {Number} move x
  • dy {Number} move y
  • dz {Number} move z

 

resetDivisionBoundingBox

Reset the boundingbox of a given division

Parameters

  • divTopoId {object} division topo node id

 

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

 

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

 

getAllSelected3DObjectIdsNodesRevisions

Get list of all selected object ids together with their node id's

Parameters

  • id

Returns any

 

getObjectRevision

Get object revision. Check all three object types: simple object, grouped geometry and clash objects.

Parameters

  • id

Returns any

 

getObjectRGBById

Get RGB of object by id

Parameters

  • id

 

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} object GUID
  • multiselect

 

togglehighlightObjectChildren

togglehighlightObjectChildren

Parameters

  • id {String} object GUID
  • multiselect

 

disposeObjectSet

Dispose object set. Dispose buffer geometry of all object on given set when set must be destroyed or recreated.

Parameters

  • sets {String | Array} set name or array of set names
  • nodeId {String} node id, optional parameter
  • disciplineId {String} discipline id, optional parameter

Returns Viewport3D this viewport 3D class

 

disposePins

Dispose pins. Dispose geometry of all given pins and free memory.

Parameters

  • pins {Array} pins array

 

disposePinObject

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

Parameters

  • object {Object} object object

 

removeObjectFromSet

Remove single object from object set. Dispose object geometry, restore it on node mesh, remove object fron object set and repaint object if needed.

Parameters

  • object {Object} object object
  • set

 

moveObjectToSet

Move object from one to another set. Check if the object is part of grouped geometry. If so, move all related objects to target set.

Parameters

  • object {Object} object object
  • target {String} target set name

Returns Viewport3D this Viewport3D class

 

setSelectionMode

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

  • hidden
  • isolated
  • 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

 

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

 

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.

 

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

 

setSlideScene

Set slide scene. Setup scene according to scene object -- load visible disciplines and topology nodes, set viewport parameters, object sets, camera position, visible disciplines, topology nodes, etc.

Parameters

  • scene {Object} scene object (see description in /cameraspotlistconfig.txt)
  • restoreRotationCenter

Returns any

 

cameraFlyTo

Camera fly action. Make camera movement from current to the target position within 100 ms. Time can be adjusted by setting s (step) parameter.

Parameters

  • p {Object} new camera position
  • t {Object} new target position
  • q {Object} new camera rotation (quaternion)

Returns any

 

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

 

addLights

Add lights to scene.

Parameters

  • lights {object} array of lights parameters

 

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

 

disposeObjects

Dispose objects. Make recursive loop on object tree, remove all children and dispose geometry if exists. If node or discipline id (or both) is / are given, they will be taken into account.

Parameters

  • obj {Object} parent object
  • nodeId {String} node id
  • disciplineId {String} discipline id

 

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

 

displayCollisionElement

Toggle collision element

Parameters

  • id {String} collision element id
  • display

 

displayRevisionCompareElement

Toggle revision compare element

Parameters

  • id {String} revision compare element id
  • display
  • rev2

 

filterRevisionCompareElements

hides all revision compare elements which are not of the given revNr

Parameters

  • objectsIds
  • disciplines
  • revNr {Int} revision number

 

displayRevisionCompareOriginalElements

hides all revision compare elements which are not of the given revNr

Parameters

  • objectsIds
  • display
  • revNr {Int} revision number

 

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

 

showPins

Show pins. Render pins geometries for given pin set and move pin objects to working set.

Parameters

  • pins {Array} array of pins
  • color {hexadecimal} color of pins

Returns Viewport3D Viewport3D class

 

hidePins

Hide pins. Quit visible pins mode, dispose pins geometry.

Returns Viewport3D Viewport3D class

 

getPinObject

Get pin object. Create promise, enable add pin mode -- next mouse click will define object and position on the object, where pin will be placed. The add pin mode will be active, till some object has been selected or mode cancel.

Returns Object get pin object promise

 

cancelAddPin

Cancel add pin. Quit add pin mode. Reject add pin object promise and return to default picking mode.

 

getSlideThumbnail

Get slide thumbnail. Resize viewport to defined thumbnail size, render thumbnail and return url to it.

Returns String url string

 

getSlideParams

Get slide parameters. Collect all current viewport settings and save them in scene parameters object.

Returns Object slide parameters object

 

showRelatedObject

Show related object. Fly camera to the object, referenced by pin.

Parameters

  • pin {Object} pin

Returns Object camera fly promise

 

highlightPin

Highlight pin. Paint pin into active color.

Parameters

  • pin {Object} pin object or pin mesh.

 

updateStats

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

 

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)

 

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
  • No labels