Options
Menu

Class RaycastPicker

Picks a 3d object from a view or scene by 3D raycast calculations. Performs an initial coarse boundary calculation to return a subset of entities whose bounding volumes intersect with the specified ray, then triggers an optional picking collider on individual renderable objects to further determine the precise values of the picking ray collision.

class

away.pick.RaycastPicker

Hierarchy

  • TraverserBase

Implements

Index

Constructors

constructor

  • new RaycastPicker(findClosestCollision?: boolean): RaycastPicker
  • Creates a new RaycastPicker object.

    Parameters

    • Default value findClosestCollision: boolean = false

      Determines whether the picker searches for the closest bounds collision along the ray, or simply returns the first collision encountered. Defaults to false.

    Returns RaycastPicker

Properties

onlyMouseEnabled

onlyMouseEnabled: boolean

Determines whether the picker takes account of the mouseEnabled properties of entities. Defaults to true.

Static entityNames

entityNames: Array<string>

Static renderableNames

renderableNames: Array<string>

Methods

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add an event listener

    method

    addEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

applyBillboard

  • applyBillboard(billboard: Billboard): void
  • Parameters

    • billboard: Billboard

    Returns void

applyDirectionalLight

  • applyDirectionalLight(entity: IEntity): void
  • Parameters

    • entity: IEntity

    Returns void

applyEntity

  • applyEntity(entity: IEntity): void
  • Parameters

    • entity: IEntity

    Returns void

applyLightProbe

  • applyLightProbe(entity: IEntity): void
  • Parameters

    • entity: IEntity

    Returns void

applyLineShape

  • applyLineShape(shape: Shape): void
  • Parameters

    • shape: Shape

    Returns void

applyPointLight

  • applyPointLight(entity: IEntity): void
  • Parameters

    • entity: IEntity

    Returns void

applyRenderable

  • applyRenderable(renderable: IRenderable): void
  • Parameters

    • renderable: IRenderable

    Returns void

applySkybox

  • applySkybox(entity: IEntity): void
  • Parameters

    • entity: IEntity

    Returns void

applyTriangleShape

  • applyTriangleShape(shape: Shape): void
  • Parameters

    • shape: Shape

    Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void
  • Returns void

enterNode

  • enterNode(node: INode): boolean
  • Returns true if the current node is at least partly in the frustum. If so, the partition node knows to pass on the traverser to its children.

    Parameters

    • node: INode

      The Partition3DNode object to frustum-test.

    Returns boolean

getCollision

  • getCollision(rayPosition: Vector3D, rayDirection: Vector3D, view: View): PickingCollision
  • Gets the collision object from the scene position and direction of the picking ray.

    Parameters

    • rayPosition: Vector3D
    • rayDirection: Vector3D
    • view: View

    Returns PickingCollision

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Remove an event listener

    method

    removeEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

setIgnoreList

  • setIgnoreList(entities: Array<IEntity>): void
  • Parameters

    • entities: Array<IEntity>

    Returns void

Static addEntityName

  • addEntityName(name: string): string
  • Parameters

    • name: string

    Returns string

Static addRenderableName

  • addRenderableName(name: string): string
  • Parameters

    • name: string

    Returns string

Generated using TypeDoc