Home Reference Source Repository
import {ObjectSelector} from 'awv3/src/session/selection/objectselector.js'
public class | source

ObjectSelector

Constructor Summary

Public Constructor
public

constructor(session: *, options: *)

Member Summary

Public Members
public

element: *

public
public

session: *

public
public
public

Method Summary

Public Methods
public

activate(element: *)

Activates the object-selector.

public

add(event: RayCast-Hit): *

Add object to the set of selected elements

public

clicked(event: *)

Called by selector when event is triggered.

public

deactivate(element: *)

Deactivates the object-selector.

public

Returns the selected elements in an array

public

Returns the selected ids in an array

public

hover(event: *)

Called by selector when event is triggered.

public

isSelected(object: *): *

Check if object is already selected

public

missed(event: *)

Called by selector when event is triggered.

public

remove(event: RayCast-Hit)

Remove object from the set of selected elements

public

removeAll(keepLocals: Boolean)

Remove all items (three object) from the set of selected elements

public

rendered(event: *)

Called by selector when event is triggered.

public

select(object: *)

Highlight the selected object.

public

unhover(event: *)

Called by selector when event is triggered.

public

unselect(object: *)

Unighlight the object using hover material.

public

unselectElements(elements: array)

Removes the given elements from the current selection.

Public Constructors

public constructor(session: *, options: *) source

Params:

NameTypeAttributeDescription
session *
options *

Public Members

public element: * source

public selectedSet: * source

public session: * source

public shiftHandler: * source

public tempHandler: * source

public unobserve: * source

Public Methods

public activate(element: *) source

Activates the object-selector. The Given selection-element is observed in order to register changes when click-deleting labels. Handlers for rubberband selection are created.

Params:

NameTypeAttributeDescription
element *
  • optional

public add(event: RayCast-Hit): * source

Add object to the set of selected elements

Params:

NameTypeAttributeDescription
event RayCast-Hit

Object generated by the raycaster including the hit object, material and meta-information

Return:

*

public clicked(event: *) source

Called by selector when event is triggered.

Params:

NameTypeAttributeDescription
event *

public deactivate(element: *) source

Deactivates the object-selector. Observation of selection-element is stopped. Rubberband selection handlers are removed.

Params:

NameTypeAttributeDescription
element *
  • optional

public getSelectedElements(): * source

Returns the selected elements in an array

Return:

*

selectedElements - Array with the selected elements

public getSelectedIds(): * source

Returns the selected ids in an array

Return:

*

selectedIds - Array with the selected ids

public hover(event: *) source

Called by selector when event is triggered.

Params:

NameTypeAttributeDescription
event *

public isSelected(object: *): * source

Check if object is already selected

Params:

NameTypeAttributeDescription
object *

Return:

*

TRUE if selected, FALSE otherwise

public missed(event: *) source

Called by selector when event is triggered.

Params:

NameTypeAttributeDescription
event *

public remove(event: RayCast-Hit) source

Remove object from the set of selected elements

Params:

NameTypeAttributeDescription
event RayCast-Hit

Object generated by the raycaster including the hit object, material and meta-information

public removeAll(keepLocals: Boolean) source

Remove all items (three object) from the set of selected elements

Params:

NameTypeAttributeDescription
keepLocals Boolean

If true, selected ids are kept within the selection-element

public rendered(event: *) source

Called by selector when event is triggered.

Params:

NameTypeAttributeDescription
event *

public select(object: *) source

Highlight the selected object. Store original material for unhighlight.

Params:

NameTypeAttributeDescription
object *

public unhover(event: *) source

Called by selector when event is triggered.

Params:

NameTypeAttributeDescription
event *

public unselect(object: *) source

Unighlight the object using hover material.

Params:

NameTypeAttributeDescription
object *

public unselectElements(elements: array) source

Removes the given elements from the current selection.

Params:

NameTypeAttributeDescription
elements array

elements to be removed from the selection.