Reference Source
public class | source

PickResult

Pick result returned by Scene#pick.

Member Summary

Public Members
public get

Barycentric coordinate within picked triangle.

public get

Canvas pick coordinates.

public get

World-space 3D ray direction when raypicked.

public

entity: Entity | *

Picked entity.

public get

Picked triangle's vertex indices.

public get

Picked Local-space point.

public get

World-space 3D ray origin when raypicked.

public

True when the picked surface position is full precision.

public

Index of primitive that was picked.

public

Type of primitive that was picked - usually "triangle".

public get

True if snapped to edge or vertex.

public get

Canvas cursor coordinates, snapped when snap picking, otherwise same as PickResult#pointerPos.

public

True when snapped to nearest edge.

public

True when snapped to nearest vertex.

public

True when picked from touch input, else false when from mouse input.

public get

uv: Number[]

UV coordinates at picked position on surface.

public get

Picked View-space point.

public get

Normal vector at picked position on surface.

public get

Picked World-space point.

Public Members

public get bary: Number[] source

Barycentric coordinate within picked triangle.

Properties:

NameTypeAttributeDescription
bary *

public get canvasPos: Number[] source

Canvas pick coordinates.

Properties:

NameTypeAttributeDescription
canvasPos *

public get direction: Number[] source

World-space 3D ray direction when raypicked.

Properties:

NameTypeAttributeDescription
direction *

public entity: Entity | * source

Picked entity. Null when no entity was picked.

Properties:

NameTypeAttributeDescription
entity *

public get indices: Int32Array source

Picked triangle's vertex indices.

Properties:

NameTypeAttributeDescription
indices *

public get localPos: Number[] source

Picked Local-space point.

Properties:

NameTypeAttributeDescription
localPos *

public get origin: Number[] source

World-space 3D ray origin when raypicked.

Properties:

NameTypeAttributeDescription
origin *

public pickSurfacePrecision: Boolean source

True when the picked surface position is full precision. When false, the picked surface position should be regarded as approximate. Full-precision surface picking is performed with the Scene#pick method's pickSurfacePrecision option.

Properties:

NameTypeAttributeDescription
pickSurfacePrecision *

public primIndex: number source

Index of primitive that was picked. -1 when no entity was picked.

Properties:

NameTypeAttributeDescription
primIndex *

public primitive: String source

Type of primitive that was picked - usually "triangle". Null when no primitive was picked.

Properties:

NameTypeAttributeDescription
primitive *

public get snapped: boolean: * source

True if snapped to edge or vertex.

Return:

boolean

public get snappedCanvasPos: Number[] source

Canvas cursor coordinates, snapped when snap picking, otherwise same as PickResult#pointerPos.

Properties:

NameTypeAttributeDescription
snappedCanvasPos *

public snappedToEdge: boolean source

True when snapped to nearest edge.

public snappedToVertex: boolean source

True when snapped to nearest vertex.

public touchInput: boolean source

True when picked from touch input, else false when from mouse input.

public get uv: Number[] source

UV coordinates at picked position on surface.

Properties:

NameTypeAttributeDescription
uv *

public get viewPos: Number[] source

Picked View-space point.

Properties:

NameTypeAttributeDescription
viewPos *

public get worldNormal: Number[] source

Normal vector at picked position on surface.

Properties:

NameTypeAttributeDescription
worldNormal *

public get worldPos: Number[] source

Picked World-space point.

Properties:

NameTypeAttributeDescription
worldPos *