===================================================== Liste_Funktionen_Beginn: UT3D_stru_dump Testausgabe Geom.Element (auch 2D-Elemente!) -------------- side ------------------------------------- UT3D_sid_2vc check vc's for perp, same or opposit direction UT3D_sid_3pt check if pt is in, before or behind perpendic.Plane UT3D_sid_ptpl check if pt is in, above or below plane UT3D_sid_ptptvc compare if pt is in, above or below plane -------------- angles ------------------------------------- UT3D_acos_2vc cos of opening angle of 2 vecs (dot=scalarprod) INLINE UT3D_acos_vc2pt cos of opening angle of vc-ptpt (dot=scalarprod) INLINE UT3D_angr_2vc angle between two vec's (always 0 <= PI) UT3D_angr_3pt angle between 3 points UT3D_angr_3vc angle between two vec's + Z-vec UT3D_angr_4pt angle between 2 lines UT3D_angr_ci opening angle of Circ UT3D_angr_cipt opening angle of point on Circ UT3D_angr_vc2pt angle between 2 points in plane (plane from pt-vc) UT3D_angr_vcpl compute angle of vec in Refsys (to X-axis) UT3D_angr_2pl opening angle of 2 planes UT3D_2angr_vc 2 opening angels of vec (Y-ang = kipp, Z-ang = dreh) UT3D_3angr_2vc 3 opening angels (3D-position) from X and Z-vec UT3D_atan_vcpl Anstieg (tan) der Geraden vci bezueglich Ebene pli -------------- length ------------------------------------- UT3D_len_vc Vectorlength INLINE UT3D_lenq_vc Quadr.Vectorlength INLINE UT3D_bplen_vc returns longest vectorpart and its backPlane UT3D_lenB_2pt longest dx/dy/dz-distance point-point (fast!) UT3D_len_2pt distance point - point UT3D_lenq_PtPt square-distance point - point UT3D_lenq_PtLn minimum (quadr) distance Point-Segment UT3D_minLen_3pt query min dist of 3 points UT3D_minLen_4pt query min dist of 4 points UT3D_len_ln length of line UT3D_len_ci length of circ UT3D_slen_projvcvc Proj.laenge eines Vektors auf einen anderen Vektor UT3D_slenq_projvcvc Quadr.laenge eines Vektors auf einen anderen Vektor UT3D_slenq_2ptvc Quadr. Laenge pt-pt in Richtung vec (m. Vorzeichen !) UT3D_nlen_projvcvc Normalabstand eines Vektors auf einen anderen Vektor UT3D_slen_3pt signed distance point - point UT3D_slenq_ptptvc signed quadr.Distance pt-pt in Richtung vec UT3D_slen_2ptvc signed Laenge pt-pt in Richtung vec (m. Vorzeichen !) UT3D_slen_ptpl signed distance point - plane UT3D_nlen_2ptvc Laenge der Normalen auf Vektor UT3D_nlenq_3pt give quadr.Distance from point to line UT3D_nlenq_2ptvc give quadr.Distance from point to line UT3D_nlen_3pt Laenge der Normalen von p2 auf Line p1-p3 UT3D_parvc_2vc parameter of distance of vec projected on vec UT3D_parvc_2vcbp parameter of distance of vec projected on vec UT3D_2parvc_3vcbp project end of vec1 along vec2 on vec3 -------------- points -------------------------------------- UT3D_swap2pt swap 2 2D-points UT3D_comp2pt compare 2 points UT3D_comp4pt compare 4 points UT3D_pt_ck_npt compare point / points UT3D_pt_ck_ptvc check if point is on unlimited line (point-vector) UT3D_pt_ck_2pt check if point is on unlimited line (2 points) UT3D_pt_ck_inLine check point on line segment UT3D_pt_ck_onLine check point on line segment UT3D_pt_ck_onLnSeg check point on line segment (for polygons) UT3D_pt_ck_on_pta check if point lies ON polygon UT3D_pt_ck_in2pt check if point p3 is inside box of points p1-p2 UT3D_pt_ck_inCirc check if point is on circ segment UT3D_pt_ck_inSph check if point is inside sphere UT3D_pt_ck_linear check if points are linear UT3D_ipt_cknear_3pt return index of nearest Point from 3 points UT3D_ipt_cknear_npt return index of nearest Point from n points UT3D_ipt_ckfar_npt return index of farest Point from n points UT3D_ipt_cknearn_npt return index of n-nearest Point from n points UT3D_ipt2_nptvc ind. of outermost points in direction vc of n pt's .. point inside polygon: see UT2D_pt_ck_inCv3 UT3D_ipt2_npt find the indices of the most extreme points UT3D_isConvx_ptTab check if is contour convex or concave UT3D_parpt_objpt give parameter of point on curve UT3D_parpt_3pt parameter of distance of point ptx on line pl1-pl2 UT3D_parpt_ptvc parameter of distance of point ptx on line pt1-vc1 UT3D_parpt_lnbp parameter of point on line (via 2D,BackPlane) UT3D_parpt_cipt parameter of point on circ UT3D_pt_ptz 3D-Point = 2D-Point + Z-Val INLINE UT3D_pt_pt2 3D-Point = 2D-Point UT3D_pt_pt2z 3D-Point = 2D-Point auf bestimmter Z-Hoehe UT3D_pt_3db Point = 3 doubles (x, y, z) UT3D_pt_txt Point from text UT3D_pt_pt2bp 3D-point from 2D-point & backplane UT3D_pt_addpt Add two points: po += p1 INLINE UT3D_pt_add2pt Add two points: po = p1 + p2 UT3D_pt_multpt multiply; po = pi * d UT3D_pt_LinComb2Pts Linear combination of 2 points: po = a1 * p1 + a2 * p2 UT3D_pt_mid2pt midpoint between 2 points UT3D_pt_mid_pta arithm. Mittelwert der Punktetabelle pTab UT3D_pt_midci midpoint of a circ UT3D_pt_ci__ 90/180/270-deg-point of circ UT3D_pt_opp2pt opposite point (p1 = center) UT3D_pt_oppptptvc point opposite line (= 180 deg rot.) UT3D_2pt_oppptvclen 2 opposite points (center, vector, dist) UT3D_pt_traptvc Point = Point + Vector (INLINE !) UT3D_pt_traptivc Point = Point - Vector (INLINE !) UT3D_pt_traptvclen transl. point into dir vc dist. lenv UT3D_pt_traptvc1len transl. point into dir vc dist. lenv (vcLen=1) UT3D_pt_trapt2vc transl. point into 2 directions UT3D_pt_trapt2vc2len transl. point into 2 directions (2 len's) UT3D_pt_trapt3vc3len transl. point into 3 directions (3 len's) UT3D_pt_traptptlen transl. point into dir pDir dist. lenv UT3D_pt_trapt2pt transl. point distance p1 -> p2 UT3D_pt_tracirlen transl. point circular length UT3D_pt_rotptptangr rotate pti around ptc/Z-Axis UT3D_pt_rotptptvcangr rotate pt around Line (pt/vc), angle UT3D_pt_rotciangr rotate pt around Circ, angle UT3D_pt_rotptm3 rotate pt (prepare with UT3D_m3_inirot) UT3D_pt_projpt2pt point = project point pt to line pt+pt UT3D_pt_projptptvc point = project point pt to line pl+vl UT3D_pt_projptln point = project point to line UT3D_pt_projptci point = project point to circ UT3D_pt_projptptnvc project point pt to plane from Origin, Z-vec UT3D_pt_projptpl point = project point to plane UT3D_pt_intptvcplx intersect point/vector with Y-Z-plane UT3D_pt_intptvcply intersect point/vector with X-Z-plane UT3D_pt_intptvcplz intersect point/vector with X-Y-plane UT3D_pt_intptvcxpln intersect line(x-parallel) with plane (pt-vc) UT3D_pt_intptvcypln intersect line(y-parallel) with plane (pt-vc) UT3D_pt_intptvczpln intersect line(z-parallel) with plane (pt-vc) UT3D_2par_int2pt2vc intersect 2 unlimitedLines; gives 2 parameters UT3D_pt1_int2pt2vc intersect 2 unlimitedLines; point on pa-pb out UT3D_pt_int2pt2vc intersect 2 rays UT3D_pt_intptvcln intersect ray - lineSegment UT3D_pt_int2ln intersect 2 unlimitedLines; get 2 points & dist UT3D_pt_intptvcsph intersect unlimited line / sphere UT3D_pt_intperp2ln inters ln2 with perp.plane to ln1 UT3D_ptCen_2Ln give common centerPoint of 2 Lines (from 2 CircSegs) UT3D_pt_intlnci__ intersect line and circle UT3D_pt_intlnci_p intersect LN-CIR (in same plane; 0/1/2 points) UT3D_pt_intlnsph intersect limited line / sphere UT3D_pt_intcici intersect CIR CIR (gives 0/1/2 points) UT3D_pt_intlnpl point = intersection of line - plane UT3D_pt_intplnln intersect LineSegment X Plane UT3D_pt_intlnpl1 intersect line - plane / besonders schnell UT3D_ptDi_intptvcptvc intersect line-plane (pt-vc pt-vc) UT3D_ptDi_intptvcpln intersect line-plane (pt-vc plane) UT3D_pt_intptvcpln intersect line-plane (pt-vc pt-vc) UT3D_pt_intplci intersect PLN CIR (gives 0/1/2 points) UT3D_pt_intcidpln intersect circ / perpend.offsetPlane UT3D_pt_intptvcpl_ point = intersection of pt / vc - plane UT3D_pt_ipl_2ptpt2 interpolate PointPosition for 2D-point UT3D_pt_mirptpl mirror point in plane UT3D_pt_tangptci tangent from point to circ UT3D_pt_evpar2pt evaluate param.point on line UT3D_pt_evparptcv evaluate param.point on line from point+vector UT3D_pt_evparln evaluate param.point on line UT3D_pt_evparci evaluate param.point on circ UT3D_pt_evparcrv evaluate param.point on curve UT3D_pt_m3 copy origin out of 4x3-matrix UT3D_pt_traptm3 apply transformation to point (from 4x3-matrix) UT3D_pt_traptm4 apply transformation to point (from 4x4-matrix) -------------- Axis/Ray (see also _ptvc_) -------------------- UT3D_ptvc_int2pl point/vector = intersection of 2 planes UT3D_ptvc_int2pln point/vector = intersection of 2 planes (pln=pt,z-vec) UT3D_ptvc_ox make PT+VC = Axis from PT|LN|PLN -------------- vectors ------------------------------------- UT3D_compvcNull compare vector for (exact) 0,0,0 UT3D_compvc0 compare vector for 0,0,0 with tol UT3D_comp2vc_d compare 2 vectors for parallel and antiparallel UT3D_comp2vc_p compare 2 vectors for parallel UT3D_comp2vc__ compare 2 vectors (direction and size) UT3D_vc_ck_parpl check if vec is parallel to plane UT3D_vc_ck_perpvc check if 2 vectors are normal (perpendic.) UT3D_vc_ckperp_2vc1 check if 2 normalized-vectors are normal (perp.) UT3D_vc_merge2vc merge 2 vectors vNew = (v1 + v2) / 2 (INLINE!) UT3D_vc_3db Vector = 3 doubles (x, y, z) UT3D_vc_pt Vector = 0,0,0 -> Point UT3D_vc_vc2 3D-vector = 2D-vector (inline) UT3D_vc_2pt Vector = Point -> Point (INLINE!) UT3D_vc_2ptlen Vector = Point -> Point, set Length UT3D_vc_angr Vector = Angle_X_axis UT3D_vc_2angr Vector = Angle_X_axis, Angle_Z_axis UT3D_vc_2vc intermediate Vector UT3D_vc_ln Vector = LineStartPoint -> LineEndPoint UT3D_vc_txt Vector from text UT3D_vc_m3 = UT3D_m3_get UT3D_vc_bp returns normalVector from BackPlaneNr (0-2) UT3D_2vc_pta get 2 vecs of max extent of a polgon (for perp.Vec) UT3D_vc_invert Vector invert (change direction) INLINE UT3D_vc_Zup invert Vector if its Z-coord is negative UT3D_vc_add2vc v3 = v1 + v2 (INLINE!) UT3D_vc_addvc2pt add Vector + Vector from 2 points (INLINE) UT3D_vc_add3vc vo = v1 + v2 + v3 (INLINE) UT3D_vc_sub2vc v3 = v1 - v2 (INLINE) UT3D_vc_multvc vo = vi * fakt Vec-multiplication (INLINE) UT3D_vc_perp1vc normal vector to 3D-vector UT3D_vc_perpvcvc vector = perpendic. to 2 vectors (in same plane) UT3D_vc_perp2vc vector = perpendic. to 2 vectors (crossprod) UT3D_vc_perpvc2pt vector = perpendic. to vec & 2 points (crossprod) UT3D_vc_perp3pt vector = perpendic. to 3 points (crossprod) UT3D_vc_perp4pt vector = perpendic. to 2 lines (crossprod) UT3D_vc_perpvcplXY Normalvektor auf vc1, der in der X-Y-Plane liegt UT3D_vc_perpcv Normalvektor auf planares Polygon / alt-langsam UT3D_vc_perppta Normalvektor auf planares Polygon UT3D_vc_normalize change to length 1 UT3D_vc_setLength change vectorlength UT3D_vc_setLenLen change vectorlength; actLen known UT3D_vc_tangci vector to circ (0. - 1.) UT3D_vc_tangcipt tangent to point on circ UT3D_vc_rotangr rotate a vector around Z-axis UT3D_vc_rot3angr rotate a vector around 3 angles UT3D_vc_rotvcvcangr rotate vec vi around vec va UT3D_vc_rotvcangr rotate a vector UT3D_vc_rotvcm3 rotate Vector (prepare with UT3D_m3_inirot) UT3D_vc_projvcvc vector v3 = project vector v1 to vector v2 UT3D_vc_projvc2vc vector = project vector to plane from 2 vec's UT3D_vc_projvcnvc project vec to plane from Z-vec UT3D_vc_projvcpl vector = project vector to plane UT3D_vc_mirvcpl mirror vector in plane UT3D_vc_travcm3 apply transformation to vector (from 4x3-matrix) UT3D_vc_travcm4 apply transformation to vector (from 4x4-matrix) -------------- lines (see also _ptvc_) -------------------- UT3D_comp2ln compare 2 lines if identical UT3D_ln_ck_on_ln check if 2 lines collinear UT3D_ln_ck_parpl check if line is parallel to plane UT3D_ln_inv invert (change p1, p2) UT3D_ln_6db line from 2 * 3 doubles UT3D_ln_ln2 3D-Line from 2D-Line (Z=0) UT3D_ln_2pt2 LN = PT - PT UT3D_ln_ptvc Line = PT + VC INLINE UT3D_ln_ptpt Line = Point, Point INLINE UT3D_ln_tangcici Tangente an CIR - CIR UT3D_ln_projlnci line = project endpoints of line --> circPlane UT3D_ln_parl2ln ln <== gemeinsame Strecke of 2 lines UT3D_ln_int2pl LN = Intersection PLN / PLN UT3D_ln_pts_dmax line <-- points with max. distance of pointTab UT3D_ln_setLen change LineLength; center around pc -------------- circs -------------------------------------- UT3D_rdc_3pt Radius eines Kreises aus 3 Punkten errechnen UT3D_ck_ci180 check if circ is 180-degree-circ UT3D_ck_ci360 check if circ is 360-degree-circ UT3D_cksid_civc ck if KreisStart/Endpunkt ist in Richtg VC od opposit UT3D_ptNr_ci nr of points for polygon from circle (see UT2D_ptNr_ci) UT3D_ci_inv1 invert (change p1, p2, dir (optisch gleich)) UT3D_ci_inv2 invert (dir - KomplementaerKreis) UT3D_ci_inv3 invert (optisch gleich, Z-Axis invers) UT3D_ci_cip1 change startpoint of circ UT3D_ci_cip2 change endpoint of circ UT3D_ci_ciangr change endpoint of circ from angle UT3D_ci_setangr fix angle from p1-p2 UT3D_ci_cip3 change start- and endpoint of circ UT3D_ci_cipt180 change circ -> 180 deg-circ; keep dir UT3D_ci_cipt360 change circ -> 360 deg-circ; keep dir UT3D_ci_ptvcr Circ from center, axis, radius UT3D_ci_pt2vcr Circ from center, axis, x-vec and radius UT3D_ci_ptptvcangr Circ from center, startpoint, axis, opening angle UT3D_ci_2ptvcrd Circ from 2 Points-on-Circ & Radius UT3D_ci_ptptvcrd Circ from startpoint endpoint radius Z-vector UT3D_ci_ptvcpt2angr circ from center, point, axis, startAngle, endAngle UT3D_ci_ptrd2vc2angr circ from cen, Rd, Z-Axis, X-Axis, startAng, endAng UT3D_ci_ptvcrd Circ from startpoint, startvector, radius .. UT3D_ci_3pt Circ from 3 points UT3D_ci_pcvzpt180 180 deg-circ (CCW) from center, axis, startpoint UT3D_ci_ci2 3D-Circ = 2D-Circ UT3D_ci_obj2 3D-Circ = 2D-ObjG UT3D_ci_obj 3D-Circ = 3D-ObjG UT3D_civz_ci den vz eines Circ (aus p1-pc-p2) errechnen UT3D_ci_2lnrd Circ = corner for 2 Lines UT3D_ci_ptptrd Circ = tangent to PT + PT, radius UT3D_ci_lnptrd Circ = tangent to LN + PT, radius UT3D_ci_lncird Circ = tangent to LN + CIR, radius UT3D_ci_ciptrd Circ = tangent to CI + PT, radius UT3D_ci_cicird Circ = tangent to CIR + CIR, radius UT3D_ci_intplsph Circ = intersect Plane Sphere UT3D_ci_tracivc move circle -------------- polygon; see also UT3D_pta_obj ------------------ UT3D_pta_ck_planar testen ob alle Punkte planar (plane from pt+vc) UT3D_rMin_pta den kleinsten Radius errechnen eines Polygon suchen UT3D_cksq_4pt check 4 points if its a square UT3D_pta_dbo get polygon from DB-object(typ,ind) UT3D_cv_obj2 Polygon < 2D-Obj UT3D_cv_ln Linearstueck -> Polygon / Anzahl UT3D_cv_ci Polygon < 3D-Kreis UT3D_npt_ci circular polygon UT3D_pta_rot__ rotate curve CCW um axis .. UT3D_cv_inv Punktetabelle umdrehen UT3D_cv_realg Punktetabelle umschichten (realign) UT3D_cv_delia delete points out of pTab UT3D_sr_polc Umlaufsinn eines closed polygon -------------- GrafObj - (see also UTO_) --------------- UT3D_obj_dump Testausgabe UT3D_obj_obj2 change 2D-Obj > 3D-Obj (add Z=0; vz=0,0,1) UT3D_obj_pt DO NOT USE change Point > 3D-Obj UT3D_obj_ln DO NOT USE change Line > 3D-Obj UT3D_obj_ci2 DO NOT USE change 2D-Circ > 3D-Obj UT3D_obj_ci DO NOT USE change Circ > 3D-Obj UT3D_obj_obj2 change 2D-Obj > 3D-Obj UT3D_obj_vctra translate Obj -------------- plane --------------------------------------- UT3D_bp_2pt returns main-BackPlaneNr (0-2) from 2 points UT3D_bp_vc_ returns main-BackPlaneNr (0-2) from vec UT3D_bp_vcz returns main-BackPlaneNr (0-2) from normalvec UT3D_bp_pta backplane from n points UT3D_pl_XYZ Defaultplane auf absolut 0,0,0 UT3D_pl_bpdb Plane from equation (x or y or z = value) UT3D_pl_3pt plane from 3 point's UT3D_pl_pta plane from n-points UT3D_pl_ptvcvc plane from Origin, X-vec, Z-Vec UT3D_pl_pt2vc plane from origin u. 2 vc's (fixer X-Vektor) UT3D_pl_ptvc plane from origin + z-vector UT3D_pl_ptvcpt Plane aus Nullpunkt, Z-Achse u. Punkt in XZ-Ebene UT3D_pl_ln make Plane from line (Origin=line-center; Z-vec=line) UT3D_pl_2ln plane from 2 lines UT3D_pl_ci make Plane from circ UT3D_pl_nobj plane fron ObjGX-table UT3D_pl_invert Plane invert (change direction of Z-vec) UT3D_pl_rotpt rot. Refsys around Z; point gives new X-direction UT3D_pl_ptpl change origin of plane UT3D_pl_plcoe plane <-- plane equation UT3D_plcoe_pl plane equation <-- plane -------------- transformation ------------------------------ UT3D_m3_copy memcpy UT3D_m3_inirot define rotation (axis, origin angle) UT3D_m3_load neues Achsensystem mit vx,vy,vz definieren UT3D_m3_load_povxvy neues Achsensystem mit Origin,vx,vy definieren UT3D_m3_load_povxvz neues Achsensystem mit Origin,vx,vz definieren UT3D_m3_load_o Nullpunkt into 4x3 Transform.Matrix UT3D_m3_loadpl load Plane(=Achsensystem) into 4x3 Transform.Matrix UT3D_m3_invm3 4x3-Matrix invertieren UT3D_m3_get get part of matrix; 0=VX, 1=VY, 2=VZ, 3=PO UT3D_m3_set set part of matrix; 0=VX, 1=VY, 2=VZ, 3=PO UT3D_m3_vc = UT3D_m3_set UT3D_m3_traVc translate mat (move progin) UT3D_m3_tram3m3 apply transformation to Mat_4x3 UT3D_m3_scl scale mat UT3D_m3_multm3 4x3-Matrix mit 4x3 Matrix multiplizieren UT3D_m3_tra_m3 ev ident mit UT3D_m3_multm3 ? UT3D_m3_m4v copy a vertical-Mat_4x4 --> Mat_4x3 UT3D_m4_init Initialize a 4x4 - matrix UT3D_m4_init_ori Initialize a 4x4 - matrix with translation UT3D_m4_init_rot Initialize a 4x4 - matrix with rotation UT3D_m4_loadpl load Plane(=Achsensystem) into 4x4 Transform.Matrix UT3D_m4_addrot Concatenate 2 4x4 - matrixes. UT3D_m4_addtra add a translation into 4x4-matrix UT3D_m4_copy memcpy UT3D_m4v_m3 copy a Mat_4x3 --> vertical-Mat_4x4 Liste_Funktionen_Ende: =====================================================
#include "../xa/MS_Def0.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_math.h"
#include "../ut/ut_bspl.h"
#include "../ut/ut_plg.h"
#include "../ut/ut_elli.h"
#include "../gr/ut_UI.h"
#include "../ut/ut_TX.h"
#include "../ut/ut_umem.h"
#include "../ut/ut_memTab.h"
Defines | |
#define | CONVEX 1 |
#define | CONCAV -1 |
Functions | |
double | UT3D_angr_vc2pt (Point *pz, Vector *vz, Point *p1, Point *p2) |
double | UT3D_angr_vcpl (Plane *pl1, Vector *vc1) |
double | UT3D_angr_2pl (Plane *pl1, Plane *pl2) |
int | UT3D_2angr_vc (double *az, double *ay, Vector *vc1) |
int | UT3D_3angr_2vc (double *az1, double *ay, double *az2, Vector *vx, Vector *vz) |
int | UT3D_atan_vcpl (double *kvc, Vector *vci, Plane *pli) |
int | UT3D_pt_intptvcln (Point *ip1, Point *ip2, double *dist, Point *pt1, Vector *vc1, Line *ln2) |
int | UT3D_pt_intptvcplx (Point *px, Point *pl, Vector *vl, double plx) |
int | UT3D_pt_intptvcply (Point *px, Point *pl, Vector *vl, double ply) |
int | UT3D_pt_intptvcplz (Point *px, Point *pl, Vector *vl, double plz) |
int | UT3D_pt_intptvczpln (Point *pti, Point *ptl, Point *ptpl, Vector *vcpl) |
int | UT3D_pt_intptvcxpln (Point *pti, Point *ptl, Point *ptpl, Vector *vcpl) |
int | UT3D_pt_intptvcypln (Point *pti, Point *ptl, Point *ptpl, Vector *vcpl) |
int | UT3D_2par_int2pt2vc (double *par1, double *par2, Point *pa, Vector *vab, Point *pc, Vector *vcd) |
int | UT3D_pt1_int2pt2vc (Point *ip, Point *pa, Point *pb, Point *pc, Point *pd) |
int | UT3D_pt_int2pt2vc (Point *ip1, Point *ip2, double *dist, Point *ptu, Vector *vcu, Point *ptv, Vector *vcv) |
int | UT3D_ci_cicird (Circ ca[], Circ *ci1, Circ *ci2, double rad1, int sNr) |
int | UT3D_ci_ptptrd (Circ ca[], Point *pt1, Point *pt2, double rad1) |
int | UT3D_ci_lnptrd (Circ *cia, Line *ln1, Point *pt1, Vector *vc, double rdc) |
int | UT3D_ci_ciptrd (Circ ca[], Circ *ci1, Point *pt1, double rad1) |
int | UT3D_ci_lncird (Circ ca[], Line *ln1, Circ *ci1, double rad1, int sNr) |
int | UT3D_ci_2lnrd (Circ ca[], Line *ln1, Line *ln2, double rad1, int sNr) |
int | UT3D_ci_intplsph (Circ *cio, Plane *pli, Sphere *spi) |
int | UT3D_ci_tracivc (Circ *cio, Circ *cii, Vector *vc1) |
void | UT3D_obj_vctra (ObjG *o2, ObjG *o1, Vector *vc1) |
int | UT3D_nstru_dump (int typ, int siz, void *data, char *txt,...) |
int | UT3D_stru_dump (int typ, void *data, char *txt,...) |
int | UT3D_obj_dump (ObjG *el) |
int | UT3D_obj_obj2 (ObjGX *oo, ObjGX *oi, Memspc *memSeg) |
ObjG | UT3D_obj_ln (Line *ln1) |
ObjG | UT3D_obj_ci (Circ *ci1) |
int | UT3D_cv3_linear (int *pNr, Point *pTab, double tol) |
int | UT3D_cv_delia (int *pNr, Point *pTab, char *ptStat) |
int | UT3D_sr_polc (int ptNr, Point *pa, Vector *vcn, int mode) |
int | UT3D_pta_ck_planar (int pNr, Point *pTab, Point *pPln, Vector *vc) |
int | UT3D_rMin_pta (double *rMin, int pNr, Point *pTab) |
int | UT3D_cksq_4pt (Point *pp1, Point *pp2, Point *pp3, Point *pp4) |
int | UT3D_bplen_vc (double *lnv, Vector *vc1) |
double | UT3D_len_ci (Circ *ci1) |
double | UT3D_len_ln (Line *ln) |
double | UT3D_slen_ptpl (Point *pt, Plane *pl) |
double | UT3D_lenB_2pt (Point *p1, Point *p2) |
double | UT3D_len_2pt (Point *p1, Point *p2) |
double | UT3D_lenq_PtPt (Point *p1, Point *p2) |
int | UT3D_lenq_PtLn (double *lenq, Point *p, Point *p1, Point *p2) |
int | UT3D_minLen_3pt (double *dp, Point *p0, Point *p1, Point *p2) |
int | UT3D_minLen_4pt (double *dp, Point *p1a, Point *p1e, Point *p2a, Point *p2e) |
double | UT3D_slen_3pt (Point *p1, Point *p2, Point *p3) |
double | UT3D_nlen_2ptvc (Point *p1, Point *pv, Vector *vc) |
int | UT3D_nlenq_3pt (double *qlen, Point *pa, Point *pb, Point *pc) |
int | UT3D_nlenq_2ptvc (double *qlen, Point *pc, Point *pa, Vector *vab) |
double | UT3D_nlen_3pt (Point *p1, Point *p2, Point *p3) |
double | UT3D_slen_projvcvc (Vector *vc1, Vector *vc2) |
double | UT3D_slenq_projvcvc (Vector *vc1, Vector *vc2) |
double | UT3D_slenq_2ptvc (Point *p1, Point *p2, Vector *vc) |
double | UT3D_nlen_projvcvc (Vector *vc1, Vector *vc2) |
int | UT3D_slenq_ptptvc (double *qlen, Point *pa, Point *pb, Point *pc) |
double | UT3D_slen_2ptvc (Point *p1, Point *p2, Vector *vc) |
int | UT3D_comp4pt (Point *p1a, Point *p1e, Point *p2a, Point *p2e, double tol) |
int | UT3D_compn4pt (Point *p1, Point *p2, Point *p3, Point *p4) |
int | UT3D_sid_ptptvc (Point *ptx, Point *pto, Vector *vz) |
int | UT3D_sid_ptpl (Point *pt, Plane *pl) |
int | UT3D_sid_3pt (Point *p1, Point *p2, Point *p3) |
int | UT3D_sid_2vc (Vector *v1, Vector *v2) |
int | UT3D_pt_ck_linear (int np, Point *ptab, double tol) |
int | UT3D_pt_ck_npt (Point *p0, Point *pTab, int pNr, double tol) |
int | UT3D_pt_ck_ptvc (Point *pt, Point *pl, Vector *vl, double tol) |
int | UT3D_pt_ck_2pt (Point *pt, Point *pl1, Point *pl2, double tol) |
int | UT3D_pt_ck_inLine (Point *p1, Point *p2, Point *p3, double tol) |
int | UT3D_pt_ck_onLine (Point *p1, Point *p2, Point *p3, double tol) |
int | UT3D_pt_ck_onLnSeg (Point *p1, Point *p2, Point *p3, double tol) |
int | UT3D_pt_ck_inSph (Point *pt, Point *ps, double rs) |
Point | UT3D_pt_pt2 (Point2 *pt20) |
Point | UT3D_pt_pt2z (Point2 *pt20, double zVal) |
void | UT3D_pt_3db (Point *pt, double x, double y, double z) |
void | UT3D_pt_mid2pt (Point *po, Point *p1, Point *p2) |
int | UT3D_pt_mid_pta (Point *pto, Point *pTab, int ptNr) |
void | UT3D_pt_midci (Point *po, Circ *ci1) |
int | UT3D_pt_ci__ (Point *po, int imod, Circ *ci1) |
int | UT3D_2pt_oppptvclen (Point *p1, Point *p2, Point *pc, Vector *vc1, double dist) |
int | UT3D_ipt_ckfar_npt (Point *p0, Point *ptTab, int ptNr) |
int | UT3D_ipt_cknear_3pt (Point *p0, Point *p1, Point *p2) |
int | UT3D_ipt_cknear_npt (Point *p0, Point *ptTab, int ptNr) |
int | UT3D_ipt_cknearn_npt (Point *p0, Point *ptTab, int ptNr, int distNr) |
int | UT3D_ipt2_npt (int *ip1, int *ip2, Point *pta, int pNr) |
int | UT3D_ipt2_nptvc (Point *pt1, Point *pt2, int mode, Point *pta, int iNr, Vector *vc) |
int | UT3D_pt_ck_on_pta (Point *pTab, int ptNr, Point *pt1, double tol) |
int | UT3D_pt_ck_in2pt (Point *p1, Point *p2, Point *p3, double tol) |
int | UT3D_pt_ck_inCirc (Circ *ci1, Point *pt1, double tol) |
void | UT3D_pt_opp2pt (Point *po, Point *p1, Point *p2) |
int | UT3D_pt_oppptptvc (Point *po, Point *pi, Point *pl, Vector *vl) |
void | UT3D_pt_traptvc1len (Point *po, Point *pi, Vector *vc, double dist) |
void | UT3D_pt_traptvclen (Point *po, Point *pi, Vector *vc, double lenv) |
void | UT3D_pt_trapt2vc (Point *po, Point *pi, Vector *vc1, Vector *vc2) |
void | UT3D_pt_trapt2vc2len (Point *po, Point *pi, Vector *vc1, double len1, Vector *vc2, double len2) |
void | UT3D_pt_trapt3vc3len (Point *po, Point *pi, Vector *vx, double dx, Vector *vy, double dy, Vector *vz, double dz) |
void | UT3D_pt_trapt2pt (Point *po, Point *pi, Point *p1, Point *p2) |
void | UT3D_pt_traptptlen (Point *po, Point *pi, Point *pDir, double lenv) |
int | UT3D_pt_tracirlen (Point *pto, Point *pti, Circ *cii, double clen) |
int | UT3D_pt_rotciangr (Point *pto, double angr, Circ *ci1) |
int | UT3D_pt_rotptm3 (Point *p2, Point *p1, Mat_4x3 ma) |
int | UT3D_pt_rotptptangr (Point *pto, Point *ptc, Point *pti, double *ar) |
void | UT3D_pt_rotptptvcangr (Point *pto, Point *pti, Point *pta, Vector *vca, double angr) |
int | UT3D_pt_projptln (Point *pp, double *len, Point *pt, Line *ln) |
int | UT3D_pt_projptci (Point *pto, Point *pt1, Circ *ci1) |
int | UT3D_pt_projpt2pt (Point *pp, double *len, Point *pt, Point *p1, Point *p2) |
int | UT3D_pt_projptptvc (Point *pp, double *len, Point *pt, Point *pl, Vector *vl) |
int | UT3D_pt_projptptnvc (Point *po, Point *pi, Point *plo, Vector *plz) |
void | UT3D_pt_projptpl (Point *pp, Plane *pl, Point *pt) |
int | UT3D_pt_intplnln (Point *ip, double *dist, Plane *pl, Line *ln) |
int | UT3D_pt_intlnpl (Point *ip, Plane *pl, Line *ln) |
int | UT3D_pt_intptvcpl_ (Point *ip, Plane *pl, Point *pt, Vector *vln) |
int | UT3D_ptDi_intptvcptvc (Point *ip, double *dist, Point *ptl, Vector *vcl, Point *ptp, Vector *vcp) |
int | UT3D_ptDi_intptvcpln (Point *ip, double *dist, Plane *pl, Point *pt, Vector *vln) |
int | UT3D_pt_intlnpl1 (Point *pi, double *dl, Point *p1, Point *p2, double dn1, double dn2) |
int | UT3D_pt_intptvcpln (Point *pti, Point *ptl, Vector *vcl, Point *ptpl, Vector *vcpl) |
int | UT3D_pt_intperp2ln (Point *po, Point *p1, Vector *v1, Point *p2, Vector *v2) |
int | UT3D_pt_ipl_2ptpt2 (Point *pi3, Point *p1, Point *p2, Point2 *pi2) |
int | UT3D_pt_mirptpl (Point *pto, Point *pti, Plane *pln) |
int | UT3D_isConvx_ptTab (int pNr, Point *pa) |
int | UT3D_parpt_objpt (double *po, Point *pti, int oTyp, void *oDat) |
int | UT3D_parpt_3pt (double *pl, Point *ptx, Point *pl1, Point *pl2) |
int | UT3D_parpt_ptvc (double *pl, Point *ptx, Point *pt1, Vector *vc1) |
double | UT3D_parpt_lnbp (Point *pti, Line *ln1, int bp) |
double | UT3D_parpt_cipt (Point *pti, Circ *ci1) |
int | UT3D_pt_tangptci (Point *po1, Point *po2, Point *pt1, Circ *ci1) |
int | UT3D_pt_evpar2pt (Point *po, double lpar, Point *p1, Point *p2) |
int | UT3D_pt_evparln (Point *pto, double lpar, Line *ln1) |
int | UT3D_pt_evparci (Point *pto, double lpar, Circ *ci1) |
int | UT3D_pt_evparcrv (Point *pto, double lpar, int typ, void *data) |
int | UT3D_pt_m3 (Point *pto, Mat_4x3 ma) |
void | UT3D_pt_traptm3 (Point *p2, Mat_4x3 mata, Point *p1) |
void | UT3D_pt_traptm4 (Point *p2, Mat_4x4 ma, Point *p1) |
int | UT3D_compvcNull (Vector *v1) |
int | UT3D_compvc0 (Vector *v1, double tol) |
int | UT3D_comp2vc_p (Vector *v1, Vector *v2, double tol) |
int | UT3D_comp2vc_d (Vector *v1, Vector *v2, double tol) |
int | UT3D_comp2vc__ (Vector *v1, Vector *v2, double tol) |
int | UT3D_vc_ck_parpl (Vector *vci, Plane *pli, double tol) |
int | UT3D_vc_ck_perpvc (Vector *vc1, Vector *vc2, double tol) |
int | UT3D_vc_ckperp_2vc1 (Vector *vc1, Vector *vc2, double tol) |
int | UT3D_pt_pt2bp (Point *p3, Point2 *p2, int bp) |
void | UT3D_pt_txt (Point *pt, char *txt) |
void | UT3D_vc_txt (Vector *vc, char *txt) |
int | UT3D_vc_bp (Vector *vn, int bp) |
int | UT3D_2vc_pta (Vector *vc1, Vector *vc2, int pNr, Point *pta) |
void | UT3D_vc_ln (Vector *vc, Line *ln) |
void | UT3D_vc_2ptlen (Vector *vc, Point *p1, Point *p2, double vlen) |
void | UT3D_vc_angr (Vector *vc, double angr) |
void | UT3D_vc_2angr (Vector *vc, double angX, double angZ) |
void | UT3D_vc_2vc (Vector *vco, Vector *vc1, Vector *vc2) |
void | UT3D_vc_tangci (Vector *vs, Circ *ci1, double u) |
int | UT3D_vc_tangcipt (Vector *vct, Point *p1, Circ *ci) |
int | UT3D_vc_Zup (Vector *v2, Vector *v1) |
void | UT3D_vc_perp1vc (Vector *vp, Vector *vi) |
void | UT3D_vc_perp2vc (Vector *vp, Vector *v1, Vector *v2) |
int | UT3D_vc_perpvc2pt (Vector *vp, Vector *vx, Point *pc, Point *py) |
int | UT3D_vc_perp3pt (Vector *vp, Point *ptc, Point *ptx, Point *pty) |
int | UT3D_vc_perp4pt (Vector *vp, Point *p1, Point *p2, Point *p3, Point *p4) |
void | UT3D_vc_perpvcplXY (Vector *vx, Vector *vc1) |
int | UT3D_vc_perpcv (Vector *vcz, int pNr, Point *pTab) |
int | UT3D_vc_perppta (Vector *vcn, int pNr, Point *pta) |
void | UT3D_vc_normalize (Vector *vn, Vector *vc) |
void | UT3D_vc_setLength (Vector *vco, Vector *vci, double new_len) |
int | UT3D_vc_setLenLen (Vector *vco, Vector *vci, double newLen, double actLen) |
int | UT3D_vc_rotangr (Vector *vco, Vector *vci, double *ar) |
void | UT3D_vc_rot3angr (Vector *vco, Vector *vci, double alpha, double beta, double gamma) |
int | UT3D_vc_rotvcvcangr (Vector *vo, Vector *va, Vector *vi, double angr) |
void | UT3D_vc_rotvcangr (Vector *vco, double a1, Vector *Vi, Vector *Va) |
int | UT3D_vc_rotvcm3 (Vector *v2, Vector *v1, Mat_4x3 ma) |
int | UT3D_vc_perpvcvc (Vector *v3, Vector *v1, Vector *v2) |
int | UT3D_vc_projvcvc (Vector *v3, Vector *v1, Vector *v2) |
int | UT3D_vc_projvc2vc (Vector *vo, Vector *vi, Vector *v1, Vector *v2) |
int | UT3D_vc_projvcnvc (Vector *vo, Vector *vi, Vector *vz) |
void | UT3D_vc_projvcpl (Vector *vco, Plane *pl, Vector *vci) |
int | UT3D_vc_mirvcpl (Vector *vco, Vector *vci, Plane *pln) |
void | UT3D_vc_travcm3 (Vector *b, Mat_4x3 mata, Vector *a) |
void | UT3D_vc_travcm4 (Vector *b, Mat_4x4 ma, Vector *a) |
int | UT3D_comp2ln (Line *pa1, Line *pa2, double tol) |
int | UT3D_ln_ck_on_ln (Point *lo1, Point *lo2, Point *l11, Point *l12, Point *l21, Point *l22, double tol) |
int | UT3D_ln_ck_parpl (double *dist, Line *ln, Plane *pl, double tol) |
void | UT3D_ln_6db (Line *ln, double x1, double y1, double z1, double x2, double y2, double z2) |
void | UT3D_ln_2pt2 (Line *ln1, Point2 *pta, Point2 *pte) |
int | UT3D_ptNr_ci (Circ *ci1, double tol) |
int | UT3D_ck_ci180 (Circ *ci1) |
int | UT3D_ck_ci360 (Circ *ci1) |
int | UT3D_cksid_civc (Circ *ci1, Vector *vc1) |
int | UT3D_ci_cipt180 (Circ *ci1, Point *p1) |
int | UT3D_ci_cipt360 (Circ *ci1, Point *p1) |
int | UT3D_ci_cip1 (Circ *ci1, Point *p1) |
int | UT3D_ci_cip2 (Circ *ci1, Point *p2) |
int | UT3D_ci_cip3 (Circ *ci1, Point *p1, Point *p2) |
int | UT3D_ci_ciangr (Circ *ci, double ao2) |
void | UT3D_ci_setangr (Circ *ci1) |
int | UT3D_ci_ptptvcangr (Circ *ci, Point *pc, Point *p1, Vector *vz, double ao) |
int | UT3D_rdc_3pt (double *rdc, Point *pp1, Point *pp2, Point *pp3) |
int | UT3D_ci_ptrd2vc2angr (Circ *ci, Point *pc, double rd, Vector *vz, Vector *vx, double a1, double a2) |
int | UT3D_ci_ptvcpt2angr (Circ *ci, Point *pc, Point *p1, Vector *vz, double a1, double a2) |
int | UT3D_ci_ptvcrd (Circ *ci, Point *ps, Vector *vs, double rd, Vector *vz, double a1) |
int | UT3D_ci_3pt (Circ *cpo, Point *pp1, Point *pp2, Point *pp3) |
int | UT3D_ci_2ptvcrd (Circ *cia, Point *pp1, Point *pp2, Vector *vz, double rdc) |
int | UT3D_ci_ptptvcrd (Circ *ci, Point *p1, Point *p2, double rd, Vector *vz, int siz) |
int | UT3D_ci_pcvzpt180 (Circ *ci1, Point *pc, Vector *vz, Point *p1, int dreh) |
int | UT3D_ci_inv1 (Circ *ci1) |
int | UT3D_ci_inv2 (Circ *ci1) |
int | UT3D_ci_inv3 (Circ *ci1) |
int | UT3D_ci_ptvcr (Circ *ci1, Point *pc, Vector *vcz, double rdc) |
int | UT3D_ci_pt2vcr (Circ *ci1, Point *pc, Vector *vz, Vector *vx, double rc) |
Circ | UT3D_ci_ci2 (Circ2 *ci20) |
Circ | UT3D_ci_obj2 (ObjG2 *ci20) |
Circ | UT3D_ci_obj (ObjG *ci_in) |
int | UT3D_civz_ci (Circ *ci1) |
int | UT3D_pta_dbo (Point **pTab, int *pNr, int typ, long ind, double tol) |
Curv | UT3D_cv_obj2 (ObjG2 *o1) |
void | UT3D_cv_ln (Point *cv, int *ptAnz, Point *p1, Point *p2) |
void | UT3D_cv_ci (Point cv[], int *ptanz, Circ *ci1, int ptmax, double tol) |
int | UT3D_npt_ci (Point *pa, int pNr, Circ *ci1) |
int | UT3D_pta_rot__ (Point *p2Tab, Point *p1Tab, int ptNr, Point *pc, Vector *vz, double ar) |
int | UT3D_cv_inv (int ptNr, Point *pta) |
int | UT3D_cv_realg (int ptNr, Point *pta, int ista) |
int | UT3D_ptvc_int2pl (Point *pt, Vector *vc, Plane *pl1, Plane *pl2) |
int | UT3D_ptvc_int2pln (Point *pti, Vector *vci, Point *pl1pt, Vector *pl1vz, Point *pl2pt, Vector *pl2vz) |
int | UT3D_ptvc_ox (Point *pta, Vector *vca, ObjGX *oxi) |
double | UT3D_angr_3pt (Point *p1, Point *pc, Point *p2) |
double | UT3D_angr_2vc (Vector *v1, Vector *v2) |
double | UT3D_angr_3vc (Vector *vz, Vector *v1, Vector *v2) |
double | UT3D_angr_4pt (Point *p11, Point *p12, Point *p21, Point *p22) |
double | UT3D_angr_cipt (Circ *ci1, Point *pti) |
double | UT3D_angr_ci (Circ *ci1) |
int | UT3D_pl_pta (Plane *pl, int ptNr, Point *pta) |
int | UT3D_pl_bpdb (Plane *plo, int bp, double dbc) |
int | UT3D_pl_3pt (Plane *pl, Point *p1, Point *p2, Point *p3) |
int | UT3D_pl_ln (Plane *pln, Line *lna) |
void | UT3D_pl_2ln (Plane *pl1, Line *ln1, Line *ln2) |
int | UT3D_pl_ci (Plane *pl1, Circ *ci1) |
int | UT3D_pl_nobj (Plane *pl1, int oNr, ObjGX *oTab) |
void | UT3D_pl_XYZ (Plane *pl1) |
void | UT3D_pl_ptvcvc (Plane *pl1, Point *po, Vector *vx, Vector *vz) |
void | UT3D_pl_pt2vc (Plane *pl1, Point *po, Vector *vx, Vector *vy) |
int | UT3D_pl_ptvc (Plane *pl, Point *pt, Vector *vc) |
void | UT3D_pl_ptvcpt (Plane *pl1, Point *po, Vector *vz, Point *ptx) |
void | UT3D_pl_invert (Plane *pl) |
int | UT3D_pl_rotpt (Plane *plo, Plane *pli, Point *ptx) |
void | UT3D_pl_ptpl (Plane *pl, Point *pt1) |
int | UT3D_m3_get (void *out, int mode, Mat_4x3 ma) |
int | UT3D_m3_set (Mat_4x3 ma, int mode, void *da) |
int | UT3D_m3_copy (Mat_4x3 mo, Mat_4x3 mi) |
int | UT3D_m3_inirot (Mat_4x3 ma, Point *pa, Vector *va, double angr) |
void | UT3D_m3_load (Mat_4x3 ma, Vector *vx, Vector *vy, Vector *vz) |
void | UT3D_m3_load_o (Mat_4x3 ma, Point *ori) |
void | UT3D_m3_load_povxvy (Mat_4x3 ma, Point *ori, Vector *vx, Vector *vy) |
void | UT3D_m3_load_povxvz (Mat_4x3 ma, Point *ori, Vector *vx, Vector *vz) |
void | UT3D_m3_loadpl (Mat_4x3 m1, Plane *pl1) |
int | UT3D_m3_invm3 (Mat_4x3 im1, Mat_4x3 m1) |
int | UT3D_m3_traVc (Mat_4x3 *ma, Vector *trVc) |
int | UT3D_m3_tram3m3 (Mat_4x3 m3, Mat_4x3 m1, Mat_4x3 m2) |
int | UT3D_m3_scl (Mat_4x3 *ma, double *sx, double *sy, double *sz) |
void | UT3D_m3_multm3 (Mat_4x3 m3, Mat_4x3 m1, Mat_4x3 m2) |
int | UT3D_m3_tra_m3 (Mat_4x3 m3, Mat_4x3 m1, Mat_4x3 m2) |
void | UT3D_m4_init (Mat_4x4 ma) |
void | UT3D_m4_init_ori (Mat_4x4 ma, double px, double py, double pz) |
void | UT3D_m4_init_rot (Mat_4x4 ma, double angle, Vector *axis) |
void | UT3D_m4_loadpl (Mat_4x4 m1, Plane *pl1) |
void | UT3D_m4_addrot (Mat_4x4 mo, Mat_4x4 ma, Mat_4x4 mb) |
void | UT3D_m4_addtra (Mat_4x4 ma, double px, double py, double pz) |
int | UT3D_m4_copy (Mat_4x4 mo, Mat_4x4 mi) |
int | UT3D_m4v_m3 (Mat_4x4 mo, Mat_4x3 mi) |
int | UT3D_m3_m4v (Mat_4x3 mo, Mat_4x4 mi) |
int | UT3D_pt_intlnsph (Line *ln1, Point *ps, double rs) |
int | UT3D_ptCen_2Ln (Point *ptCen, Point *pa, Point *pb, Point *pc, Point *pd) |
int | UT3D_pt_intcici (int *np, Point xp[], Circ *ci1, Circ *ci2) |
int | UT3D_pt_intlnci__ (int *np, Point xp[], Line *ln, Circ *ci) |
int | UT3D_pt_intlnci_p (int *np, Point xp[], Line *ln, Circ *ci1) |
int | UT3D_ln_tangcici (Line *ln1, Circ *ci1, Circ *ci2, int sNr) |
int | UT3D_ln_projlnci (Line *lno, Line *lni, Circ *cii) |
int | UT3D_ln_parl2ln (Point *po1, Point *po2, Point *p11, Point *p12, Point *p21, Point *p22) |
int | UT3D_ln_int2pl (Line *ln, Plane *pl1, Plane *pl2) |
int | UT3D_ln_pts_dmax (Line *ln, int np, Point *ptab, double tol) |
int | UT3D_ln_setLen (Line *lno, Point *pc, double lnlg, Line *lni) |
int | UT3D_pt_intplci (int *np, Point xp[], Plane *pl, Circ *ci) |
int | UT3D_pt_intcidpln (int *np, Point xp[], Point *pc, Point *p1, Vector *vz, double dx) |
int | UT3D_pt_intptvcsph (Point *pa, Point *pl, Vector *vl, Point *ps, double rs) |
int | UT3D_pt_int2ln (Point *ip1, Point *ip2, double *dist, Line *ln1, Line *ln2) |
int | UT3D_plcoe_pl (polcoeff_d3 *co, Plane *pl) |
int | UT3D_pl_plcoe (Plane *pl, polcoeff_d3 *co) |
int | UT3D_bp_2pt (Point *pt1, Point *pt2) |
int | UT3D_bp_vc_ (Vector *vc1) |
int | UT3D_bp_vcz (Vector *vcn) |
int | UT3D_bp_pta (int pNr, Point *pa) |
int | UT3D_parvc_2vc (double *pl, Vector *v1, Vector *v2) |
int | UT3D_parvc_2vcbp (double *dl, int mainPln, Vector *v1, Vector *v2) |
int | UT3D_2parvc_3vcbp (double *dx, double *dy, int mainPln, Vector *v1, Vector *v2, Vector *v3) |
#define CONVEX 1 |
#define CONCAV -1 |
UT3D_angr_vc2pt angle between 2 points in plane (plane from pt-vc) angle is CCW, 0 - PI*2 Die Punkte p1 und p2 befinden sich in einer Ebene. vz ist der Z-Vektor der Ebene. see also UT3D_angr_vcpl UT3D_angr_cipt UT3D_angr_ci UT3D_acos_2vc
UT3D_angr_vcpl compute angle of vec in Refsys (to X-axis) vc1 wird auf pl1 projiziert; RetCod = Winkel von vci' mit dem X-Vec von pl1
int UT3D_2angr_vc | ( | double * | az, | |
double * | ay, | |||
Vector * | vc1 | |||
) |
UT3D_2angr_vc 2 opening angels of vec (Y-ang = kipp, Z-ang = dreh) vc1 entspricht der X-Achse; dise wird so gedreht, dass dann vc1 Die Winkel sind so gesetzt, dass die X-Achse einer DL-Liste dann in Richtung vc1 zeigt. (soll Z-Achse benutzt werden: ay -= 90. degree.)
UT3D_3angr_2vc 3 opening angels (3D-position) from X and Z-vec. Drehaufrufe: 1) um Z-Achse Winkel az1 drehen 2) um (neue) Y-Achse Winkel ay drehen (neue Y-Achse liegt noch in der absoluten XY-Ebene. 3) um neue Z-Achse Winkel az2 drehen
den Anstieg (tan) der Geraden vci bezueglich Ebene pli vci muss nicht normiert sein irc: 0 OK irc: -1 vci ist normal auf die Plane pli
int UT3D_pt_intptvcln | ( | Point * | ip1, | |
Point * | ip2, | |||
double * | dist, | |||
Point * | pt1, | |||
Vector * | vc1, | |||
Line * | ln2 | |||
) |
UT3D_pt_intptvcln intersect ray - lineSegment ip1 liegt auf ray (pt1/vc1) ip2 liegt auf Line ln2 Returncodes: 0 = Lines parallel or zero-length 1 = OK; dist gives the minimum distance. 2 = OK; lines are crossing, dist=0, ip1=ip2, but outside lineSegment. 3 = OK; lines are crossing, dist=0, ip1=ip2 and inside lineSegment.
UT3D_pt_intptvcplx intersect point/vector with Y-Z-plane irc 0 OK px = Schnittpunkt irc -1 kein Schnittpunkt (vl parallel pln)
UT3D_pt_intptvcply intersect point/vector with X-Z-plane irc 0 OK px = Schnittpunkt irc -1 kein Schnittpunkt (vl parallel pln)
UT3D_pt_intptvcplz intersect point/vector with X-Y-plane irc 0 OK px = Schnittpunkt irc -1 kein Schnittpunkt (vl parallel pln)
UT3D_pt_intptvczpln intersect line(z-parallel) X plane (pt-vc) Input: ptl Point on line (direction of line = 0,0,1) ptpl Point in plane vcpl perpendicular Vector to plane (muss nicht normiert sein); Returncodes: 0 = OK 1 = no intersection (parallel) See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl
UT3D_pt_intptvcxpln intersect line(x-parallel) X plane (pt-vc) Input: ptl Point on line (direction of line = 1,0,0) ptpl Point in plane vcpl perpendicular Vector to plane (muss nicht normiert sein); Returncodes: 0 = OK 1 = no intersection (parallel) See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl
UT3D_pt_intptvcypln intersect line(y-parallel) X plane (pt-vc) Input: ptl Point on line (direction of line = 0,1,0) ptpl Point in plane vcpl perpendicular Vector to plane (muss nicht normiert sein); Returncodes: 0 = OK 1 = no intersection (parallel) See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl
int UT3D_2par_int2pt2vc | ( | double * | par1, | |
double * | par2, | |||
Point * | pa, | |||
Vector * | vab, | |||
Point * | pc, | |||
Vector * | vcd | |||
) |
UT3D_2par_int2pt2vc intersect 2 unlimitedLines; gives 2 parameters Input: pa-vab Line1 (pa-pb) pc-vcb Line2 (pc-pd) Output: par1 = Parameter of IntersectPt auf pa-pb par2 = Parameter of IntersectPt auf pc-pd irc = -1 = parallel irc = 0 = OK; d /. / . / . / . c . .. . . . . . . . a-----+---e----f-----------------------b ip
UT3D_pt1_int2pt2vc intersect 2 unlimitedLines; point on pa-pb out. Input: pa-pb Line1 pc-pd Line2 Output: ip = intersectionpoint on pa-pb irc = -1 = parallel irc = 0 = OK;
int UT3D_pt_int2pt2vc | ( | Point * | ip1, | |
Point * | ip2, | |||
double * | dist, | |||
Point * | ptu, | |||
Vector * | vcu, | |||
Point * | ptv, | |||
Vector * | vcv | |||
) |
UT3D_pt_int2pt2vc intersect 2 rays ip1 liegt auf ray1 (ptu/vcu) ip2 liegt auf ray2 (ptv/vcv) Returncodes: 0 = Lines parallel or zero-length 1 = OK; dist gives the minimum distance. 2 = OK; lines are crossing, ip1 = ip2, dist = 0.
UT3D_ci_lnptrd Circ = tangent to LN + PT, radius. Input: pt1 ln1 vz axis of Circ; only used if pt1 is on line ln1 rdc radius RetCod: 0-2 Nr of resulting Circles
UT3D_ci_lncird Circ = tangent to LN + CIR, radius. Input: sNr solutionNr, -1 == alle Solutions, else nur die gewuenschte RC = 1,2,3,4,5,6,7,8 = Max. Anzahl Kreise.
int UT3D_nstru_dump | ( | int | typ, | |
int | siz, | |||
void * | data, | |||
char * | txt, | |||
... | ||||
) |
derzeit nur erlaubt fuer: - Punkt - Index
int UT3D_stru_dump | ( | int | typ, | |
void * | data, | |||
char * | txt, | |||
... | ||||
) |
UT3D_stru_dump Testausgabe Geom.Element. typ = TYP_FuncInit: ab nun Ausgabe -> Datei "txt" (Open File) typ = TYP_FuncEnd: ab nun wiederAusgabe -> term. (Close File) typ = TYP_FuncInit1: ab nun Ausgabe -> FILE "txt" (File must be open) typ = TYP_FuncExit: ab nun wiederAusgabe -> term. (does not close File)
int UT3D_obj_dump | ( | ObjG * | el | ) |
DO NOT USE
UT3D_obj_obj2 change 2D-Obj > 3D-Obj (add Z=0; vz=0,0,1) 2D-Objekte in 3D-Objekte umwandeln (add Z=0)
int UT3D_cv3_linear | ( | int * | pNr, | |
Point * | pTab, | |||
double | tol | |||
) |
UT3D_cv3_linear delete unnecesary straight points alle Punkte die innerhalb tol liegen aus pTab entfernen.
int UT3D_cv_delia | ( | int * | pNr, | |
Point * | pTab, | |||
char * | ptStat | |||
) |
UT3D_cv_delia delete points out of pTab alle Punkte die (ptStat = 1) haben aus Tabelle loeschen pNr richtigstellen ptStat = 0: Punkt wird gebraucht ptStat = 1: Punkt loeschen
UT3D_sr_polc nach Karl Sauer 2004-04-07 Umlaufsinn (sr=sense of rotation) eines geschlossenen 3D-Polygons (polc) berechnen. ptNr = Anzahl Punkte ohne den letzten == ersten Punkt ! pa = PunkteTabelle ohne den letzten == ersten Punkt ! RetCod = 1 = CCW -1 = CW mode: Berechnungsebene BackPlane ex UT3D_bp_vcz.
testen ob alle Punkte planar (Abst. von Plane pPln-vc < UT_TOL_pt). RetCod = 0 OK, ist planer -1 no, 1-n points of pTab are not in plane pPln-vc
int UT3D_rMin_pta | ( | double * | rMin, | |
int | pNr, | |||
Point * | pTab | |||
) |
vom gesamten Polgon den kleinsten Radius errechnen Nur Abschaetzung; es wird von jeweils 3 Punkten der Kreisradius errechnet. ev in eine neue source ../ut/ut_pta.c ?
UT3D_cksq_4pt check 4 points if its a square Achtung: die 4 Punkte muessen korrekt geordnet sein ! 4 3 1 2 die 4 vektoren muessen gleich / bzw invers sein RetCod 0 yes, its a square -1 no
int UT3D_bplen_vc | ( | double * | lnv, | |
Vector * | vc1 | |||
) |
double UT3D_len_ci | ( | Circ * | ci1 | ) |
double UT3D_len_ln | ( | Line * | ln | ) |
UT3D_len_ln length of line
UT3D_slen_ptpl signed distance point - plane Value is positive point ON same side as plane normal vector Value is negativ point on OPPOSITE side of plane normal vector
UT3D_lenB_2pt longest dx/dy/dz-distance point-point (fast!)
UT3D_lenq_PtPt square-distance point - point alias UT3D_lenq_2pt nur Abstand ohne sqrt ausrechen (nur f Vergleichswert)
UT3D_lenq_PtLn minimum (quadr) distance Point-Segment give min. distance from Point p to Line p1-p2 see also UT3D_nlenq_3pt
dp ist Streckensumme entlang der Hauptachsen - nicht genau Laenge ! rc = 1 p0 - p1 hat geringeren Abstand rc = 2 p0 - p2 hat geringeren Abstand dx,dy,dz addieren; den geringsten Wert auswaehlen.
dp ist Streckensumme entlang der Hauptachsen - nicht genau Laenge ! rc = 1 p1e - p2a hat geringsten Abstand rc = 2 p1a - p2a hat geringsten Abstand rc = 3 p1e - p2e hat geringsten Abstand rc = 4 p1a - p2e hat geringsten Abstand dx,dy,dz addieren; den geringsten Wert auswaehlen.
UT3D_slen_3pt signed distance point - point p1-p2 gives the direction, OUT: signed distance p1-p3 ........ p3 . . . . . . . . p1--------+------>p2 <---rc--->
UT3D_nlen_2ptvc Laenge der Normalen auf Vektor 2003-11-07: p1-p2 vertauscht! RF. p1 auf pv-vc projizieren (ergibt ps); die Laenge p1-ps liefern. (p1 -ps ist normal auf vc) X p1 | rc | | pv------+--------> vc see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc
UT3D_nlenq_3pt give quadr.Distance from point to line pa - pb gives a line, pc is projected onto this line. c | len| | a------+--------b e
UT3D_nlenq_2ptvc give quadr.Distance from point to line pa - pb gives a line, pc is projected onto this line. c | len| | a------+--------b e
UT3D_nlen_3pt Laenge der Normalen von p2 auf Line p1-p3 p2 liegt in der Mitte; p1-p3 ist die Linie. p2 wird auf die Linie projiziert; der Abstand ist der Rueckgabewert. X p2 | rc | | p1------+--------p3
3D-Projektionslaenge eines Vektors auf einen anderen Vektor:
vc2 wird auf vc1 projiziert.
negativ if Oeffnungswinkel > 90 Grad !?
/|
V2/ |
/ |
/ |
x--------+------> V1
<---rc--->
Quadr.3D-Projektionslaenge eines Vektors auf einen anderen Vektor: vc2 wird auf vc1 projiziert. negativ if Oeffnungswinkel > 90 Grad ! ACHTUNG: sqrt von einem negativen Wert geht ned !!!! see also UT3D_ptDi_intptvcpln /| V2/ | / | / | x--------+------> V1 <---rc--->
UT3D_slenq_2ptvc Quadr. Laenge pt-pt in Richtung vec (m. Vorzeichen !) die wahre Laenge ist sqrt(fabs(lq))*DSIGN(lq) see also UT3D_slenq_projvcvc p2 /| / | / | / | p1--------+------> VC <---rc--->
3D-Normalabstand eines Vektors auf einen anderen Vektor: vc2 wird auf vc1 projiziert. _ /| | V2/ | | / vc3 l3=rc / | | / | | x--------+------------> V1 |---v1x--|
UT3D_slenq_ptptvc signed quadr.Distance pt-pt in Richtung vec pa - pb gives a line, pc is projected onto this line. c | | len | a--------+------b e
UT3D_slen_2ptvc Laenge pt-pt in Richtung vec (m. Vorzeichen !) Wenn vc normiert ist (Laenge 1) dann genuegt Skalarprodunkt (UT3D_acos_2vc) p1-vc definieren eine Plane; p1=Origin, vc=Normalvektor. p2 auf die Plane p1-vc projizieren (ergibt ps); die Laenge p2-ps liefern. p2....... p2 . . . . . . . . p1--------+------> vc <---rc--->
UT3D_comp4pt compare 4 points Ob 2 der 4 Punkte zusammenpassen (ob 2 Lines einen gemeinsamen Punkt haben). Es wird nur der Abstand entlang der Hauptachsen getestet ! rc=0: keine Verbindung rc=1: bei El. liegen richtig. rc=2: Obj 1 verkehrt rc=3: Obj 2 verkehrt rc=4: Obj 1 und Obj 2 verkehrt Retcode 0 = Abstand aller Punkte > tol 1 = Abstand (p1e - p2a) < tol (beide Obj. liegen korrekt) 2 = Abstand (p1a - p2a) < tol (Obj 1 verkehrt) 3 = Abstand (p1e - p2e) < tol (Obj 2 verkehrt) 4 = Abstand (p1a - p2e) < tol (Obj 1 und 2 verkehrt)
UT3D_compn4pt compare 4 points - find nearest points rc wie UT3D_comp4pt rc=1: bei El. liegen richtig. (p2-p3 nearest) rc=2: Obj 1 verkehrt (p1-p3 nearest) rc=3: Obj 2 verkehrt (p2-p4 nearest) rc=4: Obj 1 und Obj 2 verkehrt (p1-p4 nearest)
UT3D_sid_ptptvc compare if pt is in, above or below plane Plane is defind by origin pto and z-vector vz retcode: 0 pt is in plane pl 1 pt is above plane pl (same side as the z-vector) -1 pt is below plane pl
UT3D_sid_ptpl compare if pt is in, above or below plane retcode: 0 pt is in plane pl 1 pt is above plane pl (same side as the z-vector) -1 pt is below plane pl
UT3D_sid_3pt check if pt is in, before or behind perpendic.Plane Ist p3 vor oder hinter der Ebene, die durch p1 geht u.normal auf p1-p2 steht RC -1 p3 liegt vor Ebene p1-p2 (vis-a-vis) RC 0 p3 liegt genau in der Ebene RC 1 liegt hinter Ebene p1-p2 (in der Naehe von p2) see also UT3D_acos_2vc
UT3D_sid_2vc check vc's for perp, same or opposit direction Ist p3 vor oder hinter der Ebene, die durch p1 geht u.normal auf p1-p2 steht sind Vektoren eher parallel oder anpiparallel .. RC -1 vc's point into opposit direction RC 0 vc's are perpendicular RC 1 vc's point into same direction see also UT3D_acos_2vc
int UT3D_pt_ck_linear | ( | int | np, | |
Point * | ptab, | |||
double | tol | |||
) |
UT3D_pt_ck_linear check straight position of points Check if points form a straight line IN: int np ... number of points Point *ptab ... points double tol ... tolerance for straightness (>0) (as smaller tol as straighter the points) irc: 0 = position of points is not straight 1 = position of points is straight
UT3D_pt_ck_npt compare point / points check if p0 ist identical with one of the points of pTab Retcode: irc = -1 all points have a distance > tol irc >= 0 index of (first) identical point;
UT3D_pt_ck_ptvc check if point is on unlimited line (point-vector) RC = -1 NO; Point pt is outside Line pl1-pl2 RC = 0 Yes; pt is nearer than tol to line pl1-pl2 see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc UT3D_pt_projptln
UT3D_pt_ck_2pt check if point is on unlimited line (2 points) RC = -1 NO; Point pt is outside Line pl1-pl2 RC = 0 Yes; pt is nearer than tol to line pl1-pl2 see UT3D_pt_projptptvc UT3D_pt_projptln UT3D_pt_ck_onLine
UT3D_pt_ck_inLine check point on line segment Check if a 3. point lies inside the line segment defined by two points. It is assumed that the point is ON the line defined by the two points. IN: Point p1 ... point 1 defining the line segment Point p2 ... point 2 defining the line segment Point p3 ... point to check double tol ... tolerance for point to ly inside line segment (>0) OUT: Returncodes: 0 = the point lies outside the segment 1 = the point lies inside the segment
liegt p3 auf der Linie p1-p2 ? (Tests mit UT_TOL_pt) RC = -1 NO; Point outside Line p1-p2 RC = 0 Yes; p3=p1; po=p1. RC = 1 Yes; po between p1-p2 RC = 2 Yes; p3=p2; po=p2. see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc UT3D_pt_projptln
liegt p3 auf der Linie p1-p2 ? (Tests mit UT_TOL_pt) Speziell fuer Polygone; RC = -1 NO; Point outside Line p1-p2 RC = 0 Yes; p3=p1; po=p1. RC = 1 Yes; po between p1-p2 RC = 2 Yes; p3=p2; po=p2.
UT3D_pt_ck_inSph check if point is inside sphere irc: 1 = YES point lies inside 0 = --- point touches -1 = NO point lies outside
void UT3D_pt_3db | ( | Point * | pt, | |
double | x, | |||
double | y, | |||
double | z | |||
) |
UT3D_pt_3db Point < 3 doubles (x, y, z)
UT3D_pt_ci__ 90/180/270-deg-point of circ imod -1: rc returns nr of points; 4 for 360-deg-circs, else 2. if (circ == 360-deg-circ): imod: 0=0, 1=90, 2=180, 3=270 Grad ! else if (circ < 360-deg): imod: 0=p1, 1=p2
UT3D_2pt_oppptvclen 2 opposite points (center, vector, dist) pc is center, p1 is direction vc1 from pc, p2 in reverse direction.
UT3D_ipt_ckfar_npt return index of farest Point from n points
UT3D_ipt_cknear_3pt return index of nearest Point from 3 points RetCod 0: p0-p1 is nearest 1: p0-p2 is nearest
UT3D_ipt_cknear_npt return index of nearest Point from n points
UT3D_ipt_cknearn_npt return index of n-nearest Point from n points distNr=0: return index of nearest point; distNr=1: return index of 2.nearest point ...
int UT3D_ipt2_npt | ( | int * | ip1, | |
int * | ip2, | |||
Point * | pta, | |||
int | pNr | |||
) |
find the indices of the most extreme points ..
ind. of outermost points in direction vc of n pt's mode 0 = start, >0 = resume see UT3D_slen_2ptvc UT3D_slen_ptpl
testen, ob pt1 AUF Polygon liegt RetCod 0 pt1 is on polygon ptab RetCod -1 pt1 is not on polygon ptab
check if point p3 is inside box of points p1-p2
Returncodes:
-1 = the point lies outside the box
0 = the point lies inside the segment
check if point is on circ segment
ACHTUNG: Radius und ob in gleicher Plane wird nicht mehr getestet !
Es wird nur geprueft ob zwischen Start- und Endpunkt.
RC = -1 NO; Point outside Line p1-p2
RC = 0 Yes; p3=p1; po=p1.
RC = 1 Yes; po between p1-p2
RC = 2 Yes; p3=p2; po=p2.
UT3D_pt_oppptptvc point opposite line (= 180 deg rot.)
====.==================================================================
UT3D_pt_traptvc1len transl. point into dir vc dist.lenv (vcLen=1) Vector has Length 1.; Point = basePoint + (vec * len)
UT3D_pt_ptvclen transl. point into dir vc dist. lenv Move point into direction vc with distance dx. po kann mit pi ident sein.
void UT3D_pt_trapt2vc2len | ( | Point * | po, | |
Point * | pi, | |||
Vector * | vc1, | |||
double | len1, | |||
Vector * | vc2, | |||
double | len2 | |||
) |
UT3D_pt_trapt2vc2len transl. point into 2 directions (2 len's) Move point into direction vc with distance dx. po kann mit pi ident sein.
void UT3D_pt_trapt3vc3len | ( | Point * | po, | |
Point * | pi, | |||
Vector * | vx, | |||
double | dx, | |||
Vector * | vy, | |||
double | dy, | |||
Vector * | vz, | |||
double | dz | |||
) |
UT3D_pt_trapt3vc3len transl. point into 3 directions (3 len's) Move point into direction vx,vy,vz with distance dx, dy dz. po kann mit pi ident sein.
UT3D_pt_trapt2pt transl. point distance p1 -> p2
UT3D_pt_traptptlen transl. point into dir pDir dist. lenv Move point into direction pi->pDir with distance lenv. po kann mit pi ident sein.
Kreisstartpunkt p1 um die Achse vz um angr weiterdrehen pc und p1 muesssen am gleichen Kreis liegen (sonst ev 2 x UT3D_vc_perp2vc) angr = -2Pi bis +2Pi. angr=0: pto = ln1.p1; angr=1: pto = ln1.p2;
Rotate Point (prepare with UT3D_m3_inirot)
UT3D_pt_rotptptangr rotate pti around ptc/Z-Axis
Punkt pti um die Achse pta/vca um angr weiterdrehen angr = -2Pi bis +2Pi. ACHTUNG: vca muss normiert sein !!
UT3D_pt_projptci point = project point to circ
UT3D_pt_projpt2pt point = project point pt to line p1+p2 retcod 0=OK, 1=pt is on line, 2=Inputerror (vl too short) see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc
UT3D_pt_projptptvc point = project point pt to line pl+vl pl - vl gives a line, pt is projected onto this line. X pt | len| | pl------+--------vl pp retcod 0=OK, 1=pt is on line, 2=Inputerror (vl too short) E001 vl too short see also UT3D_pt_ck_ptvc UT3D_pt_ck_onLine UT3D_nlen_2ptvc UT3D_pt_projptptvc UT3D_pt_projptln
UT3D_pt_projptptnvc project point pt to plane from Origin, Z-vec
UT3D_pt_projptpl point = project point to plane
see UPRJ_app_pt
UT3D_pt_intplnln intersect LineSegment X Plane Von pl wird nur p und vz benutzt. Returncodes: -1 = LineSegment outside Plane 0 = vc parallel to plane 1 = OK; intersecting ... 2 = ip = ln.p1 3 = ip = ln.p2
UT3D_pt_intlnpl point = intersection of line - plane Returncodes: 0 = line parallel to plane 1 = OK;
UT3D_pt_intptvcpl_ point = intersection of pt / vc - plane Von pl wird nur p und vz benutzt. Returncodes: 0 = vc parallel to plane 1 = OK;
int UT3D_ptDi_intptvcptvc | ( | Point * | ip, | |
double * | dist, | |||
Point * | ptl, | |||
Vector * | vcl, | |||
Point * | ptp, | |||
Vector * | vcp | |||
) |
intersect line-plane (pt-vc pt-vc) ip = project pt1 along vcl onto plane ptp-vcp Output: dist = der Faktor fuer den Abstand vom pt zum ip in Richtung vln. vln * dist ab pt ergibt ip. Returncodes: 0 = vc parallel to plane 1 = OK;
UT3D_ptDi_intptvcpln intersect line-plane (pt-vc pt-vc) Von pl wird nur p und vz benutzt. Output: dist = der Faktor fuer den Abstand vom pt zum ip in Richtung vln. vln * dist ab pt ergibt ip. Returncodes: 0 = vc parallel to plane 1 = OK; see also UPRJ_app_pt UT3D_pt_intptvcplx/y/z
intersect line - plane OUT pi Intersectionpoint dl Faktor Abstand p1 - pi - p2; 0.5 ist genau in der Mitte. IN p1, p2 die Linie, die geschnitten wird dn1 dn2 der Normalabstand der Punkte p1 p2 von der Schnittebene. (get dn1 from UT3D_slen_ptpl) pi liegt auf der Geraden p1;p2. Die Plane wird ebenfalls als (hor-) Linie betrachtet. pi ist intersection dieser beiden Lines. dn. sind die NormalAbstaende von p1,p2 auf die Plane (=hor.Linie).
UT3D_pt_intptvcpln intersect line-plane (pt-vc pt-vc) Line durch Point + Vektor Plane durch Nullpunkt + Normalvektor. pl2vz muss nicht normiert sein; See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl Returncodes: 0 = OK 1 = no intersection (parallel)
UT3D_pt_intperp2ln inters ln2 with perp.plane to ln1 Plane geht durch p1 normal auf v1; Schnittpunkt liegt auf p2/v2. po-p1 hat rechten Winkel zu p1-v1. see UT3D_pt_intptvcpl; pl.po=p1; pl.vz=v1; pt=p2, vln=v2. Returncodes: 0 = vc parallel to plane; Error 1 = OK; -1 = p1 und p2 ident; po = p1.
UT3D_pt_ipl_2ptpt2 interpolate PointPosition for 2D-point Input: 2 3D-points and 1 2D-point (between the 3D-pt's; z-coord missing). Output: 3D-Point with interpolated Z-coord. see also UTP_param_p0p1px UTP_px_paramp0p1px
mirror point in plane pt auf die Pln projiz; opposite Punkt = gespiegelter pt.
int UT3D_isConvx_ptTab | ( | int | pNr, | |
Point * | pa | |||
) |
check if is contour convex or concave UT3D_isConvx_ptTab nach Karl Sauer 2005-08-12 pa ist eine geschlossene Kontur; der erste und der letzte Punkt sind ident ! irc 1 Konvex: zB ein Polyeder, kann via GL_DrawFan dargestellt werden irc -1 Konkav: tesselieren
int UT3D_parpt_objpt | ( | double * | po, | |
Point * | pti, | |||
int | oTyp, | |||
void * | oDat | |||
) |
UT3D_parpt_objpt give parameter of point on curve ACHTUNG: liefert (auch fuer B-Splines) immer Werte zwischen 0-1 !
UT3D_parpt_3pt parameter of distance of point ptx on line pl1-pl2 pl ist zwischen 0 bis 1; wenn pl=0.5 liegt ptx genau in der Mitte von pl1-pl2 ptx X /| / | / | / | / .| X-----|------------X pl1 pl=0.4 pl2 RetCodes: 0 OK -1 v1-v2 aufeinander Normal; pl = 0.
UT3D_parpt_ptvc parameter of distance of point ptx on line pt1-vc1 pl ist zwischen 0 bis 1; wenn pl=0.5 liegt ptx genau in der Mitte von pl1-pl2 ptx X /| / | / | / | / .| X-----|------------> pt1 pl=0.4 vc1 RetCodes: 0 OK -1 v1-v2 aufeinander Normal; pl = 0.
UT3D_parpt_lnbp parameter of point on line (via 2D,BackPlane) bp = Berechnungsebene BackPlane ex UT3D_bp_vcz
UT3D_parpt_ci parameter of point on circ par = gesamtlaenge_circ / laenge_von_p1_bis_pti laenge_circ = radius * Angle
UT3D_pt_tangptci tangent from point to circ RetCod: Nr of solutions; -1,1,2. see UT3D_vc_tangci UT3D_vc_tangcipt
UT3D_pt_evpar2pt evaluate param.point on line einen Punkt auf Line ln1 errechnen; lpar = Abstandswert 0 - 1. lpar=0: pto = ln1.p1; lpar=1: pto = ln1.p2;
UT3D_pt_evparln evaluate param.point on line einen Punkt auf Line ln1 errechnen; lpar = Abstandswert 0 - 1. lpar=0: pto = ln1.p1; lpar=1: pto = ln1.p2;
UT3D_pt_evparci evaluate param.point on circ einen Punkt auf Circ ci1 errechnen; lpar = Abstandswert 0 - 1. lpar=0: pto = ci1.p1; lpar=1: pto = ci1.p2;
int UT3D_pt_evparcrv | ( | Point * | pto, | |
double | lpar, | |||
int | typ, | |||
void * | data | |||
) |
einen Punkt auf linear obj ox1 errechnen; Aufruf nur mit der struct (statt einem ObjX): ObjGX ox1; UT3D_pt_evparcrv (pto, 0.5, ox1.form, &ox1.data); lpar = Abstandswert 0-1 oder bei BSP Knotenwert! see also UTO_obj_int UTO_stru_int UTO_get_ptpar
UT3D_pt_traptm3 apply transformation to point (from 4x3-matrix) p2 und p1 duerfen ident sein VX VY VZ Nullpunkt [0][0]=vx.dx [0][1]=vy.dx [0][2]=vz.dx [0][3]=o.x [1][0]=vx.dy [1][1]=vy.dy [1][2]=vz.dy [1][3]=o.y [2][0]=vx.dz [2][1]=vy.dz [2][2]=vz.dz [2][3]=o.z Mat via Adresse: printf(" vz=%f,%f,%f\n",(*mata)[0][2],(*mata)[1][2],(*mata)[2][2]);
int UT3D_compvcNull | ( | Vector * | v1 | ) |
int UT3D_compvc0 | ( | Vector * | v1, | |
double | tol | |||
) |
UT3D_compvc0 compare vectors for 0,0,0. Retcode 0: v1 <> 0.0 (gr. oder kl. tol) 1: v1 = 0.0 (innerhalb tol)
UT3D_comp2vc_p compare 2 vectors for parallel tolerances: see func. UT3D_vc_ck_parpl RC=1: die Vektoren sind gleich. RC=0: die Vektoren sind unterschiedlich. if(UT3D_comp2vc_p(&ciO.vz, &UT3D_VECTOR_IZ, UT_TOL_min1) != 0) gleich
UT3D_comp2vc compare 2 vectors for parallel and antiparallel tolerances: see func. UT3D_vc_ck_parpl RC=1: die Vektoren sind gleich. RC=0: die Vektoren sind unterschiedlich.
UT3D_comp2vc__ compare 2 vectors (direction and size) useable also for circles and planes (vz is normalized) tol: RAD_1 RAD_01 .. RC=1: die Vektoren sind gleich. RC=0: die Vektoren sind unterschiedlich.
UT3D_vc_ck_parpl check if vec is parallel to plane tol ca 0.1 (zB UT_TOL_cv tol 0.02 ist 1.15 Grad (bei Vec-Laenge 1 !) tol 0.01 ist 0.60 Grad (bei Vec-Laenge 1 !) tol 0.004 ist 0.23 Grad (bei Vec-Laenge 1 !) RetCode: 0 = vec is NOT parallel to plane 1 = vec is parallel to plane
UT3D_vc_ck_perpvc check if 2 vectors are normal (perpendic.) For normalized vectors use UT3D_vc_ckperp_2vc1. tol ca 0.1 (auch 1. genuegt!) RetCode: 0 = vc1 is NOT normal to vc2 1 = vc1 is normal to vc2
UT3D_vc_ckperp_2vc1 check if 2 normalized-vectors are normal (perp.) For not-normalized vectors use UT3D_vc_ck_perpvc. tol entspricht etwa der Abweichung; 1 / 0.1 = Steigung 10 : 1; 0.1 ~ 5.7 deg, 0.01 ~ 0.5 deg .. RetCode: 0 = vc1 is NOT normal to vc2 1 = vc1 is normal to vc2
int UT3D_vc_bp | ( | Vector * | vn, | |
int | bp | |||
) |
UT3D_vc_bp returns normalVector from BackPlaneNr (0-2)
get 2 vecs of max extent of a polgon (for perp.Vec) 2 normal aufeinander-stehende Vektoren eines Polygon suchen (fuer Normalvektor auf Polygon)
void UT3D_vc_2angr | ( | Vector * | vc, | |
double | angX, | |||
double | angZ | |||
) |
UT3D_vc_2vc intermediate Vector Vektoren muessen normiert sein !!! Vektoren duerfen nicht antiparallel sein !! AusgabeVektor nicht normiert !
UT3D_vc_tangci vector to circ (0. - 1.) make tangent to circ at position u ACHTUNG: dzt nur 0. und 1. !!!
UT3D_vc_tangcipt tangent to point on circ
UT3D_vc_perp2vc vector = perpendic. to 2 vectors (crossprod CROSS) Liefert den Z-Vektor wenn v1=X-vec; v2=Y-vec. Get VZ from VX, VY: UT3D_vc_perp2vc (&vz, &vx, &vy); Get VY from VZ, VX: UT3D_vc_perp2vc (&vy, &vz, &vx); Get VX from VY, VZ: UT3D_vc_perp2vc (&vx, &vy, &vz); v1, v2 muessen nicht normiert sein. vp ist nicht normiert.
UT3D_vc_perpvc2pt vector = perpendic. to vec & 2 points (crossprod) Liefert den Z-Vektor von X-Vektor, Y-AchsStartpunkt und Y-AchsEndpunkt Get VZ from VX, PY1, PY2: UT3D_vc_perp3pt (&vz, &vx, &pya, &pye); Get VY from VZ, PX1, PX2: UT3D_vc_perp3pt (&vy, &vz, &pxa, &pxe);
UT3D_vc_perp3pt vector = perpendic. to 3 points (crossprod) Liefert den Z-Vektor von Origin, X-AchsEndpunkt und Y-AchsEndpunkt Get VZ from PO, PX, PY: UT3D_vc_perp3pt (&vz, &po, &px, &py); Get VY from PO, PX, PZ: UT3D_vc_perp3pt (&vy, &po, &pz, &px);
UT3D_vc_perp4pt vector = perpendic. to 2 lines (crossprod) Get VY from VZ, PX1, PX2: UT3D_vc_perp3pt (&vy, &vz, &pxa, &pxe);
UT3D_vc_perpvcplXY Normalvektor auf vc1, der in der X-Y-Plane liegt.
UT3D_vc_perpcv Normalvektor auf planares Polygon ACHTUNG: liefert NICHT immer im gleichen Umlaufsinn ! Korrigieren !!!!
UT3D_vc_perppta Normalvektor auf planares Polygon
UT3D_vc_setLength change vectorlength vco und vci duerfen ident sein use UT3D_vc_multvc with vectors of length=1
UT3D_vc_setLenLen change vectorlength; actLen known.
Drehachse = Va, zu drehender Vector = Vi. vco Vi may be ident
UT3D_vc_perpvcvc vector = perpendic. to 2 vectors (in same plane) RetCodes: 0 OK -1 v1-v2 aufeinander Normal; v3 == v1 /| V1/ | / V3 / | / | V2 x---vcl-->------------>
UT3D_vc_projvcvc vector v3 = project vector v1 to vector v2 see UT3D_parvc_2vc RetCodes: 0 OK -1 v1-v2 aufeinander Normal; v3 ist Nullvektor. /| V1/ | / | / | / | V2 x----V3-->------------>
UT3D_vc_projvc2vc vector = project vector to plane from 2 vec's
UT3D_vc_projvcnvc project vec to plane from Z-vec den vi auf den vz projizieren; die Strecke Spitze-vi nach Spitze-vz ist der gesuchte vo. vo = vi - vz1 ^ /^ | vi/ | vo| / vo | / | | / | x--------+------------> VZ |---vz1-->
UT3D_vc_projvcpl vector = project vector to plane
mirror vector in plane dem Planeorigin den vektor aufaddieren; diesen punkt dann auf die Pln projiz; opposite Punkt = gespiegelter Vektor.
UT3D_vc_travcm3 apply transformation to vector (from 4x3-matrix) b darf ident mit a sein wird das ein normalisierter vektor ? eigentlich eine vectorTransform ? dann sollte a ein vc sein !
UT3D_vc_travcm4 apply transformation to vector (from 4x4-matrix) wird das ein normalisierter vektor ? eigentlich eine vectorTransform ? dann sollte a ein vc sein !
UT3D_comp2ln compare 2 lines if identical RC = 1 = Lines are identical RC = 0 = one of the points has a distance > tol
int UT3D_ln_ck_on_ln | ( | Point * | lo1, | |
Point * | lo2, | |||
Point * | l11, | |||
Point * | l12, | |||
Point * | l21, | |||
Point * | l22, | |||
double | tol | |||
) |
check if 2 lines collinear Input: l11, l12 Line 1 l21, l22 Line 2 Output: lo1, lo2 the collinear segment if RC==1 RetCod: -1 no 0 yes, no coverage 1 coverage: coverline out
UT3D_ln_ck_parpl check if line is parallel to plane UT3D_ln_ck_parpl Author: Thomas Backmeister 4.7.2003 Check, if a line is parallel to a plane. IN: Line *ln ... 3D-line Plane *pl ... plane double tol ... tolerance for parallelism OUT: double *dist ... signed distance line - plane if line || plane >0.0 <=> line ON side of plane normal vector <0.0 <=> line on OPPOSITE side of plane normal vector Returncodes: 0 = line is NOT parallel to plane 1 = line is parallel to plane
void UT3D_ln_6db | ( | Line * | ln, | |
double | x1, | |||
double | y1, | |||
double | z1, | |||
double | x2, | |||
double | y2, | |||
double | z2 | |||
) |
line from 2 * 3 doubles
int UT3D_ptNr_ci | ( | Circ * | ci1, | |
double | tol | |||
) |
UT3D_ptNr_ci nr of points for polygon from circle
int UT3D_ck_ci180 | ( | Circ * | ci1 | ) |
UT3D_ck_ci180 check if circ is 180-degree-circ RC = 0: YES, is 180-deg-circ RC = 1: NO if(UT3D_ck_ci180 == YES) ...
int UT3D_ck_ci360 | ( | Circ * | ci1 | ) |
UT3D_ck_ci360 check if circ is 360-degree-circ RC = 0: YES, is 360DegCirc RC = 1: NO if(UT3D_ck_ci360 == YES) ...
UT3D_cksid_civc ck if KreisStart/Endpunkt ist in Richtg VC od verk. Ein Vektor und ein Kreisbogen sind in der gleichen Ebene; Test, ob KreisStart/Endpunkt eher in Richtung des Vektors liegen oder eher verkehrt liegen. RetCod=0: Start/Endpunkt liegen in Richtung vc1 RetCod=1: Start/Endpunkt liegen verkehrt zu vc1
UT3D_ci_cipt360 change circ -> 360 deg-circ; keep dir
UT3D_ci_cip3 change start- and endpoint of circ
int UT3D_ci_ciangr | ( | Circ * | ci, | |
double | ao2 | |||
) |
UT3D_ci_ciangr change endpoint of circ from angle
void UT3D_ci_setangr | ( | Circ * | ci1 | ) |
UT3D_ci_setangr fix angle from p1-p2
Den Radius eines Kreises errechnen, von dem 3 Punkte bekannt sind. p1-p3 sind 3 punkte am Kreis. rc = a * b / 2 * hc - is halt so .. pp2 / | \ / | \ b hc a / | \ pp3 -------c--------pp1 q p
int UT3D_ci_ptrd2vc2angr | ( | Circ * | ci, | |
Point * | pc, | |||
double | rd, | |||
Vector * | vz, | |||
Vector * | vx, | |||
double | a1, | |||
double | a2 | |||
) |
circ from center, Radius, Z-Axis, X-Axis, startAngle, endAngle ACHTUNG: Z-Axis u X-Axis muessen normiert sein !!!! rd hat DrehRichtg. ACHTUNG: die Winkel werden hier umgedreht, die Kreisdrehachse ist genau verkehrt zum Plane-vz !
circ from center, point, axis, startAngle, endAngle
UT3D_ci_ptvcrd Circ from startpoint, startvector, radius .. ACHTUNG: vs und vz muessen normiert sein ! Input: ps Startpoint of circ vs tangent in ps rd Radius; positiv:circ=ccw; negativ: circ=cw. vz Axis a1 Angle in rad; 0=full circle.
UT3D_ci_3pt Circ from 3 points p1-p3 sind 3 punkte am Kreis. rc = a * b / 2 * hc - is halt so .. hx wird genau in Mitte von c angesetzt (Streckensymmetrale, Pt. pMc) hx = sqrt (r * r - (c * c / 4)) // gleichseitiges Dreieck p1,p2,Cen. pp2 / | \ / | \ b hc a / | \ pp3-------c--------pp1 q | hx,vx | Cen
UT3D_ci_2ptvcrd Circ from 2 Points-on-Circ & Radius RetCod: nr of circles in cia see UT3D_ci_ptptvcrd UT3D_ci_ptvcrd d1 | vc1 x-----------x-----------x pp1 pt1 pp2 | | |vc2 | x circ.pc
UT3D_ci_ptptvcrd Circ from startpoint endpoint radius Z-vector rd Radius; r>0 = CCW, r<0 = CW siz 1 0-180 deg siz -1 180-360 deg irc -1 p1 - p2 ident irc -2 Radius too small (p1-p2) > (rd * 2)
UT3D_ci_pcvzpt180 180 deg-circ (CCW) from center, axis, startpoint
int UT3D_ci_inv1 | ( | Circ * | ci1 | ) |
int UT3D_ci_inv2 | ( | Circ * | ci1 | ) |
UT3D_ci_inv2 invert (change dir) KreisOut = Vollkreis - KreisIn (das Komplement)
int UT3D_ci_inv3 | ( | Circ * | ci1 | ) |
UT3D_ci_inv3 invert (optisch gleich, Z-Axis invers)
UT3D_ci_ptvcr Circ from center, axis, radius
UT3D_ci_pt2vcr Circ from center, axis, x-vec and radius
int UT3D_pta_dbo | ( | Point ** | pTab, | |
int * | pNr, | |||
int | typ, | |||
long | ind, | |||
double | tol | |||
) |
Linearstueck -> Polygon. In/Out: *ptAnz wird nur in 2 geandert, wenn < 2.
UT3D_cv_ci Polygon < 3D-Kreis ptmax = max. Anzahl von Ausgabepunkten. tol = die Sehnenabweichung (wenn ptmax > 0). Wenn tol < 0.0 wird der ci1 auf genau ptmax Punkte zerteilt.
rotate curve CCW um axis ..
int UT3D_cv_inv | ( | int | ptNr, | |
Point * | pta | |||
) |
UT3D_cv_inv Punktetabelle umdrehen
int UT3D_cv_realg | ( | int | ptNr, | |
Point * | pta, | |||
int | ista | |||
) |
UT3D_cv_realg Punktetabelle umschichten (realign) pta[0] soll pta[ista] sein und dann alle anschliessenden pta[ista] ist also der erste Punkt, dann folgen alle weiteren.
UT3D_ptvc_int2pl point/vector = intersection of 2 planes Retcodes: 1 - OK 0 - no intersection; planes parallel Intersectionpoint is nearest point to both origins.
int UT3D_ptvc_int2pln | ( | Point * | pti, | |
Vector * | vci, | |||
Point * | pl1pt, | |||
Vector * | pl1vz, | |||
Point * | pl2pt, | |||
Vector * | pl2vz | |||
) |
UT3D_ptvc_int2pln point/vector = intersection of 2 planes Planes durch Nullpunkt und Normalvektoren. pl2vz muss nicht normiert sein; vci (out) ist normiert. See also UT3D_ln_int2pl UT3D_ptvc_int2pl UT3D_pt_intptvcpl Returncodes: 0 = OK 1 = no intersection (parallel planes)
UT3D_angr_2vcd angle between two vec's (always 0 <= PI)
UT3D_angr_3vc Winkel zwischen den 2 Vektoren mit Z-Vektor Bereich von 0 bis -Pi vz ist der Z-Vektor des aktiven Achsensystems. see UT3D_angr_2vc see UT3D_angr_cipt
UT3D_angr_4pt angle between 2 lines
UT3D_angr_cipt opening angle of point on Circ ACHTUNG: ES KANN KEIN VOLLKREIS ANALYSIERT WERDEN - ERGIBT Winkel 0 !! Oeffnungswinkel CCW von 0 bis 2 Pi; CW von 0 bis -2 Pi.
double UT3D_angr_ci | ( | Circ * | ci1 | ) |
UT3D_pl_pta plane from n-points ACHTUNG: Z-Vektor entspricht nicht dem Umlaufsinn ! RetCod: -1 weniger als 3 Punkte
int UT3D_pl_bpdb | ( | Plane * | plo, | |
int | bp, | |||
double | dbc | |||
) |
UT3D_pl_3pt plane from 3 point's Achtung: für Transformation manchmal ungeeignet, weil der X-Vektor immer parallel zur XY_Ebene eingerichtet wird (use UT3D_pl_pt2vc).
UT3D_pl_nobj plane fron ObjGX-table die Transformationsmatrix zu n Objekten suchen .. oTab enthaelt PT|LN|AC 1) Circ in den Inputdaten: vz auslesen, ptCen laden, Plane davon. 2) mind 2 Lines: vz=CrossProd. dazu; Origin = 1.Point, Plane davon. 3) von den InputObjekten eine Punktetabelle beladen; Plane davon.
void UT3D_pl_XYZ | ( | Plane * | pl1 | ) |
UT3D_pl_XYZ Defaultplane
plane from Origin, X-vec, Z-Vec
UT3D_pl_ptvcpt Plane aus Nullpunkt, Z-Achse und Punkt auf X-Achse
void UT3D_pl_invert | ( | Plane * | pl | ) |
int UT3D_m3_get | ( | void * | out, | |
int | mode, | |||
Mat_4x3 | ma | |||
) |
UT3D_m3_get get part of matrix; 0=VX, 1=VY, 2=VZ, 3=PO
int UT3D_m3_set | ( | Mat_4x3 | ma, | |
int | mode, | |||
void * | da | |||
) |
UT3D_m3_set set part of matrix; 0=VX, 1=VY, 2=VZ, 3=PO
UT3D_m3_copy memcpy
// VX VY VZ PO Mat_4x3 mi= { {1.0, 0.0, 0.0, 0.0}, {0.0, 1.0, 0.0, 0.0}, {0.0, 0.0, 1.0, 0.0} };
UT3D_m3_copy (mo, mi); // mi=UT3D_MAT_4x3
define rotation (axis, origin angle)
UT3D_m3_load define refSys from 3 vectors (4x3 Matrix). Die Inp.Vec. muessen nicht normiert sein. use (translate points) with UT3D_pt_traptm3
UT3D_m3_load_povxvy neues Achsensystem mit Origin,vx,vy definieren
UT3D_m3_loadpl load Plane(=Achsensystem) into 4x3 Transform.Matrix
int UT3D_m3_scl | ( | Mat_4x3 * | ma, | |
double * | sx, | |||
double * | sy, | |||
double * | sz | |||
) |
UT3D_m3_scl scale mat
m1 ist das aktive Refsys; es soll um m2 transformiert werden. Das resultierende Refsys ist m3. Die Punkte 0,0,0 1,0,0 und 0,0,1 mit m2 transformieren; die Ergebnispunkte dann mit m1 transformieren; daraus das Refsys m3 generieren.
void UT3D_m4_init | ( | Mat_4x4 | ma | ) |
UT3D_m4_init Initialize a 4x4 - matrix Fuer horiz u vert matrix. ! ( 1 0 0 0 ) ( 0 1 0 0 ) [a] = ( 0 0 1 0 ) ( 0 0 0 1 )
void UT3D_m4_init_ori | ( | Mat_4x4 | ma, | |
double | px, | |||
double | py, | |||
double | pz | |||
) |
UT3D_m4_init_ori Initialize a 4x4 - matrix with translation hor. Matrix ! Mat_4x4-horizontal: Der erste Wert ist der Index ins double-Array. VX 0=[0][0]=vx.x 1=[0][1]=vx.y 2=[0][2]=vx.z 3=[0][3]=0 VY 4=[1][0]=vy.x 5=[1][1]=vy.y 6=[1][2]=vy.z 7=[1][3]=0 VZ 8=[2][0]=vz.x 9=[2][1]=vz.y 10=[2][2]=vz.z 11=[2][3]=0 PO 12=[3][0]=o.x 13=[3][1]=o.y 14=[3][2]=o.z 15=[3][3]=1
UT3D_m4_init_rot Initialize a 4x4 - matrix with rotation
UT3D_m4_loadpl load Plane(=Achsensystem) into 4x4 Transform.Matrix kann fuer glMultMatrixd verwendet werden.
UT3D_m4_addrot Concatenate 2 4x4 - matrixes.
void UT3D_m4_addtra | ( | Mat_4x4 | ma, | |
double | px, | |||
double | py, | |||
double | pz | |||
) |
UT3D_m4_addtra add a translation into 4x4-matrix
UT3D_ptCen_2Ln give common centerPoint of 2 Lines gemeinsamer Mittelpunkt: Intersect Normalen an den LineMittelpunkten irc = 0 = OK; irc = -1 = parallel; ip = midPoint.
UT3D_pt_intlnci__ intersect line and circle Intersection of line and circle. The line need NOT lie in the plane of the circle. IN: Line *ln ... 3D-line Circ *ci ... 3D-circle OUT: int *np ... number of intersection points (0,1,2) Point xp[] ... array of intersection points Returncodes: 0 = OK 1 = no intersection
UT3D_pt_intlnci_p intersection LN-CIR (gives 0/1/2 points) Intersection of 3D-line with 3D-circle. The line must lie in the plane of the circle. !! IN: Line *ln ... 3D-line Circ *ci1 ... 3D-circle OUT: int *np ... number of intersection points (0,1,2) Point xp[] ... array of intersection points Returncode: 0 = OK 1 = no intersection; xp[0]=pc projected -> ln
line = project endpoints of line --> circPlane
int UT3D_ln_parl2ln | ( | Point * | po1, | |
Point * | po2, | |||
Point * | p11, | |||
Point * | p12, | |||
Point * | p21, | |||
Point * | p22 | |||
) |
UT3D_ln_parl2ln ln <== gemeinsame Strecke of 2 lines rc = -1: keine gemeinsame Strecke rc = 0: po1-po2 ist die gemeinsame Strecke
UT3D_ln_int2pl LN = Intersection PLN / PLN Intersection of 2 planes. The 1. point of the intersection line is the closest to the coordinate origin. The 2. point of the intersection line has distance 1 to the 1. point. IN: Plane *pl1 ... 1. plane Plane *pl2 ... 2. plane OUT: Line *ln ... intersection line of the 2 planes Returncodes: 0 = OK 1 = no intersection (parallel planes)
UT3D_ln_pts_dmax line <-- points with max. distance of pointTab. Computation of a line from a set of points. The line points will be such that their distance is maximal! Die am weitesten auseinanderliegenden Punkte suchen, Linie davon machen. IN: int np ... number of points Point *ptab ... points double tol ... tolerance: minimal desired distance between line points OUT: Line *ln ... line with maximal point distance Returncodes: 1: line exists 0: no line exists
change LineLength; center around pc
UT3D_pt_intplci intersect PLN CIR (gives 0/1/2 points) Intersection of plane and 3D-circle. IN: Plane *pl ... a plane Circ *ci ... a circle OUT: int *np ... number of intersection points (0,1,2) Point xp[] ... array of intersection points Returncode: 0 = OK 1 = no intersection (parallel planes) 2 = no intersection (plane passes circle) xp[0]=cp.pc proj -> pl
UT3D_pt_intcidpln intersect circ / perpend.offsetPlane Ein Kreis (pc=Mittelpunkt, p1=Punkt am Kreis, vz=Achse) dx ist der Abstand der Plane vom pc. Eine Plane normal zur Kreisflaeche im Abstand von dx schneidet den Kreis. Z-Vektor der Plane ist pc-p1; der vz ist der X-vec der Plane. Origin der Plane ist ppo (Vom pc in Richtg p1 Abstand dx) Output: die beiden Schnittpunkte mit der Plane. np Anzahl Schnittpunkte (0/1/2)
UT3D_pt_intlnsph intersect unlimited line / sphere irc -1 Error (vl too short) irc 0 pl-vl outside sphere irc 1 touches - OK - 1 point out irc 2 OK, 2 points out. Richtung entspricht vl.
UT3D_pt_int2ln intersect 2 unlimitedLines; get 2 points & dist. IN: Line *ln1 ... line 1 Line *ln2 ... line 2 OUT: Point *ip1 ... point on line 1; NULL: do not compute. Point *ip2 ... point on line 2 double *dist ... minimal distance between ip1 and ip2 NULL = do not compute. Returncodes: -1 = Lines parallel or zero-length 0 = OK; dist gives the minimum distance. 1 = OK; distance (ip1-ip2) is less than UT_TOL_pt
int UT3D_plcoe_pl | ( | polcoeff_d3 * | co, | |
Plane * | pl | |||
) |
UT3D_plcoe_pl plane equation <-- plane Computation of the coefficients of the plane equation to a plane, i.e. a, b, c, d such that a*X + b*Y + c*Z = d; IN: Plane *pl ... plane OUT: polcoeff_d3 *co ... coefficients of plane equation Returncodes: 0 = OK
int UT3D_pl_plcoe | ( | Plane * | pl, | |
polcoeff_d3 * | co | |||
) |
UT3D_pl_plcoe plane <-- plane equation Computation of the plane from the coefficients of the plane equation. IN: polcoeff_d3 *co ... coefficients of plane equation OUT: Plane *pl ... plane Returncodes: 0 = OK -1 = input error
UT3D_bp_2pt returns main-BackPlaneNr (0-2) from 2 points Hauptebene mit dem hoechsten Wert waehlen; zb fuer UT3D_parpt_lnbp
int UT3D_bp_vc_ | ( | Vector * | vc1 | ) |
UT3D_bp_vc_ returns main-BackPlaneNr (0-2) from vec eine Hilfsebene auswaehlen; Input ist ein Vektor; es wird jene Hauptebene mit dem hoechsten Wert gewaehlt. vc1 rc 1 0 0 1 = BCKPLN_XZ skip Y-Vec 0 1 0 2 = BCKPLN_XY skip Z-Vec 0 0 1 0 = BCKPLN_YZ skip X-Vec
int UT3D_bp_vcz | ( | Vector * | vcn | ) |
UT3D_bp_vcz returns main-BackPlaneNr (0-2) from normalvec eine Hilfsebene auswaehlen; Input ist der Normalvektor der Ebene; es wird jene Hauptebene mit dem geringsten Wert gewaehlt. In: Out: 1,0,0 X-Vektor: 0 = BCKPLN_YZ es wird Y-Z-Plane gewaehlt; 0,1,0 Y-Vektor: 1 = BCKPLN_XZ es wird X-Z-Plane gewaehlt; 0,0,1 Z-Vektor: 2 = BCKPLN_XY es wird X-Y-Plane gewaehlt;
int UT3D_bp_pta | ( | int | pNr, | |
Point * | pa | |||
) |
UT3D_parvc_2vc parameter of distance of vec1 projected on vec2 mainPln: from UT3D_plmain_vcz. pl ist zwischen 0 bis 1; wenn pl=0.5 liegt der Endpunkt von V2 genau in der Mitte des Vektors V2. V1,V2 have same startpoint s. x /| / | V1 | / | / .| s-----x---V2-------> pl=0.4 RetCodes: 0 OK -1 v1-v2 aufeinander Normal; pl = 0.
UT3D_parvc_2vcbp parameter of distance of vec1 projected on vec2 mainPln: Berechnungsebene BackPlane ex UT3D_bp_vcz. dl ist zwischen 0 bis 1; wenn dl=0.5 liegt der Endpunkt von V2 genau in der Mitte des Vektors V2. V1,V2 have same startpoint s. x /| / | V1 | / | / | s---------V2-------x dl
int UT3D_2parvc_3vcbp | ( | double * | dx, | |
double * | dy, | |||
int | mainPln, | |||
Vector * | v1, | |||
Vector * | v2, | |||
Vector * | v3 | |||
) |
UT2D_2parvc_3vc project end of vec1 along vec2 on vec3 mainPln: Berechnungsebene BackPlane ex UT3D_bp_vcz. Zu gegebenen Vektoren v1, v2, v3 finden wir Zahlen x und y so, dass dx * v1 + dy * v3 = v2. dx/dy sind zwischen 0 bis 1; wenn dx=0.5 liegt der Endpunkt von V2 genau in der Mitte des Parallelogramss V1-V3. y \ V1,V2,V3 have same startpoint s. dy \-----------x \ / \ \ / \ V3 \ V2 \ \ / \ \ / \ s----------------------------x dx V1