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 symbolssymbolTexAllowed
symbolTexBlocked
deleteButtonTex
maxLineWidth
Update the dimension line geometry and labeling
Parameters
orthoScene
units
{Object} unit settingsscale
{Number} scene dependent scaling factorprojector
camera
scene
{Object} scene object
Updates the dimension label screen position
Parameters
projector
{Object} Projectorcamera
{Object} Camerawidth
height
Set the dimension line visibility
Parameters
visible
{boolean} visible
Add the dimension label representations to the given sceene
Parameters
scene
{Object} scene objectorthoScene
Remove the dimension label representations from the given sceene
Parameters
scene
{Object} scene objectorthoScene
NEMETSCHEK BIM Plus Viewer. Base 3D viewport class.
Meta
copyright: Copyright NEMETSCHEK AG.
author: Alexey Zerkalenkov [a.zerkalenkov@smart-image.eu]
Update the dimension line geometry and labeling
Parameters
orthoScene
units
{Object} unit settingsscale
{Number} scene dependent scaling factorprojector
camera
scene
{Object} scene object
Updates the dimension label screen position
Parameters
projector
{Object} Projectorcamera
{Object} Camerawidth
height
Set the dimension line visibility
Parameters
visible
{boolean} visible
Add the dimension label representations to the given sceene
Parameters
scene
{Object} scene objectorthoScene
Remove the dimension label representations from the given sceene
Parameters
scene
{Object} scene objectorthoScene
Helper class for GPU Picking
Parameters
viewport
{Object} viewport
Pick object using GPU acceleration.
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 highlightmaxLineWidth
cursorTexture
{Object} Texture of the vertex highlighting cursor
Calulates projected cursor position
Parameters
projector
{Object} projectorcamera
{Object} camera
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
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,
Normalization factor for recalculating vertices coordinates to get rid of rendering artifacts
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
Initialize renderer. A part of init() method
Parameters
r
{object} set of render parameters
Initialize camera
Parameters
pars
{Object} parameters for camera initialization
Initialize viewport controls.
Parameters
c
{object} set of controls parameters
Axis helper. Used for debugging.
Parameters
len
{Number} length of helper axespos
{Object} position of helper
Render viewport if rendering enabled and update statistic in the debug mode.
Move the boundingbox of a given division
Parameters
divTopoId
{object} division topo node iddx
{Number} move xdy
{Number} move ydz
{Number} move z
Reset the boundingbox of a given division
Parameters
divTopoId
{object} division topo node id
show the boundingbox of a given division
Parameters
divTopoId
{object} division topo node id
hide the boundingbox of a given division
Parameters
divTopoId
{object} division topo node id
Set visibilty for given divisions and adjust scene viewbox accordingly
Parameters
divTopoId
{object} division topo node idvisible
{Boolean} division visibleallowRecalc
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
Get list of all selected object ids
Parameters
id
Returns any
Get list of all selected object ids together with their node id's
Parameters
id
Returns any
Get object revision. Check all three object types: simple object, grouped geometry and clash objects.
Parameters
id
Returns any
Get RGB of object by id
Parameters
id
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 GUIDmultiselect
togglehighlightObjectChildren
Parameters
id
{String} object GUIDmultiselect
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 namesnodeId
{String} node id, optional parameterdisciplineId
{String} discipline id, optional parameterReturns Viewport3D this viewport 3D class
Dispose pins. Dispose geometry of all given pins and free memory.
Parameters
pins
{Array} pins array
Dispose single pin object. Used in pinListController to remove particular pin object from isolated set.
Parameters
object
{Object} object object
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 objectset
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 objecttarget
{String} target set nameReturns Viewport3D this Viewport3D class
Set selection mode. Set selection mode array according to viewport settings:
Parameters
mode
{String} selection mode nameReturns Viewport3D Viewport3D class
Unset selection mode. Unset particular selection mode and prepare environments to updated mode.
Parameters
mode
{String} mode nameReturns Viewport3D Viewport3D class
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
Check selection mode. Check if selection mode present in the modes array.
Parameters
mode
{String} name of selection modestrict
{Boolean} strict check, if selection mode exactly match to givenReturns boolean
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'
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'
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.
Reset viewport. Dispose model and reset viewport setting to default. Used when new model must be loaded.
Restore viewbox. Restore viewbox size to saved size and reinitialize camera.
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 appliedvb
{Object} bounding box
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
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 positiont
{Object} new target positionq
{Object} new camera rotation (quaternion)Returns any
Set controls target (rotation center) to object's center.
Parameters
oid
{String} object idfly
{Boolean} if transition must be done softly
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
Add lights to scene.
Parameters
lights
{object} array of lights parameters
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 restoredignoreVisibility
Returns Viewport3D reference to Viewport3D class instance
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 objectnodeId
{String} node iddisciplineId
{String} discipline id
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
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
Toggle collision element
Parameters
id
{String} collision element iddisplay
Toggle revision compare element
Parameters
id
{String} revision compare element iddisplay
rev2
hides all revision compare elements which are not of the given revNr
Parameters
objectsIds
disciplines
revNr
{Int} revision number
hides all revision compare elements which are not of the given revNr
Parameters
objectsIds
display
revNr
{Int} revision number
Set discipline opacity. Check if node exists and set its transparency to given or default value.
Parameters
discipline
{Object} discipline objectopacity
{Number} number 0..1
Show pins. Render pins geometries for given pin set and move pin objects to working set.
Parameters
pins
{Array} array of pinscolor
{hexadecimal} color of pinsReturns Viewport3D Viewport3D class
Hide pins. Quit visible pins mode, dispose pins geometry.
Returns Viewport3D Viewport3D class
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
Cancel add pin. Quit add pin mode. Reject add pin object promise and return to default picking mode.
Get slide thumbnail. Resize viewport to defined thumbnail size, render thumbnail and return url to it.
Returns String url string
Get slide parameters. Collect all current viewport settings and save them in scene parameters object.
Returns Object slide parameters object
Show related object. Fly camera to the object, referenced by pin.
Parameters
pin
{Object} pinReturns Object camera fly promise
Highlight pin. Paint pin into active color.
Parameters
pin
{Object} pin object or pin mesh.
Update status info widow. Show debug information in the debug window if debug mode active.
Define Viewport3D prototype and common properties and methods for all instances.
Measure interactor, used to create dimension lines
Parameters
vp
{Object} Viewport
Base class for user interactions with scene
Parameters
vp
{Object} Viewport
Meta
Parameters
object
domElement
localElement
Meta
released under MIT License (MIT)
Calculates the projection of 3D point onto the near plane in NDC coordinates
Parameters
pos
{Object} 3D Pointprojector
{Object} Projectorcamera
{Number} Camera