org.xith3d.picking
Class DefaultGeometryPickTester
java.lang.Object
org.xith3d.picking.DefaultGeometryPickTester
- All Implemented Interfaces:
- GeometryPickTester
public class DefaultGeometryPickTester
- extends java.lang.Object
- implements GeometryPickTester
Geometry-ray intersection test is accessed by PickingLibrary trough an
interface instead of an internal method to make it replaceable.
This is the default implementation.
|
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultGeometryPickTester
public DefaultGeometryPickTester()
testGeometryIntersection
public 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!
- Specified by:
testGeometryIntersection in interface GeometryPickTester
- Parameters:
pickCandidate - the cadidate PickResult, which's geometry is tested for ray intersectionpickRay - the transformed pick rayclosestIntersection - the closest so far intersection (for optimizations)testIntersectionsInWorldSpace - whether or not to test picking intersections in world space
- Returns:
- the distance of the intersection or <0 for no intersection