Bimplus Renderer version : 0.4.8
Table of Contents
- ClashObject
- id
- clashingObjects
- clashFilter
- ContentLoader
- pickObject
- Highlight
- Highlight
- isInternalLayer
- NavigationMap
- ObjectContent
- ObjectFactory
- ObjectsContainer
- reset
- initObjects
- addObject
- removeObject
- removeObjects
- deferredRemoveObjects
- getObjectCount
- getObject
- getObjects
- forEachObject
- getObjectAt
- getObjectRoot
- getObjectParent
- bubbleUp
- traverseDown
- getObjectsArray
- objectLoop
- findSubsetIdsObjects
- addClashObject
- getClashObject
- getClashObjectCount
- removeClashObject
- clearClashObjects
- forEachClashObject
- addRevisionCompareObject
- clearRevisionCompareObjects
- getRevisionCompareObject
- forEachRevisionCompareObject
- ProjectContent
- addModel
- getModel
- getModels
- findModel
- forEachModel
- getTopologyLeafNode
- forEachTopologyLeafNode
- parseProjectDetailsResponse
- disposeClashObjectsByFilter
- disposeObjects
- disposeLayerGeometry
- disposeClashObjects
- disposeRevisionCompareObjects
- parseClashFilterResponse
- parseRevisionCompareResultResponse
- parseProjectTopologyResponse
- parseObjectTopologyResponse
- parseGeometryTemplateChunks
- unloadNode
- unloadModel
- getDisciplineNode
- ProjectLayer
- ProjectModel
- ProjectTopologyNode
- RevisionCompareObject
- Viewport3D
- normFactor
- minmaxbox
- initRenderer
- dispose
- setContent
- isMultiselectActive
- showDivisionBoundingBox
- hideDivisionBoundingBox
- setDivisionVisible
- centerBoundingSphere
- calcObjectsBoundingbox
- centerObjects
- clipObjects
- isolateObjects
- addObjectsToWorkingSet
- removeObjectsFromWorkingSet
- addObjectsToSelectedSet
- addObjectsToHiddenSet
- addObjectsToColoredSet
- disposeIsolatedSet
- makeIsolatedSet
- restoreSelectedObjects
- hideIsolateObjects
- resetHideIsolateObjects
- hideObjects
- getSelected3DObjectId
- getAllSelected3DObjectIds
- getObjectRevision
- highlightObject
- highlightObjects
- disposePinObject
- subscribeToSelectionModeChanges
- setSelectionMode
- unsetSelectionMode
- setIsolationMode
- resetIsolationMode
- makeColoredSet
- resetSelectionMode
- checkSelectionMode
- getRotationCenter
- setRotationCenter
- setCameraResetAxis
- setSectionAxis
- setViewportSize
- resetViewport
- restoreViewbox
- resetCamera
- setTargetToObject
- calculateBoundingBox
- toggleDisciplinesOpacity
- toggleObjectNode
- toggleObjectNodeOpacity
- setDisciplineOpacity
- updateStats
- setLocalizationFnc
- prototype
- MeasureInteractor
- ViewportInteractor
- RenderableObject
- OrbitControls
- LegacyJSONLoader
- calcNDCScreenPos
- ViewportContent
- VisualObject
- init
- clone
- setFromVisualObject
- addRelation
- hasRelation
- getRelations
- addChild
- removeChild
- addChildGeometry
- removeChildGeometry
- isDisciplineNodeVisible
- getDisciplineNode
- getDisciplineNodeMesh
- getMesh
- getMeshGeometry
- getVertexAttributeArray
- getPositionArray
- setVertexAttributeArray
- getNumberOfFaces
- getStartIndex
- hide
- show
- setIsolation
- getIsolation
- setForceObjectColor
- getForceObjectColor
- setBackground
- getBackground
- resetObjectFlags
- paint
- setPaintColor
- resetPaintColor
- hasOwnGeometry
- getBoundingBox
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
objectsContainer
ObjectsContainer Container for created elementsobjectFactory
ObjectFactory Object Factory
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 requestsviewport
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
project
ProjectContent Parent projectmodel
ProjectModel Model to loadlayers
Array<ProjectLayer> Array of layers which shall be loaded
loadModelLayers
Load a set of layers for all models of the project
Parameters
project
ProjectContent Parent projectlayers
Array<ProjectLayer> Array of layers which shall be loaded
loadNavigationMap
Load content into the navigation map
Parameters
projectId
modelRevisions
visibleLayers
Array<String> Array of layers which shall be loadedvisibleTypes
Array<String> Array of object types which should be shownproject
ProjectContent Parent project
loadClashes
Load clashes for the given project
Parameters
project
ProjectContent Project
loadTopologyNode
Load geometry and all necessary information for a given
Parameters
project
ProjectContent Projectnode
ProjectTopologyNode Topology leaf nodelayers
Array<ProjectLayer> Array of layersloadTemplates
Boolean Load required templates from server on/off (optional, defaulttrue
)loadObjectTree
Boolean Load node's obejct tree on/off (optional, defaulttrue
)objectsFilter
Boolean Additional filter to remove objects (optional, defaultundefined
)objectTreeFilter
(optional, defaultundefined
)
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 IdrevNr
Number Revision number (optional, default1
)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
model
ProjectModel Model to check for modification
checkModelsModified
Makes head requests to server to check if models have been modified
Parameters
models
Array<ProjectModel> Array of models to check for mofication
checkAndRefreshProject
Checks if models have been modified and reloads all required information if necessary
Parameters
project
ProjectContent Projectmodels
Array<ProjectModel> Array of models
reloadClashesFromFilter
Reload clash elements including the geometry based on the clash filter response
Parameters
project
ProjectContent ProjectfilterId
String Id of the clash filterfilterResponse
Object Response of the clash filter API
reloadClashes
Reload all project clashes
Parameters
project
ProjectContent
reloadRevisionCompareObjects
Reload revision compare elements of the given model
Parameters
project
ProjectContent Projectmodel
ProjectModel Model
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 highlightmaxLineWidth
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
id
String Layer Id
NavigationMap
NavigationMap constructor.
Parameters
settings
api
domElementId
ObjectContent
Parameters
viewport
Viewport3D Viewport instance
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
viewport
Viewport3D Viewport
addObject
Add a VisualObject instance to the container
Parameters
vObj
VisualObject Instance to add
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 removeremoveChildlessParent
Boolean Remove also parent if object is the last child (optional, defaulttrue
)removeChildren
Boolean Remove all children from the container (optional, defaultfalse
)deferredRemoval
Boolean If this flag is set, the obejcts won't be removed from the array but substituted with null (optional, defaultfalse
)
removeObjects
Removes an array of objects from the container
Parameters
objects
Array<VisualObject> Array of objects to removeremoveChildlessParent
Boolean Remove also parent if object is the last child (optional, defaulttrue
)
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
id
String Object Id
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 objectskipVirtualObjects
Boolean Flag to ignore virtual objects in the loop (optional, defaulttrue
)
getObjectAt
Get the object at the given index
Parameters
index
Number
getObjectRoot
Get the root object
Parameters
vObj
VisualObject Source objects
getObjectParent
Get the parent object
Parameters
vObj
VisualObject Source object
bubbleUp
Traverse the object tree upwards and call the function for every instace
Parameters
obj
VisualObject Start objectfunc
Function Function to execute
traverseDown
Traverse the object tree downwards and call the function for every instace
Parameters
obj
VisualObject Start objectfunc
Function Function to execute
getObjectsArray
Get the objects array
objectLoop
Run a callback function on all objects and the corresponding children
Parameters
object
VisualObject Start objectcallback
Function callback function
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
clash
ClashObject Clash to add
getClashObject
Get the ClashObject instance with the given id
Parameters
id
String ClashObject id
getClashObjectCount
Get the number of ClashObjects
removeClashObject
Remvoe a ClashObject instance from the container
Parameters
id
String
clearClashObjects
Remove all ClashObject instances
forEachClashObject
Loop through all ClashObjects and run the function
Parameters
func
Function Callback function
addRevisionCompareObject
Add a RevisisonCompareObject to the container
Parameters
obj
RevisionCompareObject Object to add
clearRevisionCompareObjects
Remove all RevisionCompareObject instances
getRevisionCompareObject
Get the RevisionCompareObject with the given id
Parameters
id
String Object id
forEachRevisionCompareObject
Loop through all RevisionCompareObjects and run the function
Parameters
func
Function Callback function
ProjectContent
Root class for all project related data
Parameters
viewport
Viewport3D Viewport
addModel
Add a ProjectModel instance to the project
Parameters
model
ProjectModel Model to add
getModel
Get the model with the given id
Parameters
id
String Model id
getModels
Get all models of the project
findModel
Find a specific model based on the filter function
Parameters
func
Function Filter function
forEachModel
Run function for each project model
Parameters
func
Function Function to run
getTopologyLeafNode
Get the topology leaf node with the given id
Parameters
nodeId
String Node id
forEachTopologyLeafNode
Run function for each topology leaf node
Parameters
func
Function Function to run
parseProjectDetailsResponse
Parst the response from the project API
Parameters
r
Object API response
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
layerId
String Layer id
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
r
Object Response
parseProjectTopologyResponse
Parse the response of the project topology API
Parameters
r
Object Response
parseObjectTopologyResponse
Parse the response of the object topology API
Parameters
parseGeometryTemplateChunks
Parse the response of the geometry template API
Parameters
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 unloadrevNr
Numer Revision numberonlyObjects
Boolean unload only the objects without clearing the model data
getDisciplineNode
Get the discipline geometry node for the layer
Parameters
node
ProjectTopologyNode Nodelayer
ProjectLayer Layer
ProjectLayer
Parameters
getProject
Get the parent project
getModel
Get the parent model
setModel
Set the parent modal
Parameters
m
ProjectModel Model
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
value
Boolean Visisble true/false
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
value
Object Color
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
project
ProjectContent Projectid
String Model idtopoId
String Division Topology idname
String Model namelayers
Array<ProjectLayer> array of layers within the model
getProject
Get parent project
addLayer
Add layer to the model
Parameters
layer
ProjectLayer Layer
getLayer
Get the layer with the given id
Parameters
id
String Layer id
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
func
Function Function to execute
setCurrentRevision
Set the currently active revision for the model
Parameters
rev
Number Revision
getCurrentRevision
Get the currently active revision
hasRevisions
Check if model has revisions
addTopologyLeafNode
Add a topology leaf node to the model
Parameters
node
ProjectTopologyNode
getTopologyLeafNodes
Get all attached topology leaf nodes
getTopologyLeafNode
Get the topology leaf node
Parameters
id
String Node id
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
tree
Object Subtree
clear
Clear the model data
setVisible
Set model visibility
Parameters
value
Boolean Visisble true/false
ProjectTopologyNode
Class Represents a leaf node of the topology tree
Parameters
model
ProjectModel Parent modelid
String Node idname
String Node name
isLayerGeometryLoaded
Checks if given layer has geometry loaded or not
Parameters
layer
ProjectLayer Layer
setLayerGeometryLoaded
Set or reset the geometry loaded flag for the given layer
Parameters
layer
ProjectLayer Layervalue
Boolean Loaded true/false (optional, defaulttrue
)
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
layer
ProjectLayer Layervalue
Boolean Visisble true/false
isLayerVisible
Checks if the layer of the node is visisble
Parameters
layer
ProjectLayer Layer to check visibility
getGeometryNode
Get the node's corresponding geomtry node
getDisciplineNode
Get the node's corresponding discipline node
Parameters
layer
ProjectLayer Layer
disposeLayerGeometry
Dispose the layer geometry for the node
Parameters
layer
ProjectLayer Layer for which to dispose the geometry
getModel
Get the node's parent model
setLayerUserColor
Set layer user color - use null to reset it
Parameters
layer
ProjectLayer Layer for which to set the user colorvalue
Array RGB color array
getLayerUserColor
Get layer user color - returns null if no user color is set
Parameters
layer
ProjectLayer Layer for which to get the user color
setLayerUserOpacity
Set layer user opacity - use null to reset it
Parameters
layer
ProjectLayer Layer for which to set the user opycityvalue
Array Opacity value (0..1)
getLayerUserOpacity
Get layer user opacity - returns null if no user opacity is set
Parameters
layer
ProjectLayer Layer for which to get the user opacity
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
content
ViewportContent Used content
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 idvisible
{Boolean} division visibleallowRecalc
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, defaultfalse
)
isolateObjects
Isolate the objects and put the other ones in the background
Parameters
addObjectsToWorkingSet
Add the objects to the working set
Parameters
objects
Array<VisualObject> Objects to move to working set
removeObjectsFromWorkingSet
Remove the objects from the working set
Parameters
objects
Array<VisualObject> Objects to remove from the working set
addObjectsToSelectedSet
Add the objects to the selected set
Parameters
objects
Array<VisualObject> Objects to move to selected set
addObjectsToHiddenSet
Add the objects to the hidden set
Parameters
objects
Array<VisualObject> Objects to move to the hidden set
addObjectsToColoredSet
Add the objects to the colored set and set paint it in the given custom color
Parameters
objects
Array<VisualObject> Objects to move to the colored setcolor
Object Color
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 objectmultiselect
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 objectsmultiselect
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
objects
Array<VisualObject> Objects
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 modestrict
{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 appliedvb
{Object} bounding box
setTargetToObject
Set controls target (rotation center) to object's center.
Parameters
oid
{String} object idfly
{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 restoredignoreVisibility
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 objectopacity
{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 Pointprojector
{Object} Projectorcamera
{Number} Camera
ViewportContent
Base class for viewport content
Parameters
viewport
Viewport3D Viewport
VisualObject
This is the class representing an object in the view
init
Initialize the object
Parameters
viewport
Viewport3D Viewportindex
Number Index of the object inside the ObjectsContainer
clone
Shallow clone the object
setFromVisualObject
Copy object data from another instance
Parameters
o
VisualObject Source object
addRelation
Add a relation the object
Parameters
hasRelation
Check if object has a relation
Parameters
getRelations
Get all relations with given name
Parameters
name
String Relation name
addChild
Add object as child to this object
Parameters
child
VisualObject Child object
removeChild
Remove a child object from this object
Parameters
child
VisualObject Child object
addChildGeometry
Add object as child geometry to this object
Parameters
child
VisualObject Child geometry object
removeChildGeometry
Remove a child geometry object from this object
Parameters
child
VisualObject Child geometry object
isDisciplineNodeVisible
Checks if the object's discipline node is visible
Parameters
viewport
getDisciplineNode
Get the corresponding discipline node
Parameters
viewport
Viewport3D Viewport
getDisciplineNodeMesh
Get the corresponding discipline node mesh
Parameters
viewport
Viewport3D Viewport
getMesh
Get the corresponding mesh
Parameters
viewport
Viewport3D Viewport
getMeshGeometry
Get the mesh geometry
Parameters
viewport
Viewport3D Viewport
getVertexAttributeArray
Get a vertex attribute data array
Parameters
viewport
Viewport3D Viewportattrib
String Attribute name
getPositionArray
Get the vertex positions array
Parameters
viewport
Viewport3D Viewport
setVertexAttributeArray
Set the vertex attribute to given values
Parameters
viewport
Viewport3D ViewportattribName
String Attibute namevalues
Array Vertex attribute values
getNumberOfFaces
Get the number of triangles
getStartIndex
Get the object's start index
hide
Hide the object
Parameters
viewport
Viewport3D Viewport
show
Show the object
Parameters
viewport
Viewport3D Viewport
setIsolation
Set isolation mode on or off for this object
Parameters
viewport
Viewport3D Viewportisolate
Boolean Isolate on or off
getIsolation
Get isolatation flag
Parameters
viewport
Viewport3D Viewport
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
viewport
Viewport3D Viewportforce
Boolean Force object color on/off
getForceObjectColor
Get force object color flag
Parameters
viewport
Viewport3D Viewport
setBackground
Set object background flag
Parameters
viewport
Viewport3D Viewportbackground
Boolean Put object to background true/false
getBackground
Get the object background flag
Parameters
viewport
Viewport3D Viewport
resetObjectFlags
Reset all object flags
Parameters
viewport
Viewport3D Viewport
paint
Paint the object in the given color or reset to original color by passing no color value
Parameters
viewport
Viewport3D Viewportcolor
Object Color
setPaintColor
Set the object's color to a custom one
Parameters
viewport
Viewport3D Viewportcolor
Object Color
resetPaintColor
Reset the custom color to the object's original color
Parameters
viewport
Viewport3D Viewport
hasOwnGeometry
Check if this objects has own geometry
getBoundingBox
Get the object's bounding box