public class Distance extends Object
| Constructor and Description |
|---|
Distance() |
public static double rayToSegment(org.jogamp.vecmath.Point3d rayorig, org.jogamp.vecmath.Vector3d raydir, org.jogamp.vecmath.Point3d segstart, org.jogamp.vecmath.Point3d segend)
rayorig - Origin of the rayraydir - Direction of the raysegstart - Segment start pointsegend - Segment end pointpublic static double rayToSegment(org.jogamp.vecmath.Point3d rayorig, org.jogamp.vecmath.Vector3d raydir, org.jogamp.vecmath.Point3d segstart, org.jogamp.vecmath.Point3d segend, org.jogamp.vecmath.Point3d rayint, org.jogamp.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(org.jogamp.vecmath.Point3d ray0orig, org.jogamp.vecmath.Vector3d ray0dir, org.jogamp.vecmath.Point3d ray1orig, org.jogamp.vecmath.Vector3d ray1dir)
ray0orig - Origin of ray 0ray0dir - Direction of ray 0ray1orig - Origin of ray 1ray1dir - Direction of ray 1public static double rayToRay(org.jogamp.vecmath.Point3d ray0orig, org.jogamp.vecmath.Vector3d ray0dir, org.jogamp.vecmath.Point3d ray1orig, org.jogamp.vecmath.Vector3d ray1dir, org.jogamp.vecmath.Point3d ray0int, org.jogamp.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(org.jogamp.vecmath.Point3d pt, org.jogamp.vecmath.Point3d rayorig, org.jogamp.vecmath.Vector3d raydir)
pt - The pointrayorig - Origin of the rayraydir - Direction of the raypublic static double pointToRay(org.jogamp.vecmath.Point3d pt, org.jogamp.vecmath.Point3d rayorig, org.jogamp.vecmath.Vector3d raydir, org.jogamp.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(org.jogamp.vecmath.Point3d pt, org.jogamp.vecmath.Point3d segstart, org.jogamp.vecmath.Point3d segend)
public static double pointToSegment(org.jogamp.vecmath.Point3d pt, org.jogamp.vecmath.Point3d segstart, org.jogamp.vecmath.Point3d segend, org.jogamp.vecmath.Point3d segint, double[] param)
public static double segmentToSegment(org.jogamp.vecmath.Point3d seg0start, org.jogamp.vecmath.Point3d seg0end, org.jogamp.vecmath.Point3d seg1start, org.jogamp.vecmath.Point3d seg1end)
seg0start - the start of segment 0seg0end - the end of segment 0seg1start - the start of segment 1seg1end - the end of segment 1public static double segmentToSegment(org.jogamp.vecmath.Point3d seg0start, org.jogamp.vecmath.Point3d seg0end, org.jogamp.vecmath.Point3d seg1start, org.jogamp.vecmath.Point3d seg1end, org.jogamp.vecmath.Point3d seg0int, org.jogamp.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.Copyright © 2023. All rights reserved.