new SelectionManager( [config])
Creates a new selection manager and connects it with a model and scene manager.
Parameters:
| Name | Type | Argument | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
object |
<optional> |
An optional configuration object. |
||||||||||||
Properties of
|
|||||||||||||||
| Name | Type | Argument | Description |
|---|---|---|---|
sceneManager |
PD.SceneManager |
<optional> |
The scene manager to select elements within. |
modelManager |
PD.ModelManager |
<optional> |
The model manager that stores building elements. |
Classes
Members
-
:BIM.Aperture|null
currentAperture
-
Stores the currently selected element aperture.
Whilst there can be multiple selected openings stored in the
selectionSetmap, this represents the first and closest to the initial selection click. It is used mainly when dragging and to set the direction vector of the opening cursor.Type
- BIM.Aperture | null
-
:number
currentApertureIndex
-
Stores the index of the current aperture in the selected line segment.
Type
- number
-
:Array|null
currentContour
-
Stores the currently selected contour array.
Type
- Array | null
-
:number
currentContourIndex
-
Stores the index of the currently selected contour array.
Type
- number
-
:BIM.Element|null
currentElement
-
Stores the currently selected model element.
Whilst there may be multiple selected elements stored in the
selectionSetmap, this represents the primary selection (usually closest to the initial selection ray or first found in a region-based selection) and is the one that subsequent actions/selections are always based on.Type
- BIM.Element | null
-
:BIM.Element|null
currentHierarchy
-
Stores the currently selected hierarchy.
This is used by the UI when dynamically switching between tabs showing different selection levels. It needs to be part of the selection manager so that it can be updated when the selection set changes, but independent of tab settings.
Type
- BIM.Element | null
-
:BIM.Junction|null
currentJunction
-
Stores the actual currently selected contour point.
Type
- BIM.Junction | null
-
:number
currentJunctionIndex
-
Stores the index of the currently selected contour point.
Type
- number
-
:PD.Point|null
currentPoint
-
Stores the currently selected point that the 3D cursor is attached to.
This value will often be the same as
currentJunction, except when editing a curve control point, selecting a path segment or moving an element. When any cursor is visible, this property will always have a valid value and any movement of the cursor is applied to it.Type
- PD.Point | null
-
:Array
currentSegment
-
Stores the end points of the currently selected path segment.
Whilst there can be multiple selected segments stored in the
selectionSetmap, this represents the first and closest to the initial selection click. It is used mainly when dragging and to set the direction vector of the 1D cursor. It is also the one that will be deleted or inserted into.Type
- Array
-
:number
currentSegmentIndex
-
Stores the index of the segment in the selected element path.
Type
- number
-
:PD.SELECTED
currentType
-
Stores the currently active selection type.
Type
-
:PD.Cursor
cursorAperture
-
The 3D cursor used to edit in-situ
BIM.Apertureobjects.Type
-
:PD.Cursor
cursorElement
-
The 3D cursor used for interacting with selected elements.
This defaults to being an alias for
cursorPointbut allows custom elements or subclasses to use their own custom cursors instead.Type
-
:PD.Cursor.Box
cursorExtents
-
The 3D cursor used to edit the extents of
PD.RectMeshobjects.Type
-
:PD.Cursor.CaptureAll
cursorFullScreen
-
The 3D cursor used for region selection.
Type
-
:PD.Cursor
cursorPoint
-
The 3D cursor used to edit elements and path junctions.
Type
-
:PD.Cursor
cursorSegment
-
The 3D cursor used to interacting with selected path segments.
This defaults to being an alias for
cursorVector, but may be set tocursorPointfor more unrestricted movement, and allows custom elements or subclasses to use their own cursors instead.Type
-
:PD.Text
cursorText
-
A text helper for rendering cursor-linked messages.
Type
-
:PD.Cursor
cursorVector
-
The 3D cursor used to edit path segment and facet normal vectors.
Type
-
:PD.MODE
defaultUserMode
-
The default user mode to return to when actions are completed or cancelled.
Type
-
:boolean
isDragging
-
Whether or not an interactive drag operation is currently active.
Type
- boolean
-
:boolean
isKeyDownCtrl
-
A flag storing the last pointer/mouse/pen event control/meta key status.
This value is stored at the beginning of each user interaction so that it can influence selection actions invoked by a user mode handler.
Type
- boolean
-
:boolean
isKeyDownShift
-
A flag storing the last pointer/mouse/pen event shift key status.
This value is stored at the beginning of each user interaction so that it can influence selection actions invoked by a user mode handler.
Type
- boolean
-
:boolean
isSelectionManager <readonly>
-
A flag identifying this object as a selection manager.
Type
- boolean
-
:object
measureClickPt
-
Stores the last dimension line
ClickPointused when measuring.Type
- object
-
:PD.PolyMesh
meshCursorText
-
The dynamic mesh used to render text and information with cursor.
Type
-
:PD.PolyMesh
meshDimension
-
The dynamic mesh used for displaying dimension lines.
This mesh will contain an amount of numeric text so will likely get quite big, so 32-bit index buffers are enabled from the start.
Type
-
:PD.PolyMesh
meshExtendedSelection
-
A semi-transparent dynamic mesh for indicating the extended selection set.
This mesh is used for highlighting the extended selection set with semi-transparent orange surfaces and lines.
Type
-
:PD.PolyMesh
meshPreSelection
-
A semi-transparent dynamic mesh for indicating what is about to be selected.
This mesh is very transparent and used to highlight elements/junctions that the user has clicked/pressed on, but not yet released. If the user drags the pointer whilst still clicked/pressed, the pre-selection is cleared and the view is rotated or panned. This modality is required to support view manipulation on touch devices.
This mesh is also added to the scene separately from the rest of the meshes so that it can be independently offset when plan sections are shown in a 3D view.
Type
-
:PD.PolyMesh
meshSelectionOutline
-
An opaque dynamic mesh for indicating what is currently selected.
This mesh is use to display thick red element and path outlines created using long thin quads as well as opaque normal lines. It is not used for triangulated surfaces.
Type
-
:PD.PolyMesh
meshSelectionSurface
-
A semi-transparent dynamic mesh for indicating selected surfaces.
This mesh is used for highlighting selected surfaces and shells with semi-transparent red surfaces and lines.
Type
-
:THREE.Group
meshes
-
A group that stores all the selection, pre-selection, dimension and snap meshes so they can be easily added to or removed from the scene manager.
Type
- THREE.Group
-
:PD.ModelManager
modelManager
-
The model manager that stores building elements.
Type
-
:object
nodeSelection
-
Stores information for selecting and editing curve control nodes.
Selecting and editing a curve control node should not affect the current selection set, unless the user clicks away. Thus, control nodes can only be selected when displayed as part of an existing selection, and the switch between node and previous selection should be seamless.
Type
- object
-
:PD.SceneManager
sceneManager
-
The scene manager to select elements within.
Type
-
:boolean
segmentConstrainDrag
-
Whether or not the current segment drag is being constrained.
Type
- boolean
-
:PD.Point
segmentIntersection
-
Stores the intersection point of the two reference rays.
Type
-
:THREE.Plane
segmentPlane
-
Stores the intersection plane used for dragging a line segment.
This is the plane equation of the currently selected line segment. It is used to robustly compute the new vertices with adjacent lines when the line is dragged and snapped in its normal direction.
Type
- THREE.Plane
-
:Array.<PD.Point>
segmentPoints
-
Stores the original reference position of dragged point(s).
Type
- Array.<PD.Point>
-
:Array
segmentRays
-
Stores the original adjacent rays when dragging a line segment.
These are rays created for each of the adjacent lines when a line segment is selected. As the end vertices are moved dynamically, it is important to store the original vector of each line so they can be intersected with the reference plane and always yield a new line parallel to the original.
Type
- Array
-
:PD.Selection
selection
-
A selection set used to receive the closest selection.
NOTE: This object does not hold the current selection set. It is passed to selection methods within the
PD.ModelManagerto see if the user selected something new and, if so, its contents is then copied/transferred to the current selection set.Type
-
:PD.SelectionManager.SelectionSet
selectionSet
-
Stores the extended selection set, which is all selected element(s) along with their selected junctions, apertures and nodes.
Multiple selection is used when the SHIFT and/or CONTROL keys are pressed, the
PD.GlobalState.selectActionflag is set to something other thanPD.SELECT_ACTION.REPLACE, or the user has drag-selected a region in the model canvas.Type
-
:boolean
showSnapPaths
-
Whether or not the model is currently being interactively snapped.
Type
- boolean
-
:PD.Snapper
snapper
-
The snap helper to use for snapping.
Type
-
:number
userActionStage
-
The step of whatever staged edit mode the cursor is in.
The integer value of this property will increment each time the user steps through a staged editing process, such as locating a start and end point, etc.
Type
- number
-
:PD.UserModeHandler
userDragDropHandler
-
The current handler object for drag/drop interaction.
Type
-
:PD.MODE
userMode
-
Determines how the selection manager responds to pointer/cursor interaction.
Type
-
:PD.UserModeHandler
userModeHandler
-
The current handler object for pointer/cursor interaction.
Type
-
:Array.<PD.MODE>
userModeStack
-
A stack of previous user modes.
Type
- Array.<PD.MODE>
-
:number
preselectionSurfaceOpacity <static>
-
The surface opacity of the pre-selection highlight mesh.
Type
- number
-
:number
selectionOutlineOpacity <static>
-
The outline opacity of the selection highlight mesh.
Type
- number
-
:number
selectionSurfaceOpacity <static>
-
The surface opacity of the selection highlight mesh.
Type
- number
Methods
-
addElement(element [, select] [, noSpaceCheck])
-
Adds a new element to the current level.
Parameters:
Name Type Argument Default Description elementBIM.Element The element to add to the current level.
selectboolean <optional>
false Whether or not to select the new element, defaults to false.
noSpaceCheckboolean <optional>
false When true, no check for a parent space is made, defaults to false.
Throws:
-
-
Throws an error if the given element is null or not a
BIM.Element. - Type
- TypeError
-
-
-
Throws an error if the given element has insufficient contours or points.
- Type
- Error
-
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
-
addElementByComponentInstanceInteractively(component)
-
Begins adding a new element using the given component.
Parameters:
Name Type Description componentBIM.Component The component to add.
Returns:
Returns true if a new element was begun.
- Type
- boolean
-
addElementByComponentNameInteractively(className)
-
Begins adding a new element using the given component type name.
Parameters:
Name Type Description classNamestring The component class name.
Returns:
Returns true if a new element was begun.
- Type
- boolean
-
addElementInteractively( [options])
-
Begins the process of interactively creating a new model element.
NOTE: This method can only be used to create
BIM.Elementinstances that have physical geometry that follows a path. Any other entity type cannot be interactively created in this way, so the method will returnnull.Parameters:
Name Type Argument Description optionsobject <optional>
An optional object with settings.
Properties of
options:Name Type Argument Description entityTypeBIM.ENTITY | string <optional>
The type of entity to create.
subTypenumber | string <optional>
The sub-type of furnishing to create.
colorTHREE.Color <optional>
The color of the new element.
positionTHREE.Vector3 <optional>
The starting position of the cursor.
isClosedboolean <optional>
Whether or not the new element path is closed.
isRectboolean <optional>
Whether or not the new element path is rectangular.
Returns:
Returns the element just created, if any.
- Type
- BIM.Element
-
addFoundItemsToSelection(mode, selection)
-
Handle multiple found items in the selection set.
Parameters:
Name Type Description modePD.SELECT_ACTION The extended selection mode.
selectionPD.Selection The interactive selection accumulator.
Returns:
Returns true if the selection set changed.
- Type
- boolean
-
addLevel(level)
-
Adds a new level to the current structure.
Parameters:
Name Type Description levelBIM.Level The level to add to the current structure.
Throws:
-
Throws an error if the given level is null or not a
BIM.Level. - Type
- TypeError
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
-
addNewElementInteractively(classData, position, subType)
-
Begins the process of interactively creating a new model element.
NOTE: This method can only be used to create
BIM.Elementinstances that have physical geometry that follows a path. Any other entity type cannot be interactively created in this way, so the method will returnnull.Parameters:
Name Type Description classDatastring | object A class name or an object containing a
classNameproperty.positionTHREE.Vector3 The starting position of the cursor.
subTypenumber The sub-type of element to create.
Returns:
Returns the element just created, if any.
- Type
- BIM.Element
-
addRandomRectangularSpace(size)
-
Adds a new rectangular space to the current model and selects it.
Parameters:
Name Type Description sizenumber The base size of the random space.
Returns:
Returns the newly added space.
- Type
- BIM.Space
-
addStructure(structure)
-
Adds a new structure to the current model.
Parameters:
Name Type Description structureBIM.Structure The structure to add to the current structure.
Throws:
-
Throws an error if the given structure is null or not a
BIM.Structure. - Type
- TypeError
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
-
animateSelectionMeshDisplayHeight(height)
-
Sets the offset height the selection and dimension meshes.
This is used when an element is selected on a different level to the current level, but we want to highlight as the level animates into the right position.
Parameters:
Name Type Description heightnumber The relative height offset in model units.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
applyCSGActionToPaths(csgAction)
-
Applies the given CSG action to the currently selected paths.
Parameters:
Name Type Description csgActionstring The CSG action to apply to the selected paths ('union'|'difference'|'intersect').
Returns:
Returns true if the CSG action was successful and the path was changed.
- Type
- boolean
-
backOutOfNodeSelection()
-
Attempts to return to the previous selection from control node.
Returns:
Returns true if selection mode returned to previous.
- Type
- boolean
-
beginElementInteraction(element, junction [, update])
-
Starts the process of interactively creating the given element.
Parameters:
Name Type Argument Default Description elementBIM.Element The element to create.
junctionBIM.Junction The starting junction.
updateboolean <optional>
false Whether or not to update the element.
Returns:
Returns the element being created.
- Type
- BIM.Element
-
bumpSelectionId()
-
Updates the current selection identifier.
Returns:
Returns the current selection id.
- Type
- number
-
cancelAction()
-
Cancels the current edit mode action.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
checkForExtendedSelection(mode, selection)
-
Add/Remove the selection to/from the extended selection set.
Parameters:
Name Type Description modePD.SELECT_ACTION The extended selection mode.
selectionPD.Selection The interactive selection accumulator.
Returns:
Returns true if the selection set changed.
- Type
- boolean
-
checkForSelectionLevelChange(element)
-
Checks to set the level of the given element as current.
If the level that owns the element is not current, it will be made the currently selected level.
Parameters:
Name Type Description elementBIM.Element The element about to be selected.
Returns:
Returns true if the level was changed and the selection needs to be delayed.
- Type
- boolean
-
clearKeyDownState()
-
Resets key down states to false.
-
clearPreSelection()
-
Clears all geometry from the current pre-selection mesh.
Returns:
Returns true if the pre-selection mesh changed state.
- Type
- boolean
-
clearSelection()
-
Clears everything from the current selection.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
completeAction()
-
Completes any ongoing interactive process.
The exact nature of this action depends on the current handler. When interactively adding an element, this means adding the new element to the model. When measuring, this means updating the global state with the measured value.
Returns:
Returns true if current mode was successfully completed.
- Type
- boolean
-
connectTo(sceneManager, modelManager)
-
Connects this selection manager to a scene and model manager.
Parameters:
Name Type Description sceneManagerPD.SceneManager The scene manager to select elements within.
modelManagerPD.ModelManager The model manager that stores building elements.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
cursorHideInfo()
-
Hides the node cursor message box.
-
cursorShowInfo()
-
Displays a message in a box next to the node cursor.
-
cursorUpdateArrowOffset()
-
Updates the arrow offset values of each selection cursor.
-
cursorUpdateInfo()
-
Displays a message in a box next to the node cursor.
-
dispose()
-
Cleans up the scene viewer and removes all event listeners.
NOTE: Only call this method when the scene viewer is no longer needed and you wish to free all its resources.
-
duplicatePathContour( [side] [, element])
-
Creates a new construction line based on the path of the currently selected element.
The line will only be created if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description sidePD.SIDE <optional>
The side of the contour to generate, defaults to
PD.SIDE.MIDDLE.elementBIM.Element <optional>
The element with the path being duplicated, defaults to
currentElement.Returns:
Returns true if new element was successfully created.
- Type
- boolean
-
extendedSelectionMode()
-
Determines the appropriate select action based on global state and key modifiers.
Returns:
Returns the appropriate select type.
- Type
- PD.SELECT_ACTION
-
fadeOutLevelSelection()
-
Fades out the level selection mesh.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
findClosestCurveNodeByFrustum(selection)
-
Looks for a node from the control nodes list that is inside the selection region.
Parameters:
Name Type Description selectionPD.Selection The interactive selection accumulator.
Returns:
Returns true if a control node in the curve was selected and the selection updated, otherwise false.
- Type
- boolean
-
findClosestCurveNodeByRay(selection)
-
Finds the closest node in the control nodes list.
Parameters:
Name Type Description selectionPD.Selection The interactive selection accumulator.
Returns:
Returns true if a control node in the curve was selected and the selection updated, otherwise false.
- Type
- boolean
-
findInExtendedSelectionByRay(selection [, event])
-
Checks if the intent of the user action is to select an already selected item.
As a wall can have any number of apertures within it, or just a single aperture that fills its entire surface/length, there will be circumstances where it is not entirely clear if the user is clicking to select a surface/junction, or one of the apertures within that surface/length.
If just a single path segment or aperture is selected, and the user clicks again within the bounds of the aperture, then the selection should toggle between the segment and the aperture on each click.
However, if more than one path segment or aperture is selected, then the user should be able to click on any one of them to make the clicked one current, without toggling or changing the existing selection set or type.
This method is used to make that distinction. It is called during pre-selection and first checks for proximity to items in the current selection set, but only when the selection set has multiple items.
The
PD.SelectionManager#makeExtendedSelectionItemCurrentmethod is then used when the selection pointer/touch is released to process the selection and detect a re-selection.Parameters:
Name Type Argument Description selectionPD.Selection The interactive selection accumulator.
eventEvent <optional>
The DOM event that triggered this action.
Returns:
Returns true if an already selected item was re-selected, otherwise false.
- Type
- boolean
-
getContourAndJunctionIndex(selection, element, junction)
-
Searches for the given junction within the element.
If the junction is found within a contour of the element's path, the
closestJunction,closestJunctionIndex,closestContourandclosestContourIndex` properties of the selection set are updated and the method returns true.If the junction is not found, no values are set and the method returns false.
Parameters:
Name Type Description selectionPD.Selection The interactive selection accumulator.
elementBIM.Element The element to search within.
junctionBIM.Junction The junction to search for.
Returns:
Returns true if the junction was found in a contour.
- Type
- boolean
-
getLevelSelectionMesh()
-
Retrieves the mesh to be used for level selection.
You should use this method to get the level selection mesh rather than accessing the meshes directly as this may change in the future depending on view settings.
Returns:
Returns the mesh that renders levels as selected.
- Type
- PD.PolyMesh
-
getLevelSelectionMeshOpacity()
-
Retrieves the opacity to be used for level selection.
You should use this method to get the target opacity for the level selection mesh rather than accessing the opacities directly as this may change in the future depending on view settings.
Returns:
Returns the target opacity for the level selection mesh.
- Type
- number
-
getMeasuredDistance()
-
Retrieves the distance value taken during last interactive measurement.
Returns:
Returns the last measured distance.
- Type
- number
-
getNextAperture(element, contour_index, junction_index, aperture_index [, backwards])
-
Find the prev/next aperture within the given element.
Parameters:
Name Type Argument Default Description elementBIM.Element The element containing the selected aperture.
contour_indexnumber The ordinal index of the contour within the element path.
junction_indexnumber The ordinal index of the junction within the path contour.
aperture_indexnumber The ordinal index of the aperture within the junction.
backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns an object with
contourIndex,junctionIndex,apertureIndexandapertureproperties.- Type
- object | null
-
getNextElement(element [, backwards])
-
Find the prev/next element within the current model.
Parameters:
Name Type Argument Default Description elementBIM.Element The element to work from.
backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns the next element found, or null if no element.
- Type
- BIM.Element | null
-
getNextJunction(element, contour_index, junction_index [, backwards])
-
Find the prev/next junction within the given element.
Parameters:
Name Type Argument Default Description elementBIM.Element The element containing the selected junction.
contour_indexnumber The ordinal index of the contour within the element path.
junction_indexnumber The ordinal index of the junction within the path contour.
backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns an object with
contourIndex,junctionIndexandjunctionproperties.- Type
- object | null
-
getNextJunctionControlNode(junction, node_index [, backwards])
-
Find the prev/next node within the given junction.
Parameters:
Name Type Argument Default Description junctionBIM.Junction The junction containing the selected node, if any.
node_indexnumber The ordinal index of the node within the element/junction.
backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns an object with
nodeIndexandnodeproperties.- Type
- object | null
-
getNextJunctionWithApertures(element, contour_index, junction_index [, backwards])
-
Attempts to find the next/prev junction within the given element that has an aperture.
Parameters:
Name Type Argument Default Description elementBIM.Element The element containing the selected junction.
contour_indexnumber The ordinal index of the contour within the element path.
junction_indexnumber The ordinal index of the junction within the path contour.
backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns an object with
contourIndex,junctionIndexandjunctionproperties.- Type
- object | null
-
getNextLevel(element [, backwards])
-
Find the prev/next element within the current model.
Parameters:
Name Type Argument Description elementBIM.Level The element to work from.
backwardsboolean <optional>
Whether or not to go backwards, defaults to false.
Returns:
Returns the next element found, or null if no element.
- Type
- BIM.Element | null
-
getNextSegment(element, contour_index, junction_index [, backwards])
-
Find the prev/next path segment within the given element.
Parameters:
Name Type Argument Default Description elementBIM.Element The element containing the selected junction.
contour_indexnumber The ordinal index of the contour within the element path.
junction_indexnumber The ordinal index of the junction within the path contour.
backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns an object with
contourIndex,junctionIndexandjunctionproperties.- Type
- object | null
-
getRenderData(mesh_surface, mesh_outline)
-
Accumulates a set of useful data into an object for passing to render methods.
Parameters:
Name Type Description mesh_surfacePD.PolyMesh The mesh to render the selected surfaces to,
mesh_outlinePD.PolyMesh The mesh to render the selected outlines to,
Returns:
Returns a render data object.
- Type
- object
-
getSelectionId()
-
Retrieves the current selection identifier.
Returns:
Returns the current selection id.
- Type
- number
-
getSurfaceDragUtils()
-
Retrieve the surface snap utility object.
Returns:
Returns the surface snap utility object.
- Type
- object
-
handleCursorDragEnd(cursor, event)
-
Invoked immediately after the cursor finishes a move.
Parameters:
Name Type Description cursorPD.Cursor The cursor that just finished moving.
eventobject The DOM event that triggered the end of the move.
Returns:
Returns true if the move was finalised.
- Type
- boolean
-
handleCursorDragMove(new_pos, cursor, event)
-
Handles cursor drag move events.
Parameters:
Name Type Description new_posTHREE.Vector3 The proposed new position of the cursor.
cursorPD.Cursor The cursor that moved.
eventobject The DOM event that triggered this move.
Returns:
Returns true if the move was applied.
- Type
- boolean
-
handleCursorDragRotate(rotation, new_pos, cursor, event)
-
Handles cursor drag rotation events.
Parameters:
Name Type Description rotationTHREE.Euler The proposed new angle of the cursor.
new_posTHREE.Vector3 The proposed new position of the cursor.
cursorPD.Cursor The cursor that rotated.
eventobject The DOM event that triggered this move.
Returns:
Returns true if the rotation was applied.
- Type
- boolean
-
handleCursorDragStart(cursor, event)
-
Invoked immediately before the cursor starts to move.
Parameters:
Name Type Description cursorPD.Cursor The cursor that is about to move.
eventobject The DOM event that triggered this move.
Returns:
Returns true if the move is allowed.
- Type
- boolean
-
handleDblClick(event)
-
Handles a double-click event in the scene.
Parameters:
Name Type Description eventobject The DOM event that triggered this call.
Returns:
Returns true if the double-click did something within the model, otherwise false.
- Type
- boolean
-
handleOnClickSelect(raycaster, event)
-
Handles interactive selection events from the
PD.SceneManager.This is invoked after a pre-selection has been displayed and the user releases the pointer within the drag threshold to indicate a click that accepts the transient pre-selection as an actual selection.
This method typically just accepts the current pre-selection and either adds to, removes from or sets it as the current selection set. However, it is always called when a click/tap event is detected and is passed the same information as the pre-selection event. This allows it to ignore the pre-selection process entirely and perform selection only on release if that is the desired behaviour.
Parameters:
Name Type Description raycasterTHREE.Raycaster The ray cast into the current scene.
eventobject The DOM event that triggered this selection.
Returns:
Returns true if something in the model was selected and geometry was added to the mesh, otherwise false.
- Type
- boolean
-
handleOnDragOver(event)
-
Handles interactive dragging of an element into the canvas.
Parameters:
Name Type Description eventobject The DOM event that triggered this call.
Returns:
Returns true if the hover element changed and the pre-selection mesh needs updating via a canvas redraw, otherwise false.
- Type
- boolean
-
handleOnDragSelect(frustum, event, intersect)
-
Handles interactive drag selection events from the
PD.SceneManager.This is invoked after the user has dragged and released the pointer within the model to create a region that defines a frustum for model selection.
This method searches through the model looking for elements, paths, segments or junctions either within or touching the frustum.
Parameters:
Name Type Description frustumTHREE.Frustum The selection frustum within the current scene.
eventobject The DOM event that triggered this selection.
intersectboolean Whether or not the frustum was dragged right-left for intersection selection.
Returns:
Returns true if something in the model was selected and geometry was added to the mesh, otherwise false.
- Type
- boolean
-
handleOnDrop(event)
-
Handles interactive pre-selection events.
Parameters:
Name Type Description eventobject The DOM event that triggered this call.
Returns:
Returns true if the hover element changed and the pre-selection mesh needs updating via a canvas redraw, otherwise false.
- Type
- boolean
-
handleOnPreSelect(raycaster, event)
-
Handles interactive pre-selection events from the
PD.SceneManager.When working with touch or pen-based interaction, we can't just use a pointer button index to work out whether the user wants to select something or start dragging the view around. Thus, we need to wait until the user either releases the pointer without dragging or actually starts dragging.
To provide some visual feedback to the user, the initial press can display some type of transient visual indicator of what would be selected if the pointer was immediately released, giving the user an option to drag the pointer to cancel that selection if not what was desired.
When in edit model mode, this callback searches through the current model for a selectable element and displays a ghost image of the potential selection while the press is active and before any drag begins. If a drag then happens, the pre-selection is cancelled.
Parameters:
Name Type Description raycasterTHREE.Raycaster The ray cast into the current scene.
eventobject The DOM event that triggered this callback.
Returns:
Returns true if something in the model was pre-selected and geometry was added to the mesh, otherwise false.
- Type
- boolean
-
handleOnPreSelectClear(event)
-
Handle the clearing of pre-selection events from the
PD.SceneManager.This is invoked after a pre-selection has been displayed, but the user then drags the pointer beyond the threshold to change the view instead. This callback simply clears any pre-selection information and removes it from the mesh.
Parameters:
Name Type Description eventobject The DOM event that triggered this callback.
Returns:
Returns true if something in the model was pre-selected and the mesh was subsequently cleared, otherwise false.
- Type
- boolean
-
highlightApertureFacets(mesh_outline, mesh_surface, aperture, size)
-
Adds the facets of an aperture to the given mesh.
Parameters:
Name Type Description mesh_outlinePD.PolyMesh The mesh to receive highlight lines.
mesh_surfacePD.PolyMesh The mesh to receive highlight surfaces.
apertureBIM.Aperture The aperture to highlight.
sizenumber The indicator size in model units.
-
highlightElement(element)
-
Visually highlights the added element using the pre-selection mesh.
Parameters:
Name Type Description elementBIM.Element The element to highlight.
-
highlightJunction(mesh, junction, size)
-
Adds a highlighted path vertex/junction to the given mesh.
Parameters:
Name Type Description meshPD.PolyMesh The mesh to receive the highlight geometry.
junctionBIM.Junction The path junction to highlight.
sizenumber The indicator size in model units.
-
highlightJunctionFacets(mesh, path [, junction])
-
Adds the facets that belong to a junction to the given mesh.
Parameters:
Name Type Argument Default Description meshPD.PolyMesh The mesh to receive the highlight geometry.
pathPD.Polyline The polyline with the contour outline to highlight.
junctionBIM.Junction <optional>
null An optional junction containing facets.
-
highlightPathContour(mesh, path, size [, contour])
-
Adds a highlighted path/polyline outline to the given mesh.
Parameters:
Name Type Argument Default Description meshPD.PolyMesh The mesh to receive the highlight geometry.
pathPD.Polyline The polyline with the contour outline to highlight.
sizenumber The indicator size in model units.
contourArray <optional>
null The contour to highlight, defaults to first in poly.
-
highlightPathSegment(mesh, from, to, size)
-
Adds a highlighted path segment to the given mesh.
Parameters:
Name Type Description meshPD.PolyMesh The mesh to receive the highlight geometry.
fromTHREE.Vector3 The start vertex of the line to highlight.
toTHREE.Vector3 The end vertex of the line to highlight.
sizenumber The indicator size in model units.
-
highlightRightAngles(mesh, junction, size)
-
Adds highlighted right-triangle indicator(s) to the given mesh.
Parameters:
Name Type Description meshPD.PolyMesh The mesh to receive the highlight geometry.
junctionBIM.Junction The junction to check right angles to highlight.
sizenumber The indicator size in model units.
-
highlightSelectedElement(mesh, element)
-
Visually highlights the added element using the selection mesh.
Parameters:
Name Type Description meshPD.PolyMesh The mesh to receive highlight surfaces.
elementBIM.Element The element to highlight.
-
highlightSelectedPathAsRect(mesh, element)
-
Visually highlights that the selected path is rectangular.
Parameters:
Name Type Description meshPD.PolyMesh The mesh to receive highlight surfaces.
elementBIM.Element The element to highlight.
-
initialiseExtendedSelection( [resetMode])
-
Initialises the selection set with the current selection.
This method is called AFTER the current selection is updated and simply copies the current selection into the extended selection set.
Parameters:
Name Type Argument Default Description resetModeboolean <optional>
true Whether to reset
PD.GlobalState.selectAction, defaults to true,Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
insertAperture(aperture)
-
Inserts a new aperture into the currently selected junction.
A new aperture will only be inserted if a valid junction or line segment is currently selected.
Parameters:
Name Type Description apertureBIM.Aperture The new aperture to insert in the current junction.
Returns:
Returns true if a new aperture was successfully inserted.
- Type
- boolean
-
insertApertureAndSelect(element, junction, aperture)
-
Inserts a new aperture into the given element junction.
Parameters:
Name Type Description elementBIM.Element The element that owns the junction.
junctionBIM.Junction The junction to insert the aperture in.
apertureBIM.Aperture The new aperture to insert.
Returns:
Returns true if a new aperture was successfully inserted.
- Type
- boolean
-
insertApertureByTypeComponent(component [, element] [, junction] [, x] [, y])
-
Inserts a new aperture based on the given type component.
This method creates an instance of the type component, as well as the host aperture, and inserts them into the given element and junction. If no element or junction is given, then the current selection is checked and used. 0
Parameters:
Name Type Argument Description componentBIM.Apertures | string An aperture type component instance or string containing an aperture type component class name.
elementBIM.Element <optional>
The element to insert the aperture in, defaults to current selection.
junctionBIM.Junction <optional>
The junction to insert the aperture in, defaults to current selection.
xnumber <optional>
The relative horizontal position.
ynumber <optional>
The relative vertical position.
Returns:
Returns true if a new aperture was successfully inserted.
- Type
- boolean
-
insertControlNode()
-
Inserts a new control node after selection.
Returns:
Returns true if new node was successfully added.
- Type
- boolean
-
insertJunction()
-
Inserts a new junction just after the currently selected junction.
A new junction will only be inserted if both a valid space is currently selected, as well as a valid junction or line segment at which to insert.
Returns:
Returns true if a new junction was successfully inserted.
- Type
- boolean
-
insertPathContour( [element] [, contour] [, index])
-
Inserts a new path contour into the currently selected element.
A new contour will only be inserted if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description elementBIM.Element <optional>
The element to remove the contour from, defaults to
currentElement.contourArray <optional>
An optional contour to add, defaults to a square around the center.
indexnumber <optional>
An optional index at which to insert the contour, defaults to the end.
Returns:
Returns true if the new contour was successfully inserted.
- Type
- boolean
-
insertPathContourWithInset(inset [, element])
-
Inserts a new path contour inset from the boundary into the currently selected element.
A new contour will only be inserted if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description insetnumber The amount to inset the outer boundary by, defaults to the 500mm or 24'.
elementBIM.Element <optional>
The element to remove the contour from, defaults to
currentElement.Returns:
Returns true if the new contour was successfully inserted.
- Type
- boolean
-
isUserModeAdd()
-
Checks if the current mode is to add a new element.
Returns:
Returns whether or not the current mode is adding a new element.
- Type
- boolean
-
isUserModeEdit()
-
Checks if the current mode is the default interactive edit mode.
Returns:
Returns whether or not the current mode is the default interactive edit mode.
- Type
- boolean
-
isUserModeMeasure()
-
Checks if the current mode is set to measure the model.
Returns:
Returns whether or not the current mode is measuring the model.
- Type
- boolean
-
isUserModeMove()
-
Checks if the current mode is set to moving the selection.
Returns:
Returns whether or not the current mode is moving the selection.
- Type
- boolean
-
isUserModeOrigin()
-
Checks if the current mode is to set a point position.
Returns:
Returns whether or not the current mode is setting a new position.
- Type
- boolean
-
isUserModeRect()
-
Checks if the current mode is to interactively edit a flat rect.
Returns:
Returns whether or not the current mode is interactively editing a flat rect.
- Type
- boolean
-
isUserModeRotate()
-
Checks if the current mode is set to rotating the selection.
Returns:
Returns whether or not the current mode is rotating the selection.
- Type
- boolean
-
isUserModeScale()
-
Checks if the current mode is set to scaling the selection.
Returns:
Returns whether or not the current mode is rotating the selection.
- Type
- boolean
-
makeExtendedSelectionItemCurrent(selection)
-
Checks the selection data to see if item is already in the selection set.
This method checks if the selected item is already in the extended selection set and, if so, it will be made current and the rest of the selection left unchanged.
Thus allows the user to switch the active cursor between selected elements, junctions and apertures dynamically to select the best snap anchor when moving/editing.
Parameters:
Name Type Description selectionPD.Selection The interactive selection accumulator.
Returns:
Returns true if currently selected item changed.
- Type
- boolean
-
moveSegmentBetweenAdjacentLines(new_pos, cursor, event)
-
Moves the selected line segment in the direction of the vector, but maintains the direction of adjacent lines.
Parameters:
Name Type Description new_posTHREE.Vector3 The new cursor position.
cursorPD.Cursor The cursor that moved.
eventobject The DOM event that triggered this move.
Returns:
Returns true if the line was moved, otherwise false.
- Type
- boolean
-
offsetPathContour(offset [, element] [, contourIndex])
-
Inserts a new path contour inset from the boundary into the currently selected element.
A new contour will only be inserted if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description offsetnumber The inset distance to apply to the new contour.
elementBIM.Element <optional>
The element containing the path contour, defaults to
currentElement.contourIndexnumber <optional>
The index of the contour to offset, defaults to 0.
Returns:
Returns true if contour was successfully offset.
- Type
- boolean
-
progressAction()
-
Progresses to the next stage of an ongoing interactive process.
The exact nature of this action depends on the current handler. When interactively adding an element, this means adding a new junction. to the element. When measuring, this means adding a new segment to the measure line.
-
removeAperture()
-
Deletes the currently selected aperture, if any.
Returns:
Returns true if the selected aperture was successfully removed.
- Type
- boolean
-
removeControlNode()
-
Inserts a new control node after selection.
Returns:
Returns true if new node was successfully added.
- Type
- boolean
-
removeElement( [element])
-
Deletes the currently selected element, if any.
In order to be deleted, a valid element must be currently selected. Also, this method does not rebuild the model as you may be removing multiple element, so you must rebuild the model when you are done.
Parameters:
Name Type Argument Description elementBIM.Element <optional>
The element to remove from the current level, defaults to current element.
Returns:
Returns true if the element was successfully removed.
- Type
- boolean
-
removeJunction()
-
Deletes the currently selected junction, if any.
A junction will only be deleted if both a valid space is currently selected, and a valid junction or line segment.
Returns:
Returns true if the selected junction was successfully removed.
- Type
- boolean
-
removeLevel(level)
-
Deletes the given level from the current structure.
Also, this method does not rebuild the model as you may be removing multiple levels, so you must rebuild the model when you are done.
Parameters:
Name Type Description levelBIM.Level The level to remove from the current structure.
Returns:
Returns true if the level was successfully removed.
- Type
- boolean
-
removePathContour( [element] [, index])
-
Removes a path contour from the currently selected element.
The contour will only be removed if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description elementBIM.Element <optional>
The element to remove the contour from, defaults to
currentElement.indexnumber <optional>
The index of the contour to remove, defaults to
currentContourIndex.Returns:
Returns true if the contour was successfully removed.
- Type
- boolean
-
removeStructure( [structure])
-
Removes the given structure, or the current structure in the current model.
Parameters:
Name Type Argument Description structureBIM.Structure <optional>
An optional structure, defaults to the current structure.
Returns:
Returns the deleted structure or
nullif invalid.- Type
- BIM.Structure
-
renderExtendedSelection(mesh_surface, mesh_outline)
-
Render the extended selection set as selected.
Parameters:
Name Type Description mesh_surfacePD.PolyMesh The mesh to render the selected surfaces to,
mesh_outlinePD.PolyMesh The mesh to render the selected outlines to,
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
replaceWithNearestOrNewJunctions(path, contours [, tolerance])
-
Replaces all the points in the given
contoursarray with either the nearest existing junctions or new junctions created at the given points.This method is used when copy/pasting path contours or when using CSG to construct a new path from other paths. Wherever possible we want to keep the original junctions, but we still need to accommodate new path points.
Parameters:
Name Type Argument Description pathBIM.Path The path to look for junctions in.
contoursArray.<Array.<THREE.Vector3>> The new contours positions to replace replace with junctions.
tolerancenumber <optional>
The junction proximity tolerance, defaults to 5mm or 3/16".
-
resetUserModeEdit()
-
Resets to the default interactive edit mode.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
reversePathContour( [element] [, contourIndex])
-
Reverses the direction of a path contour in the currently selected element.
The contour will only be reversed if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description elementBIM.Element <optional>
The element to reverse the contour in, defaults to
currentElement.contourIndexnumber <optional>
The index of the path contour to reverse, defaults to
currentContourIndex.Returns:
Returns true if the contour was successfully reversed.
- Type
- boolean
-
selectAperture(element, aperture)
-
Selects the given aperture in the given element.
Parameters:
Name Type Description elementBIM.Element The element containing the aperture.
apertureBIM.Aperture The aperture to select.
Returns:
Returns true if the selected aperture changed.
- Type
- boolean
-
selectApertureByIndex(element, contour_index, junction_index, aperture_index)
-
Selects the aperture at the given index in the given junction in the given element.
Parameters:
Name Type Description elementBIM.Element The element containing the aperture to select.
contour_indexArray The ordinal index of the contour in the element path.
junction_indexnumber The ordinal index of the start junction in the path contour.
aperture_indexnumber The ordinal index of the junction's aperture to select.
Returns:
Returns true if the selected aperture changed.
- Type
- boolean
-
selectCurrent()
-
Deselects just the current item and removes any extended selection.
Returns:
Returns true if the selection changed, otherwise false.
- Type
- boolean
-
selectElement(element, force)
-
Selects the given element within the model.
Parameters:
Name Type Description elementBIM.Element The new element to select, or null.
forceboolean Forces a (re)selection even if already selected.
Returns:
Returns true if the selected element changed.
- Type
- boolean
-
selectElements(elements)
-
Selects an array of elements within the model.
If the level that owns the element(s) is not current, it will be made the currently selected level.
Parameters:
Name Type Description elementsArray.<BIM.Element> The array of elements to select.
Returns:
Returns true if the selection set changed.
- Type
- boolean
-
selectExpand(toggle)
-
Selects all junctions in the current contour or all apertures in the current junction.
Parameters:
Name Type Description toggleboolean Whether or not to toggle select all or select current.
Returns:
Returns true if the selection changed, otherwise false.
- Type
- boolean
-
selectJunction(element, contour_index, junction_index)
-
Selects the given junction in the given element within the model.
Parameters:
Name Type Description elementBIM.Element The element containing the selected junction.
contour_indexArray The ordinal index of the contour in the element path.
junction_indexnumber The ordinal index of the junction in the path contour.
Returns:
Returns true if the selected junction changed.
- Type
- boolean
-
selectNextAperture( [backwards])
-
Increments the selected path aperture within the current element.
Parameters:
Name Type Argument Default Description backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns true is the selected aperture changed.
- Type
- boolean
-
selectNextControlNode( [backwards])
-
Increments the selected control node within the current junction.
Parameters:
Name Type Argument Default Description backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns true is the selected control node changed.
- Type
- boolean
-
selectNextElement( [backwards])
-
Increments the selected element within the current model.
Parameters:
Name Type Argument Default Description backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns true is the selected element changed.
- Type
- boolean
-
selectNextJunction( [backwards])
-
Increments the selected path junction within the current element.
Parameters:
Name Type Argument Default Description backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns true is the selected junction changed.
- Type
- boolean
-
selectNextLevel( [backwards])
-
Increments the selected element within the current model.
Parameters:
Name Type Argument Default Description backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns true is the selected element changed.
- Type
- boolean
-
selectNextSegment( [backwards])
-
Increments the selected path segment within the current element.
Parameters:
Name Type Argument Default Description backwardsboolean <optional>
false Whether or not to go backwards, defaults to false.
Returns:
Returns true is the selected segment changed.
- Type
- boolean
-
selectSegment(element, contour_index, junction_index)
-
Selects the path segment starting at the given junction in the given element.
Parameters:
Name Type Description elementBIM.Element The element containing the selected segment.
contour_indexArray The ordinal index of the contour in the element path.
junction_indexnumber The ordinal index of the start junction in the path contour.
Returns:
Returns true if the selected segment changed.
- Type
- boolean
-
setCurrentElement(element)
-
Sets the current element, clearing any previous selection flags.
Parameters:
Name Type Description elementBIM.Element | null The new element to set as current.
-
setMeshColors(dark)
-
Sets the colors of selection meshes when dark mode changes.
Parameters:
Name Type Description darkboolean The state of dark mode.
-
setPreselectionDisplayOffset( [offset])
-
Sets the offset display vector for the pre selection mesh.
This is used when an element is selected on a different level to the current level, but we want to highlight it in place.
Parameters:
Name Type Argument Description offsetTHREE.Vector3 <optional>
The relative offset in model units, defaults to a zero vector.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setSelectedJunctionState(state)
-
Sets
selectedstate for all junctions in the current selection set.Parameters:
Name Type Description stateboolean The new selection state.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setSelection(selection)
-
Sets the current selection from the given selection data.
Parameters:
Name Type Description selectionPD.Selection The interactive selection accumulator.
Returns:
Returns true if currently selected item(s) changed.
- Type
- boolean
-
setSelectionCurveFlags(smooth, symmetric)
-
Applies a new curve type to the current selection set.
Parameters:
Name Type Description smoothboolean Whether or not a curve is smooth at the junction.
symmetricboolean Whether or not control points are symmetrical about the junction.
Returns:
Returns true if any element's junctions were changed.
- Type
- boolean
-
setSelectionCurveType(curveType)
-
Applies a new curve type to the current selection set.
Parameters:
Name Type Description curveTypePD.CURVE The new curve type to apply to the selection.
Returns:
Returns true if any junction was changed.
- Type
- boolean
-
setSelectionHierarchy()
-
Checks if the hierarchy of selection has changed.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserMode(user_mode [, flag])
-
Set a new user interaction mode.
These modes include editing element paths and shells on the current level as well as taking measurements and adjusting background image and grid extents.
Parameters:
Name Type Argument Description user_modePD.MODE The new user mode.
flagPD.MODE <optional>
An optional flag used when exiting/entering
ADDmode.Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeAdd()
-
Sets the interactive edit mode to add a new element.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeEdit()
-
Sets the interactive edit mode to the default interactive model edit.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeMeasure()
-
Sets the interactive edit mode to measuring the model.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeMove()
-
Sets the interactive edit mode to moving the selection.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeOrigin()
-
Sets the interactive edit mode to set a point position.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeRect(rect_mode)
-
Begins the process of interactively editing a flat rect.
Parameters:
Name Type Description rect_modePD.RECT_MODE Defines what flat rect to edit (0:Image, 1:Grid).
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeRotate()
-
Sets the interactive edit mode to rotating the selection.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
setUserModeScale()
-
Sets the interactive edit mode to scaling the selection.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
shufflePathContour(direction [, element] [, contourIndex])
-
Shuffles the vertices a path contour in the currently selected element.
The contour will only be shuffled if a valid path-based element is currently selected.
Parameters:
Name Type Argument Description directionnumber The direction of shuffle (1:Forwards/Right, -1:Backwards/Left).
elementBIM.Element <optional>
The element to reverse the contour in, defaults to
currentElement.contourIndexnumber <optional>
The index of the path contour to reverse, defaults to
currentContourIndex.Returns:
Returns true if the contour was successfully reversed.
- Type
- boolean
-
snapToClosestHoverPoint(cursor [, selection])
-
Check for the closest point to the given interactive cursor.
This method is used to determine if the cursor is directly over a point in the model. When in plan view, proximity calculations can be done much faster than in 3D model view, which must use the scene's raycaster.
Parameters:
Name Type Argument Default Description cursorPD.Cursor The interactive cursor.
selectionPD.SelectionSet | BIM.Element <optional>
null The current selection set or element, defaults to null.
Returns:
Returns true if a point in the model was found and the selection updated, otherwise false.
- Type
- boolean
-
storeKeyDownState(event)
-
Store key down states at the start of an interaction.
Parameters:
Name Type Description eventEvent The DOM event to state read from.
-
update()
-
Regenerates current selection highlighting in the scene.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
updateAfterSelectionChange()
-
Updates the selection set after an undo/redo or major model change.
-
updateCursorOrientation(orientation)
-
Updates the
cursorPointorientation manipulator angle.Parameters:
Name Type Description orientationnumber The orientation angle in radians.
-
updateCursorPosition(cursor [, position])
-
Updates the cursor position and triggers UI update.
If no position argument is given, this just updates the UI.
Parameters:
Name Type Argument Description cursorPD.Cursor The cursor to set the position of.
positionTHREE.Vector3 <optional>
The new cursor position.
-
updateCursors()
-
Updates cursors when a view or element property changes.
-
updateDisplayedDimensions()
-
Regenerates dimension lines for the current mode, if any.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
updateHierarchy(selection)
-
Regenerates current hierarchy highlighting.
Parameters:
Name Type Description selectionPD.SELECTED The type of selection to update.
Returns:
Returns this selection manager to support method chaining.
- Type
- PD.SelectionManager
-
updatePreSelection(selection)
-
Visually highlights the given selection using the pre-selection mesh.
Parameters:
Name Type Description selectionPD.Selection The interactive selection accumulator.
-
useCursorAperture(aperture)
-
Initialises and sets
cursorApertureas the current cursor.Parameters:
Name Type Description apertureBIM.Aperture The selected aperture.
-
useCursorElement(element, junction, point)
-
Initialises and sets
cursorElementas the current cursor.Parameters:
Name Type Description elementBIM.Element The selected element.
junctionBIM.Junction The selected junction.
pointPD.Point The point at which to position the cursor.
-
useCursorPoint(element, junction, point)
-
Initialises and sets
cursorPointas the current cursor.Parameters:
Name Type Description elementBIM.Element The selected element.
junctionBIM.Junction The selected junction.
pointPD.Point The point at which to position the cursor.
-
useCursorSegment(element, junction, point)
-
Initialises and sets
cursorSegmentas the current cursor.Parameters:
Name Type Description elementBIM.Element The selected element.
junctionBIM.Junction The selected junction.
pointPD.Point The point at which to position the cursor.
-
useCursorVector(element, junction, point)
-
Initialises and sets
cursorVectoras the current cursor.Parameters:
Name Type Description elementBIM.Element The selected element.
junctionBIM.Junction The selected junction.
pointPD.Point The point at which to position the cursor.