Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.util
Class AVIntersectionUtils

java.lang.Object
  extended by org.j3d.geom.IntersectionUtils
      extended by org.j3d.renderer.aviatrix3d.util.AVIntersectionUtils

public class AVIntersectionUtils
extends org.j3d.geom.IntersectionUtils

An extension of the basic IntersectionUtils class to include Aviatrix3D-specific extensions for interacting directly with VertexGeometry instances.

Version:
$Revision: 1.7 $
Author:
Justin Couch
See Also:
IntersectionUtils

Field Summary
 
Fields inherited from class org.j3d.geom.IntersectionUtils
pickDir, pickStart, wkPolygon, working2dCoords, workingCoords, workingIndicies, workingStrips, X_AXIS, Y_AXIS, Z_AXIS
 
Constructor Summary
AVIntersectionUtils()
          Create a default instance of this class with no internal data structures allocated.
 
Method Summary
 boolean rayQuadArray(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction, float length, QuadArray geom, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3d point, boolean intersectOnly)
          Test the intersection of a ray or segment against the given quad array.If there is an intersection, the point will contain the exact intersection point on the geometry.
 boolean rayTriangleArray(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction, float length, TriangleArray geom, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3d point, boolean intersectOnly)
          Test the intersection of a ray or segment against the given triangle array.If there is an intersection, the point will contain the exact intersection point on the geometry.
 boolean rayTriangleFanArray(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction, float length, TriangleFanArray geom, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3d point, boolean intersectOnly)
          Test the intersection of a ray or segment against the given triangle fan array.If there is an intersection, the point will contain the exact intersection point on the geometry.
 boolean rayTriangleStripArray(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction, float length, TriangleStripArray geom, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3d point, boolean intersectOnly)
          Test the intersection of a ray or segment against the given triangle strip array.If there is an intersection, the point will contain the exact intersection point on the geometry.
 boolean rayUnknownGeometry(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction, float length, org.j3d.geom.GeometryData data, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3d point, boolean intersectOnly)
          Convenience method to process a GeometryData and ask the intersection code to find out what the real geometry type is and process it appropriately.
 boolean rayUnknownGeometry(javax.vecmath.Point3d origin, javax.vecmath.Vector3d direction, float length, VertexGeometry geom, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3d point, boolean intersectOnly)
          Convenience method to pass in an item of geometry and ask the intersection code to find out what the real geometry type is and process it appropriately.
 boolean rayUnknownGeometry(javax.vecmath.Point3f origin, javax.vecmath.Vector3f direction, float length, org.j3d.geom.GeometryData data, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3f point, boolean intersectOnly)
          Convenience method to process a GeometryData and ask the intersection code to find out what the real geometry type is and process it appropriately.
 boolean rayUnknownGeometry(javax.vecmath.Point3f origin, javax.vecmath.Vector3f direction, float length, VertexGeometry geom, javax.vecmath.Matrix4f vworldTransform, javax.vecmath.Point3f point, boolean intersectOnly)
          Convenience method to pass in an item of geometry and ask the intersection code to find out what the real geometry type is and process it appropriately.
 boolean rayUnknownGeometry(javax.vecmath.Point3f origin, javax.vecmath.Vector3f direction, float length, VertexGeometry geom, javax.vecmath.Point3f point, boolean intersectOnly)
          Convenience method to pass in an item of geometry and ask the intersection code to find out what the real geometry type is and process it appropriately.
 
Methods inherited from class org.j3d.geom.IntersectionUtils
clear, rayCylinder, rayCylinder, rayIndexedQuadArray, rayIndexedTriangleArray, rayPlane, rayPlane, rayPolygon, rayQuadArray, raySphere, raySphere, rayTriangleArray, rayTriangleFanArray, rayTriangleStripArray, rayUnknownGeometry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVIntersectionUtils

public AVIntersectionUtils()
Create a default instance of this class with no internal data structures allocated.

Method Detail

rayUnknownGeometry

public boolean rayUnknownGeometry(javax.vecmath.Point3f origin,
                                  javax.vecmath.Vector3f direction,
                                  float length,
                                  VertexGeometry geom,
                                  javax.vecmath.Matrix4f vworldTransform,
                                  javax.vecmath.Point3f point,
                                  boolean intersectOnly)
Convenience method to pass in an item of geometry and ask the intersection code to find out what the real geometry type is and process it appropriately. If there is an intersection, the point will contain the exact intersection point on the geometry.

If the userData object for this geometry is an instance of GeometryData we will use that in preferences to the actual geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayUnknownGeometry

public boolean rayUnknownGeometry(javax.vecmath.Point3f origin,
                                  javax.vecmath.Vector3f direction,
                                  float length,
                                  VertexGeometry geom,
                                  javax.vecmath.Point3f point,
                                  boolean intersectOnly)
