org.xith3d.picking
Interface GeometryPickTester

All Known Implementing Classes:
DefaultGeometryPickTester

public interface GeometryPickTester

Geometry-ray intersection test is accessed by PickingLibrary trough this interface instead of an internal method to make it replaceable.


Method Summary
 float testGeometryIntersection(PickResult pickCandidate, org.openmali.vecmath2.Ray3f pickRay, float closestIntersection, boolean testIntersectionsInWorldSpace, org.openmali.spatial.polygons.Triangle bufferTriangle)
          Test the candidate's geometry for ray intersection.
 

Method Detail

testGeometryIntersection

float testGeometryIntersection(PickResult pickCandidate,
                               org.openmali.vecmath2.Ray3f pickRay,
                               float closestIntersection,
                               boolean testIntersectionsInWorldSpace,
                               org.openmali.spatial.polygons.Triangle bufferTriangle)
Test the candidate's geometry for ray intersection. Implementations must set the minimumDistance or the pickCandidate!

Parameters:
pickCandidate - the cadidate PickResult, which's geometry is tested for ray intersection
pickRay - the transformed pick ray
closestIntersection - the closest so far intersection (for optimizations)
testIntersectionsInWorldSpace - whether or not to test picking intersections in world space
bufferTriangle -
Returns:
the distance of the intersection or <0 for no intersection