Packageaway3d.core.pick
Classpublic class RaycastPicker
InheritanceRaycastPicker Inheritance Object
Implements IPicker

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.



Public Properties
 PropertyDefined By
  onlyMouseEnabled : Boolean
Determines whether the picker takes account of the mouseEnabled properties of entities.
RaycastPicker
Protected Properties
 PropertyDefined By
  _entities : Vector.<Entity>
RaycastPicker
  _hasCollisions : Boolean
RaycastPicker
  _numEntities : uint
RaycastPicker
Public Methods
 MethodDefined By
  
RaycastPicker(findClosestCollision:Boolean)
Creates a new RaycastPicker object.
RaycastPicker
  
dispose():void
RaycastPicker
  
getEntityCollision(position:Vector3D, direction:Vector3D, entities:Vector.<Entity>):PickingCollisionVO
RaycastPicker
  
getSceneCollision(position:Vector3D, direction:Vector3D, scene:Scene3D):PickingCollisionVO
Gets the collision object from the scene position and direction of the picking ray.
RaycastPicker
  
getViewCollision(x:Number, y:Number, view:View3D):PickingCollisionVO
Gets the collision object from the screen coordinates of the picking ray.
RaycastPicker
  
setIgnoreList(entities:Array):void
RaycastPicker
Property Detail
_entitiesproperty
protected var _entities:Vector.<Entity>

_hasCollisionsproperty 
protected var _hasCollisions:Boolean

_numEntitiesproperty 
protected var _numEntities:uint

onlyMouseEnabledproperty 
onlyMouseEnabled:Boolean

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


Implementation
    public function get onlyMouseEnabled():Boolean
    public function set onlyMouseEnabled(value:Boolean):void
Constructor Detail
RaycastPicker()Constructor
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.
Method Detail
dispose()method
public function dispose():void

getEntityCollision()method 
public function getEntityCollision(position:Vector3D, direction:Vector3D, entities:Vector.<Entity>):PickingCollisionVO

Parameters

position:Vector3D
 
direction:Vector3D
 
entities:Vector.<Entity>

Returns
PickingCollisionVO
getSceneCollision()method 
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
PickingCollisionVO
getViewCollision()method 
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
PickingCollisionVO
setIgnoreList()method 
public function setIgnoreList(entities:Array):void

Parameters

entities:Array