gCAD3D 2.35
u3d.h File Reference

Go to the source code of this file.

Functions

int UT3D_ChkPlanPts (int piT[3], int, Point *)
 
int UT3D_ch_lnbox (Line *, Point *, Point *, double)
 
int UT3D_CompPts (int, Point *, double)
 
int UT3D_GravCentPts (Point *, int, Point *)
 
int UT3D_VcPts2Crvs (Vector *, void *, int, void *, int, int)
 

Function Documentation

int UT3D_ChkPlanPts ( int  piT[3],
int  ,
Point  
)
UT3D_ChkPlanPts Check planarity <-- points
Check if the given points lie on a plane.
IN:
int np ... number of points
Point *ptab ... points
OUT:
int piT[3] ... point indices rel. ptab defining plane
(if returncode < 2)
Returncodes:
0 = points are not planar
1 = points are planar
2 = points are collinear
3 = points are identic
int UT3D_ch_lnbox ( Line ,
Point ,
Point ,
double   
)
UT3D_ch_lnbox check line-X with axis-parallel box
Check if a line intersects an axis-parallel box.
IN:
Line *ln ... line
Point *pmin ... endpoint 1 of box diagonal
Point *pmax ... endpoint 2 of box diagonal
double tol ... tolerance for line intersecting box (>0)
OUT:
Returncodes:
0 = the line does not intersect the box
1 = the line intersects the box
int UT3D_CompPts ( int  ,
Point ,
double   
)
UT3D_CompPts Compare <-- points
Compare the given points.
IN:
int np ... number of points
Point *pTab ... array of points
OUT:
Returncodes:
1/0 <=> points are all equal Y/N
int UT3D_GravCentPts ( Point ,
int  ,
Point  
)
UT3D_GravCentPts Gravitation center <-- points
Center of gravitation of a set of points.
IN:
int np ... number of points
Point *ptab ... points
OUT:
Point *gc ... gravitation center
Returncode:
0 = OK
int UT3D_VcPts2Crvs ( Vector ,
void *  ,
int  ,
void *  ,
int  ,
int   
)
UT3D_VcPts2Crvs Vector <-- corresponding points on two curves
The two given curves have same type, orientation and parameterization and
should have no intersections.
The sample number determines a curve parameter from which corresponding
curve points are computed.
Their difference is the resulting vector.
From the sample-number the curve-parameter t follows by
t = a + sn * (b-a)/np, where [a,b] is the support of the curves.
IN:
void *cv ... curve
int cvt ... type of curve
void *ocv ... offset curve (corr. to cv)
int np ... number of point-positions on cv/ocv (without endpoint)
int sn ... sample-number of points to evaluate (0 <= sn <= np)
OUT:
Vector *vc ... vector
Returncodes:
0 = OK
-1 = internal error