IncrementalSelection
- class Communicator.Util.IncrementalSelection()
This class is a high-level wrapper over the various incremental selection operations that can be performed.
See also:
SelectionManager.prototype.beginScreenSelectByArea
SelectionManager.prototype.beginRayDrillSelection
SelectionManager.prototype.beginConvexPolyhedronSelection
SelectionManager.prototype.beginSphereSelection
SelectionManager.prototype.advanceIncrementalSelection
SelectionManager.prototype.endIncrementalSelection
View.prototype.beginScreenSelectByArea
View.prototype.beginRayDrillSelection
View.prototype.beginConvexPolyhedronSelection
View.prototype.beginSphereSelection
View.prototype.advanceIncrementalSelection
View.prototype.endIncrementalSelection
Interfaces
ConvexPolyhedronConfig()
RayDrillConfig()
ScreenByAreaConfig()
SphereConfig()
Type aliases
Methods
Type aliases
BeginConfig
Configuration object detailing how an incremental selection begins.
Mode
Determines whether or not selections are performed using the View
or the SelectionManager
Predicate
Type used for a selection predicate. The predicate is used to filter selection items.
Methods
clearSelection
- IncrementalSelection.clearSelection(this)
Stops and clears the selection.
- Arguments
this (
IncrementalSelection()
<’SelectionManager’>) –
- Return type
Promise <void>
- Returns
A
Promise
that resolves when completed.
isIdle
- IncrementalSelection.isIdle()
Returns whether or not this object has an active selection in progress.
- Return type
boolean
- Returns
true
if active andfalse
if idle.
performSelection
- IncrementalSelection.performSelection(this, beginConfig[, predicate])
Perform an incremental selection using the
SelectionManager
Selected objects will incrementally be added to the
SelectionManager
as the incremental selection progresses.- Arguments
this (
IncrementalSelection()
<’SelectionManager’>) –beginConfig (BeginConfig) –
predicate (Predicate | null) – optional
- Return type
Promise <void>
- Returns
A Promise that resolves when the selection has completed.
Selected objects will incrementally be added to the
SelectionManager
as the incremental selection progresses.
- IncrementalSelection.performSelection(this, beginConfig[, predicate])
Perform an incremental selection using the
View
- Arguments
this (
IncrementalSelection()
<’View’>) –beginConfig (BeginConfig) –
predicate (Predicate | null) – optional
- Return type
Promise <[
NodeSelectionItem()
]>- Returns
A Promise of all selected items when selection has completed.
- IncrementalSelection.performSelection(this, beginConfig, predicate, outItems)
Perform an incremental selection using the
View
Selected objects will incrementally be added to the
outItems
argument as the incremental selection progresses.- Arguments
this (
IncrementalSelection()
<’View’>) –beginConfig (BeginConfig) –
predicate (Predicate | null | undefined) –
outItems ([
NodeSelectionItem()
]) –
- Return type
Promise <[
NodeSelectionItem()
]>- Returns
A Promise that resolves to
outItems
when selection has completed.
Selected objects will incrementally be added to the
outItems
argument as the incremental selection progresses.
- IncrementalSelection.performSelection(this, beginConfig[, predicate])
- Arguments
this (
IncrementalSelection()
<Mode>) –beginConfig (BeginConfig) –
predicate (Predicate | null) – optional
- Return type
Promise <void | [
NodeSelectionItem()
]>
stopSelection
- IncrementalSelection.stopSelection()
Stops the selection.
- Return type
Promise <void>
- Returns
A
Promise
that resolves when completed.
waitForIdle
- IncrementalSelection.waitForIdle()
Used to wait for this object to become idle.
- Return type
Promise <void>
- Returns
A promise that resolves when this becomes idle.
static create
- IncrementalSelection.create(mode, viewer)
Creates a new
IncrementalSelection
object that can be used to perform incremental selections.- Arguments
mode (
M()
) – Controls whether or not selections are performed using theView
or theSelectionManager
viewer (
WebViewer()
) – TheWebViewer
of the scene.
- Return type
- Returns
The created
IncrementalSelection
object.
static isConvexPolyhedronConfig
- IncrementalSelection.isConvexPolyhedronConfig(config)
Determines if the input
BeginConfig
is aConvexPolyhedronConfig
.- Arguments
config (BeginConfig) – The config to test.
- Return type
config
- Returns
true
ifconfig
is aConvexPolyhedronConfig
andfalse
otherwise.
static isRayDrillConfig
- IncrementalSelection.isRayDrillConfig(config)
Determines if the input
BeginConfig
is aRayDrillConfig
.- Arguments
config (BeginConfig) – The config to test.
- Return type
config
- Returns
true
ifconfig
is aRayDrillConfig
andfalse
otherwise.
static isScreenByAreaConfig
- IncrementalSelection.isScreenByAreaConfig(config)
Determines if the input
BeginConfig
is aScreenByAreaConfig
.- Arguments
config (BeginConfig) – The config to test.
- Return type
config
- Returns
true
ifconfig
is aScreenByAreaConfig
andfalse
otherwise.
static isSphereConfig
- IncrementalSelection.isSphereConfig(config)
Determines if the input
BeginConfig
is aSphereConfig
.- Arguments
config (BeginConfig) – The config to test.
- Return type
config
- Returns
true
ifconfig
is aSphereConfig
andfalse
otherwise.