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 entity objects to further determine the precise values of the picking ray collision.


Can be created using method new:

Lib.Away3D.Core.Pick.RaycastPicker.new(findClosestCollision)

Creates a new RaycastPicker object.

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


Created RaycastPicker object has properties:

onlyMouseEnabled

Determines whether the picker takes account of the mouseEnabled properties of entities. Boolean


methods:

dispose()



getEntityCollision(position, direction, entities)

Returns (PickingCollisionVO)

position - (Vector3D)

direction - (Vector3D)

entities - Vector array of (Entity)

getSceneCollision(position, direction, scene)

Gets the collision object from the scene position and direction of the picking ray. Returns (PickingCollisionVO)

position - The position of the picking ray in scene-space. (Vector3D)

direction - The direction of the picking ray in scene-space. (Vector3D)

scene - The scene on which the picking object acts. (Scene3D)

getViewCollision(x, y, view)

Gets the collision object from the screen coordinates of the picking ray. Returns (PickingCollisionVO)

x - The x coordinate of the picking ray in screen-space. 

y - The y coordinate of the picking ray in screen-space.

view - The view on which the picking object acts. (View3D)

setIgnoreList(entities)


entities - Array of (Entity)

Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files