Packageaway3d.core.pick
Classpublic class ShaderPicker
InheritanceShaderPicker Inheritance Object
Implements IPicker

Picks a 3d object from a view or scene by performing a separate render pass on the scene around the area being picked using key color values, then reading back the color value of the pixel in the render representing the picking ray. Requires multiple passes and readbacks for retriving details on an entity that has its shaderPickingDetails property set to true. A read-back operation from any GPU is not a very efficient process, and the amount of processing used can vary significantly between different hardware.

See also

away3d.entities.Entity.shaderPickingDetails


Public Methods
 MethodDefined By
  
Creates a new ShaderPicker object.
ShaderPicker
  
getSceneCollision(position:Vector3D, direction:Vector3D, scene:Scene3D):PickingCollisionVO
Gets the collision object from the scene position and direction of the picking ray.
ShaderPicker
  
getViewCollision(x:Number, y:Number, view:View3D):PickingCollisionVO
Gets the collision object from the screen coordinates of the picking ray.
ShaderPicker
Protected Methods
 MethodDefined By
  
draw(entityCollector:EntityCollector, target:TextureBase):void
ShaderPicker
Constructor Detail
ShaderPicker()Constructor
public function ShaderPicker()

Creates a new ShaderPicker object.

Method Detail
draw()method
protected function draw(entityCollector:EntityCollector, target:TextureBase):void

Parameters

entityCollector:EntityCollector
 
target:TextureBase

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