Packageaway3d.core.pick
Classpublic class PBPickingCollider
InheritancePBPickingCollider Inheritance PickingColliderBase Inheritance Object
Implements IPickingCollider

PixelBender-based picking collider for entity objects. Used with the RaycastPicker picking object.

See also

away3d.entities.Entity.pickingCollider
away3d.core.pick.RaycastPicker


Protected Properties
 PropertyDefined By
 InheritedrayDirection : Vector3D
PickingColliderBase
 InheritedrayPosition : Vector3D
PickingColliderBase
Public Methods
 MethodDefined By
  
PBPickingCollider(findClosestCollision:Boolean = false)
Creates a new PBPickingCollider object.
PBPickingCollider
  
setLocalRay(localPosition:Vector3D, localDirection:Vector3D):void
[override] Sets the position and direction of a picking ray in local coordinates to the entity.
PBPickingCollider
  
testSubMeshCollision(subMesh:SubMesh, pickingCollisionVO:PickingCollisionVO, shortestCollisionDistance:Number):Boolean
Tests a SubMesh object for a collision with the picking ray.
PBPickingCollider
Protected Methods
 MethodDefined By
 Inherited
getCollisionNormal(indexData:Vector.<uint>, vertexData:Vector.<Number>, triangleIndex:uint):Vector3D
PickingColliderBase
 Inherited
getCollisionUV(indexData:Vector.<uint>, uvData:Vector.<Number>, triangleIndex:uint, v:Number, w:Number, u:Number):Point
PickingColliderBase
Constructor Detail
PBPickingCollider()Constructor
public function PBPickingCollider(findClosestCollision:Boolean = false)

Creates a new PBPickingCollider object.

Parameters
findClosestCollision:Boolean (default = false) — Determines whether the picking collider searches for the closest collision along the ray. Defaults to false.
Method Detail
setLocalRay()method
override public function setLocalRay(localPosition:Vector3D, localDirection:Vector3D):void

Sets the position and direction of a picking ray in local coordinates to the entity.

Parameters

localPosition:Vector3D — The position vector in local coordinates
 
localDirection:Vector3D — The direction vector in local coordinates

testSubMeshCollision()method 
public function testSubMeshCollision(subMesh:SubMesh, pickingCollisionVO:PickingCollisionVO, shortestCollisionDistance:Number):Boolean

Tests a SubMesh object for a collision with the picking ray.

Parameters

subMesh:SubMesh — The SubMesh instance to be tested.
 
pickingCollisionVO:PickingCollisionVO — The collision object used to store the collision results
 
shortestCollisionDistance:Number — The current value of the shortest distance to a detected collision along the ray.

Returns
Boolean