Convenience method to pass in an item of geometry and ask the intersection code to find out what the real geometry type is and process it appropriately. If there is an intersection, the point will contain the exact intersection point on the geometry.

If the userData object for this geometry is an instance of GeometryData we will use that in preferences to the actual geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayUnknownGeometry

public boolean rayUnknownGeometry(javax.vecmath.Point3f origin,
                                  javax.vecmath.Vector3f direction,
                                  float length,
                                  org.j3d.geom.GeometryData data,
                                  javax.vecmath.Matrix4f vworldTransform,
                                  javax.vecmath.Point3f point,
                                  boolean intersectOnly)
Convenience method to process a GeometryData and ask the intersection code to find out what the real geometry type is and process it appropriately. If there is an intersection, the point will contain the exact intersection point on the geometry.

This code will be much more efficient than the other version because we do not need to reallocate internal arrays all the time or have the need to set capability bits, hurting performance optimisations. If the geometry array does not understand the provided geometry type, it will silently ignore the request and always return false.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
data - The geometry to test against
point - The intersection point for returning
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayUnknownGeometry

public boolean rayUnknownGeometry(javax.vecmath.Point3d origin,
                                  javax.vecmath.Vector3d direction,
                                  float length,
                                  org.j3d.geom.GeometryData data,
                                  javax.vecmath.Matrix4f vworldTransform,
                                  javax.vecmath.Point3d point,
                                  boolean intersectOnly)
Convenience method to process a GeometryData and ask the intersection code to find out what the real geometry type is and process it appropriately. If there is an intersection, the point will contain the exact intersection point on the geometry.

This code will be much more efficient than the other version because we do not need to reallocate internal arrays all the time or have the need to set capability bits, hurting performance optimisations. If the geometry array does not understand the provided geometry type, it will silently ignore the request and always return false.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
data - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayUnknownGeometry

public boolean rayUnknownGeometry(javax.vecmath.Point3d origin,
                                  javax.vecmath.Vector3d direction,
                                  float length,
                                  VertexGeometry geom,
                                  javax.vecmath.Matrix4f vworldTransform,
                                  javax.vecmath.Point3d point,
                                  boolean intersectOnly)
Convenience method to pass in an item of geometry and ask the intersection code to find out what the real geometry type is and process it appropriately. If there is an intersection, the point will contain the exact intersection point on the geometry.

If the userData object for this geometry is an instance of GeometryData we will use that in preferences to the actual geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayTriangleArray

public boolean rayTriangleArray(javax.vecmath.Point3d origin,
                                javax.vecmath.Vector3d direction,
                                float length,
                                TriangleArray geom,
                                javax.vecmath.Matrix4f vworldTransform,
                                javax.vecmath.Point3d point,
                                boolean intersectOnly)
Test the intersection of a ray or segment against the given triangle array.If there is an intersection, the point will contain the exact intersection point on the geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayQuadArray

public boolean rayQuadArray(javax.vecmath.Point3d origin,
                            javax.vecmath.Vector3d direction,
                            float length,
                            QuadArray geom,
                            javax.vecmath.Matrix4f vworldTransform,
                            javax.vecmath.Point3d point,
                            boolean intersectOnly)
Test the intersection of a ray or segment against the given quad array.If there is an intersection, the point will contain the exact intersection point on the geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayTriangleStripArray

public boolean rayTriangleStripArray(javax.vecmath.Point3d origin,
                                     javax.vecmath.Vector3d direction,
                                     float length,
                                     TriangleStripArray geom,
                                     javax.vecmath.Matrix4f vworldTransform,
                                     javax.vecmath.Point3d point,
                                     boolean intersectOnly)
Test the intersection of a ray or segment against the given triangle strip array.If there is an intersection, the point will contain the exact intersection point on the geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

rayTriangleFanArray

public boolean rayTriangleFanArray(javax.vecmath.Point3d origin,
                                   javax.vecmath.Vector3d direction,
                                   float length,
                                   TriangleFanArray geom,
                                   javax.vecmath.Matrix4f vworldTransform,
                                   javax.vecmath.Point3d point,
                                   boolean intersectOnly)
Test the intersection of a ray or segment against the given triangle fan array.If there is an intersection, the point will contain the exact intersection point on the geometry.

Parameters:
origin - The origin of the ray
direction - The direction of the ray
length - An optional length for to make the ray a segment. If the value is zero, it is ignored
geom - The geometry to test against
point - The intersection point for returning
vworldTransform - Transformation matrix to go from the root of the world to this point
intersectOnly - true if we only want to know if we have a intersection and don't really care which it is
Returns:
true if there was an intersection, false if not

Aviatrix3D
2.1.0

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