public class QuadraticUtils
extends java.lang.Object
Constructor and Description |
---|
QuadraticUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
circleTangentPoints(Point3d t0,
Point3d t1,
Point3d px,
double r)
Cpmputes the two tangent points
t0 and t1
between a circle of radius r and a point px
exterior to it. |
static double |
ellipsoidPenetrationDistance(Vector3d nrm,
Vector3d pos,
double a,
double b,
double c)
Computes the distance from a point inside an ellipsoid to its surface,
along with the associated normal.
|
static double |
ellipsoidPenetrationDistance(Vector3d nrm,
Vector3d pos,
double a,
double b,
double c,
double tol,
IntHolder numIters) |
static void |
ellipsoidSurfaceTangent(Point3d pt,
Point3d p0,
Point3d p1,
double a,
double b,
double c)
Find the point
pt for an axis-aligned ellipsoid that
is tangent to the line p0 -pt and closest
to the line defined by p0 and p1 . |
public static int circleTangentPoints(Point3d t0, Point3d t1, Point3d px, double r)
t0
and t1
between a circle of radius r
and a point px
exterior to it. The circle is assumed to be centered at the origin and
lie in the x-y plane, and so the z coordinate of px
is
ignored. The method returns the number of distinct tangent points, which
is normally 2. If px
lies on the circle, there is only one
tangent (which is equal to px
) and the method returns 1. If
px
lies inside the circle, there are no tangent points, the
method returns 0, and t0
and t1
are undefined.t0
- returns the first tangent pointt1
- returns the second tangent pointpx
- point for which the tangents should be computedr
- circle radiuspublic static double ellipsoidPenetrationDistance(Vector3d nrm, Vector3d pos, double a, double b, double c)
public static double ellipsoidPenetrationDistance(Vector3d nrm, Vector3d pos, double a, double b, double c, double tol, IntHolder numIters)