#include <AlMeasure.h>
class AlMeasure
static double minDist( AlSurface* surface1, AlSurface* surface2,
double* u1=NULL, double* v1=NULL, double P1[]=NULL,
double* u2=NULL, double* v2=NULL, double P2[]=NULL,
int interval_u=20, int interval_v=20);
static double minDist( AlSurface* surface1, AlCurve* curve2,
double* u1=NULL, double* v1=NULL, double P1[]=NULL,
double* t2=NULL, double P2[]=NULL,
int interval=100);
static double minDist( AlSurface* surface1, double P2[3],
double* u1=NULL, double* v1=NULL, double P1[]=NULL);
static double minDist( AlCurve* curve1, AlCurve* curve2,
double* t1=NULL, double P1[]=NULL,
double* t2=NULL, double P2[]=NULL, int inter=100);
static double minDist( AlCurve* curve1, double P2[3],
double* t1=NULL, double P1[]=NULL);
The minDist() functions will return a negative value if and only if the objects it is given do not exist.
For the sake of continuity, the order of the two objects to be measured is always highest dimentionality to lowest.
< surface2 - the second AlSurface
> u1, v1 - u,v values of the closest point on surface1 to surface2
> P1[3] - x,y,z values of the closest point on surface1 to surface2
> u2, v2 - u,v values of the closest point on surface2 to surface1
> P2[3] - x,y,z values of the closest point on surface2 to surface1
< interval_u - number of intervals into which surface1 will be split in the u direction (defines the accuracy of the search)
< interval_v - number of intervals into which surface1 will be split in the v direction (defines the accuracy of the search)
=>0 - the distance between the two closest points.
< curve2 - the AlCurve
> u1, v1 - u,v values of the closest point on surface1 to curve2
> P1[3] - x,y,z values of the closest point on surface1 to curve2
> t2 - t value of the closest point on curve2 to surface1
> P2[3] - x,y,z values of the closest point on curve2 to surface1
< interval - number of intervals into which curve2 will be split (defines the accuracy of the search)
=>0 - the distance between the two closest points.
< P2[3] - x,y,z values of the point
> u1, v1 - u,v values of the closest point on surface1 to P2
> P1[3] - x,y,z values of the closest point on surface1 to P2
=>0 - the distance between the two closest points.
< curve2 - the second AlCurve
> t1 - t value of the closest point on curve1 to curve2
> P1[3] - x,y,z values of the closest point on curve1 to curve2
> t2 - t value of the closest point on curve2 to curve1
> P2[3] - x,y,z values of the closest point on curve2 to curve1
< interval - number of intervals into which curve1 will be split (defines the accuracy of the search)
=>0 - the distance between the two closest points.
< P2[3] - x,y,z values of the point
> t1 - t value of the closest point on curve1 to P2
> P1[3] - x,y,z values of the closest point on curve1 to P2
=>0 - the distance between the two closest points.