NGL@0.10.4 Home Manual Reference Source GalleryRepository
import {Picker} from 'ngl/src/utils/picker.js'
public interface | source

Picker

Direct Subclass:

src/utils/picker.js~AtomPicker, src/utils/picker.js~AxesPicker, src/utils/picker.js~BondPicker, src/utils/picker.js~ClashPicker, src/utils/picker.js~IgnorePicker, ShapePicker, src/utils/picker.js~SurfacePicker, src/utils/picker.js~UnitcellPicker, src/utils/picker.js~UnknownPicker, src/utils/picker.js~VolumePicker

Indirect Subclass:

src/utils/picker.js~ArrowPicker, src/utils/picker.js~ConePicker, src/utils/picker.js~ContactPicker, src/utils/picker.js~CylinderPicker, src/utils/picker.js~DistancePicker, src/utils/picker.js~EllipsoidPicker, src/utils/picker.js~MeshPicker, src/utils/picker.js~SlicePicker, src/utils/picker.js~SpherePicker

Picker class

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

Get the index for the given picking id

public abstract

Get object data

public

getPosition(pid: Integer, instance: Object, component: Component): Vector3

Get position for the given picking id

Public Constructors

public constructor(array: Array | TypedArray) source

Params:

NameTypeAttributeDescription
array Array | TypedArray
  • optional

mapping

Public Methods

public getIndex(pid: Integer): Integer source

Get the index for the given picking id

Params:

NameTypeAttributeDescription
pid Integer

the picking id

Return:

Integer

the index

public abstract getObject(pid: Integer): Object source

Get object data

Params:

NameTypeAttributeDescription
pid Integer

the picking id

Return:

Object

the object data

public getPosition(pid: Integer, instance: Object, component: Component): Vector3 source

Get position for the given picking id

Params:

NameTypeAttributeDescription
pid Integer

the picking id

instance Object

the instance that should be applied

component Component

the component of the picked object

Return:

Vector3

the position