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.
protected var _entities:Vector.<Entity>
protected var _hasCollisions:Boolean
protected var _numEntities:uint
public function RaycastPicker(findClosestCollision:Boolean)
Creates a new RaycastPicker
object.
Parameters | findClosestCollision:Boolean — Determines whether the picker searches for the closest bounds collision along the ray,
or simply returns the first collision encountered Defaults to false.
|
public function getSceneCollision(position:Vector3D, direction:Vector3D, scene:Scene3D):PickingCollisionVO
Gets the collision object from the scene position and direction of the picking ray.
Parameters
| position:Vector3D — The position of the picking ray in scene-space.
|
|
| direction:Vector3D — The direction of the picking ray in scene-space.
|
|
| scene:Scene3D — The scene on which the picking object acts.
|
Returns public function getViewCollision(x:Number, y:Number, view:View3D):PickingCollisionVO
Gets the collision object from the screen coordinates of the picking ray.
Parameters
| x:Number — The x coordinate of the picking ray in screen-space.
|
|
| y:Number — The y coordinate of the picking ray in screen-space.
|
|
| view:View3D — The view on which the picking object acts.
|
Returns
Thu Nov 15 2012, 12:08 PM Z