de.jreality.scene.pick
Class AABBPickSystem
java.lang.Object
de.jreality.scene.pick.AABBPickSystem
- All Implemented Interfaces:
- PickSystem
public class AABBPickSystem
- extends Object
- implements PickSystem
Our pick system implementation. Uses Brute-force as default
and AABBTrees if available.
- Author:
- Steffen Weissmann
AABBPickSystem
public AABBPickSystem()
setSceneRoot
public void setSceneRoot(SceneGraphComponent root)
- Specified by:
setSceneRoot
in interface PickSystem
computePick
public List<PickResult> computePick(double[] f,
double[] t)
- Description copied from interface:
PickSystem
- The parameters need to be homogenious coordinates.
- Specified by:
computePick
in interface PickSystem
- Parameters:
f
- foot point of ray in world coordinatest
- end point of ray in world coordinates (can be at infinity)
Valid pick points are of the form p = a*from+b*to where a*b >= 0
That is, the affine coordinate (b/a) of p on the line with basis (from,to) is non-negative
- Returns:
- list of PickResults sorted by distance from foot point
getFrustumInterval
public static void getFrustumInterval(double[] from,
double[] to,
Viewer viewer)
filterList
public static void filterList(HitFilter hf,
double[] from,
double[] to,
List<PickResult> list)