|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.internal.Distance
public class Distance
Utility class used to calculate distance. Contains static methods used by picking method to determine intersections.
Constructor Summary | |
---|---|
Distance()
|
Method Summary | |
---|---|
static double |
pointToRay(javax.vecmath.Point3d pt,
javax.vecmath.Point3d rayorig,
javax.vecmath.Vector3d raydir)
Minimum pt to ray distance. |
static double |
pointToRay(javax.vecmath.Point3d pt,
javax.vecmath.Point3d rayorig,
javax.vecmath.Vector3d raydir,
javax.vecmath.Point3d rayint,
double[] param)
Minimum pt to ray distance. |
static double |
pointToSegment(javax.vecmath.Point3d pt,
javax.vecmath.Point3d segstart,
javax.vecmath.Point3d segend)
Minimum pt to segment distance. |
static double |
pointToSegment(javax.vecmath.Point3d pt,
javax.vecmath.Point3d segstart,
javax.vecmath.Point3d segend,
javax.vecmath.Point3d segint,
double[] param)
Minimum pt to segment distance. |
static double |
rayToRay(javax.vecmath.Point3d ray0orig,
javax.vecmath.Vector3d ray0dir,
javax.vecmath.Point3d ray1orig,
javax.vecmath.Vector3d ray1dir)
Minimum ray to ray distance. |
static double |
rayToRay(javax.vecmath.Point3d ray0orig,
javax.vecmath.Vector3d ray0dir,
javax.vecmath.Point3d ray1orig,
javax.vecmath.Vector3d ray1dir,
javax.vecmath.Point3d ray0int,
javax.vecmath.Point3d ray1int,
double[] param)
Minimum ray to ray distance. |
static double |
rayToSegment(javax.vecmath.Point3d rayorig,
javax.vecmath.Vector3d raydir,
javax.vecmath.Point3d segstart,
javax.vecmath.Point3d segend)
Minimum ray to segment distance. |
static double |
rayToSegment(javax.vecmath.Point3d rayorig,
javax.vecmath.Vector3d raydir,
javax.vecmath.Point3d segstart,
javax.vecmath.Point3d segend,
javax.vecmath.Point3d rayint,
javax.vecmath.Point3d segint,
double[] param)
Minimum ray to segment distance. |
static double |
segmentToSegment(javax.vecmath.Point3d seg0start,
javax.vecmath.Point3d seg0end,
javax.vecmath.Point3d seg1start,
javax.vecmath.Point3d seg1end)
Minimum segment to segment distance. |
static double |
segmentToSegment(javax.vecmath.Point3d seg0start,
javax.vecmath.Point3d seg0end,
javax.vecmath.Point3d seg1start,
javax.vecmath.Point3d seg1end,
javax.vecmath.Point3d seg0int,
javax.vecmath.Point3d seg1int,
double[] param)
Minimum segment to segment distance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Distance()
Method Detail |
---|
public static double rayToSegment(javax.vecmath.Point3d rayorig, javax.vecmath.Vector3d raydir, javax.vecmath.Point3d segstart, javax.vecmath.Point3d segend)
rayorig
- Origin of the rayraydir
- Direction of the raysegstart
- Segment start pointsegend
- Segment end point
public static double rayToSegment(javax.vecmath.Point3d rayorig, javax.vecmath.Vector3d raydir, javax.vecmath.Point3d segstart, javax.vecmath.Point3d segend, javax.vecmath.Point3d rayint, javax.vecmath.Point3d segint, double[] param)
rayorig
- Origin of the rayraydir
- Direction of the raysegstart
- Segment start pointsegend
- Segment end pointrayint
- If non-null, will be filled with the coordinates of
the point corresponding to the minimum distance on the ray.segint
- If non-null, will be filled with the coordinates of
the point corresponding to the minimum distance on the segment.param
- An array of two doubles, will be filled with the
parametric factors used to find the point of shortest distance on
each primitive (ray = O +sD, with O=origin and
D=direction). param[0] will contain the parameter for the ray,
and param[1] the parameter for the segment.
public static double rayToRay(javax.vecmath.Point3d ray0orig, javax.vecmath.Vector3d ray0dir, javax.vecmath.Point3d ray1orig, javax.vecmath.Vector3d ray1dir)
ray0orig
- Origin of ray 0ray0dir
- Direction of ray 0ray1orig
- Origin of ray 1ray1dir
- Direction of ray 1
public static double rayToRay(javax.vecmath.Point3d ray0orig, javax.vecmath.Vector3d ray0dir, javax.vecmath.Point3d ray1orig, javax.vecmath.Vector3d ray1dir, javax.vecmath.Point3d ray0int, javax.vecmath.Point3d ray1int, double[] param)
ray0orig
- Origin of ray 0ray0dir
- Direction of ray 0ray1orig
- Origin of ray 1ray1dir
- Direction of ray 1ray0int
- If non-null, will be filled with the coordinates
of the point corresponding to the minimum distance on ray 0.ray1int
- If non-null, will be filled with the coordinates
of the point corresponding to the minimum distance on ray 1.param
- An array of two doubles, will be filled with the
parametric factors used to find the point of shortest distance on
each primitive (ray = O +sD, with O=origin and
D=direction). param[0] will contain the parameter for ray0, and
param[1] the parameter for ray1.
public static double pointToRay(javax.vecmath.Point3d pt, javax.vecmath.Point3d rayorig, javax.vecmath.Vector3d raydir)
pt
- The pointrayorig
- Origin of the rayraydir
- Direction of the ray
public static double pointToRay(javax.vecmath.Point3d pt, javax.vecmath.Point3d rayorig, javax.vecmath.Vector3d raydir, javax.vecmath.Point3d rayint, double[] param)
pt
- The pointrayorig
- Origin of the rayraydir
- Direction of the rayrayint
- If non-null, will be filled with the coordinates of
the point corresponding to the minimum distance on the ray.param
- An array of one double, will be filled with the
parametric factors used to find the point of shortest distance on
the ray (ray = O +sD, with O=origin and D=direction). param[0]
will contain the parameter for the ray.
public static double pointToSegment(javax.vecmath.Point3d pt, javax.vecmath.Point3d segstart, javax.vecmath.Point3d segend)
public static double pointToSegment(javax.vecmath.Point3d pt, javax.vecmath.Point3d segstart, javax.vecmath.Point3d segend, javax.vecmath.Point3d segint, double[] param)
public static double segmentToSegment(javax.vecmath.Point3d seg0start, javax.vecmath.Point3d seg0end, javax.vecmath.Point3d seg1start, javax.vecmath.Point3d seg1end)
seg0start
- the start of segment 0seg0end
- the end of segment 0seg1start
- the start of segment 1seg1end
- the end of segment 1
public static double segmentToSegment(javax.vecmath.Point3d seg0start, javax.vecmath.Point3d seg0end, javax.vecmath.Point3d seg1start, javax.vecmath.Point3d seg1end, javax.vecmath.Point3d seg0int, javax.vecmath.Point3d seg1int, double[] param)
seg0start
- the start of segment 0seg0end
- the end of segment 0seg1start
- the start of segment 1seg1end
- the end of segment 1seg0int
- If non-null, will be filled with the coordinates
of the point corresponding to the minimum distance on segment 0.seg1int
- If non-null, will be filled with the coordinates
of the point corresponding to the minimum distance on segment 1.param
- An array of two doubles, will be filled with the
parametric factors used to find the point of shortest distance on
each primitive (segment = O +sD, with O=origin and
D=direction). param[0] will contain the parameter for segment 0,
and param[1] the parameter for segment 1.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |