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


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
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 and false 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
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
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
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
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 the View or the SelectionManager

  • viewer (WebViewer()) – The WebViewer of the scene.

Return type

IncrementalSelection() <M>

Returns

The created IncrementalSelection object.

static isConvexPolyhedronConfig

IncrementalSelection.isConvexPolyhedronConfig(config)

Determines if the input BeginConfig is a ConvexPolyhedronConfig.

Arguments
Return type

config

Returns

true if config is a ConvexPolyhedronConfig and false otherwise.

static isRayDrillConfig

IncrementalSelection.isRayDrillConfig(config)

Determines if the input BeginConfig is a RayDrillConfig.

Arguments
Return type

config

Returns

true if config is a RayDrillConfig and false otherwise.

static isScreenByAreaConfig

IncrementalSelection.isScreenByAreaConfig(config)

Determines if the input BeginConfig is a ScreenByAreaConfig.

Arguments
Return type

config

Returns

true if config is a ScreenByAreaConfig and false otherwise.

static isSphereConfig

IncrementalSelection.isSphereConfig(config)

Determines if the input BeginConfig is a SphereConfig.

Arguments
Return type

config

Returns

true if config is a SphereConfig and false otherwise.