Aviatrix3D
2.1.0

org.j3d.aviatrix3d.picking
Interface LeafPickTarget

All Superinterfaces:
PickTarget
All Known Implementing Classes:
BitmapRaster, BufferGeometry, ByteRaster, Geometry, ImageRaster, IndexedBufferGeometry, IndexedLineArray, IndexedLineArray, IndexedLineStripArray, IndexedLineStripArray, IndexedQuadArray, IndexedQuadArray, IndexedQuadStripArray, IndexedQuadStripArray, IndexedTriangleArray, IndexedTriangleArray, IndexedTriangleFanArray, IndexedTriangleFanArray, IndexedTriangleStripArray, IndexedTriangleStripArray, IndexedVertexGeometry, LineArray, LineArray, LineStripArray, LineStripArray, PointArray, PointArray, QuadArray, QuadArray, QuadStripArray, QuadStripArray, Raster, SortedPointArray, Teapot, Text2D, TriangleArray, TriangleArray, TriangleFanArray, TriangleFanArray, TriangleStripArray, TriangleStripArray, VertexGeometry

public interface LeafPickTarget
extends PickTarget

A picking target that represents real geometry that must be picked directly against using one of a couple of specific intersection tests.

This class is called for picking resolution when there is a specific requirement for picking against the real geometry rather than just the bounds of the containing shape. Bounds picks are simple and relatively fast, taken care of by the checkPickBounds() method. If that has passed then the methods in this interface will be directly called if the pick request asks for them.

Examples of this would be any form of polygonal geometry.

Implementor Guidelines

When the methods are called on this interface you can assume that the bounds have already been checked, so go straight into the polygonal processing.

Version:
$Revision: 1.1 $
Author:
Justin Couch

Field Summary
 
Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE
 
Method Summary
 boolean pickLineRay(float[] origin, float[] direction, boolean findAny, float[] dataOut, int dataOutFlags)
          Check for all intersections against this geometry using a line ray and return the exact distance away of the closest picking point.
 boolean pickLineSegment(float[] start, float[] end, boolean findAny, float[] dataOut, int dataOutFlags)
          Check for all intersections against this geometry using a line segment and return the exact distance away of the closest picking point.
 
Methods inherited from interface org.j3d.aviatrix3d.picking.PickTarget
checkPickMask, getPickableBounds, getPickTargetType
 

Method Detail

pickLineSegment

boolean pickLineSegment(float[] start,
                        float[] end,
                        boolean findAny,
                        float[] dataOut,
                        int dataOutFlags)
                        throws NotPickableException
Check for all intersections against this geometry using a line segment and return the exact distance away of the closest picking point. Default implementation always returns false indicating that nothing was found. Derived classes should override and provide a real implementation.

Parameters:
start - The start point of the segment
end - The end point of the segment
findAny - True if it only has to find a single intersection and can exit as soon as it finds the first intersection. False if it must find the closest polygon
dataOut - An array to put the data in for the intersection. Exact format is described by the flags
dataOutFlags - A set of derived-class specific flags describing what data should be included in the output array
Returns:
True if an intersection was found according to the input request
Throws:
NotPickableException - This object has been marked as non pickable, but you decided to try to call the method anyway

pickLineRay

boolean pickLineRay(float[] origin,
                    float[] direction,
                    boolean findAny,
                    float[] dataOut,
                    int dataOutFlags)
                    throws NotPickableException
Check for all intersections against this geometry using a line ray and return the exact distance away of the closest picking point. Default implementation always returns false indicating that nothing was found. Derived classes should override and provide a real implementation.

Parameters:
origin - The start point of the ray
direction - The direction vector of the ray
findAny - True if it only has to find a single intersection and can exit as soon as it finds the first intersection. False if it must find the closest polygon
dataOut - An array to put the data in for the intersection. Exact format is described by the flags
dataOutFlags - A set of derived-class specific flags describing what data should be included in the output array
Returns:
True if an intersection was found according to the input request
Throws:
NotPickableException - This object has been marked as non pickable, but you decided to try to call the method anyway

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org