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.


Can be created using method new:

Lib.Away3D.Core.Pick.ShaderPicker.new()

Creates a new ShaderPicker object.



Created ShaderPicker object has methods:

dispose()



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)


properties:

onlyMouseEnabled

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

Created with the Personal Edition of HelpNDoc: Free Web Help generator