46#define pl_A pl_points[0]
157 const struct bn_tol *tol);
185 const struct bn_tol *tol);
211 const struct bn_tol *tol);
249 const struct bn_tol *tol);
291 const struct bn_tol *tol);
306 const struct bn_tol *tol);
314 const struct bn_tol *tol);
349 const struct bn_tol *tol);
393 const struct bn_tol *tol);
397 const struct bn_tol *tol);
445 const struct bn_tol *tol);
462 const struct bn_tol *tol);
494 const struct bn_tol *tol);
537 const struct bn_tol *tol);
574 const struct bn_tol *tol);
621 const struct bn_tol *tol);
641 const struct bn_tol *tol);
653 const struct bn_tol *tol);
701 const struct bn_tol *tol);
758 const struct bn_tol *tol);
788 const struct bn_tol *tol);
795 const struct bn_tol *tol);
832 const struct bn_tol *tol);
950 const struct bn_tol *tol);
956 const struct bn_tol *tol);
992 const struct bn_tol *tol);
1007 const struct bn_tol *tol);
1072 const struct bn_tol *tol);
1096 const struct bn_tol *tol);
1099#define BG_CLASSIFY_UNIMPLEMENTED 0x0000
1100#define BG_CLASSIFY_INSIDE 0x0001
1101#define BG_CLASSIFY_OVERLAPPING 0x0002
1102#define BG_CLASSIFY_OUTSIDE 0x0003
1135 const size_t pl_count);
Header file for the BRL-CAD common definitions.
int bg_make_pnt_3planes(point_t pt, const plane_t a, const plane_t b, const plane_t c)
Given the description of three planes, compute the point of intersection, if any. The direction vecto...
int bg_pnt3_pnt3_equal(const point_t a, const point_t b, const struct bn_tol *tol)
int bg_isect_line3_line3(fastf_t *s, fastf_t *t, const point_t p0, const vect_t u, const point_t q0, const vect_t v, const struct bn_tol *tol)
int bg_plane_pt_nrml(plane_t *p, point_t pt, vect_t nrml)
Given an origin and a normal, create a plane_t.
int bg_isect_line_lseg(fastf_t *t, const point_t p, const vect_t d, const point_t a, const point_t b, const struct bn_tol *tol)
Intersect a line in parametric form:
int bg_coplanar(const plane_t a, const plane_t b, const struct bn_tol *tol)
Test if two planes are identical. If so, their dot products will be either +1 or -1,...
double bg_dist_pnt3_along_line3(const point_t p, const vect_t d, const point_t x)
Return the parametric distance t of a point X along a line defined as a ray, i.e. solve X = P + t * D...
int bg_isect_2lines(fastf_t *t, fastf_t *u, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
int bg_plane_closest_pt(fastf_t *u, fastf_t *v, plane_t p, point_t pt)
Find the closest U,V point on the plane p to 3d point pt.
int bg_isect_planes(point_t pt, const plane_t planes[], const size_t pl_count)
Calculates the point that is the minimum distance from all the planes in the "planes" array....
double bg_dist_line_origin(const point_t pt, const vect_t dir)
Given a parametric line defined by PT + t * DIR, return the closest distance between the line and the...
int bg_distsq_pnt3_lseg3_v2(fastf_t *distsq, const fastf_t *a, const fastf_t *b, const fastf_t *p, const struct bn_tol *tol)
int bg_isect_line3_plane(fastf_t *dist, const point_t pt, const vect_t dir, const plane_t plane, const struct bn_tol *tol)
void bg_rotate_plane(plane_t oplane, const mat_t mat, const plane_t iplane)
Transform a plane equation by the given 4x4 matrix.
double bg_dist_line2_point2(const point_t pt, const vect_t dir, const point_t a)
Given a parametric line defined by PT + t * DIR and a point A, return the closest distance between th...
double bg_dist_pnt2_along_line2(const point_t p, const vect_t d, const point_t x)
Return the parametric distance t of a point X along a line defined as a ray, i.e. solve X = P + t * D...
double bg_dist_pnt3_pnt3(const point_t a, const point_t b)
Returns distance between two points.
int bg_hlf_class(const plane_t half_eqn, const vect_t min, const vect_t max, const struct bn_tol *tol)
Classify a halfspace, specified by its plane equation, against a bounding RPP.
double bg_area_of_triangle(const point_t a, const point_t b, const point_t c)
Returns the area of a triangle. Algorithm by Jon Leech 3/24/89.
int bg_3pnts_distinct(const point_t a, const point_t b, const point_t c, const struct bn_tol *tol)
int bg_lseg3_lseg3_parallel(const point_t sg1pt1, const point_t sg1pt2, const point_t sg2pt1, const point_t sg2pt2, const struct bn_tol *tol)
int bg_make_plane_3pnts(plane_t plane, const point_t a, const point_t b, const point_t c, const struct bn_tol *tol)
double bg_dist_pnt_lseg(point_t pca, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
int bg_2line3_colinear(const point_t p1, const vect_t d1, const point_t p2, const vect_t d2, double range, const struct bn_tol *tol)
Returns non-zero if the 3 lines are collinear to within tol->dist over the given distance range.
int bg_isect_pnt2_lseg2(fastf_t *dist, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
Intersect a point P with the line segment defined by two distinct points A and B.
int bg_3pnts_collinear(point_t a, point_t b, point_t c, const struct bn_tol *tol)
Check to see if three points are collinear.
double bg_distsq_line3_pnt3(const point_t pt, const vect_t dir, const point_t a)
double bg_dist_line3_pnt3(const point_t pt, const vect_t dir, const point_t a)
int bg_isect_lseg2_lseg2(fastf_t *dist, const point_t p, const vect_t pdir, const point_t q, const vect_t qdir, const struct bn_tol *tol)
Intersect two 2D line segments, defined by two points and two vectors. The vectors are unlikely to be...
int bg_between(double left, double mid, double right, const struct bn_tol *tol)
void bg_rotate_bbox(point_t omin, point_t omax, const mat_t mat, const point_t imin, const point_t imax)
Transform a bounding box (RPP) by the given 4x4 matrix. There are 8 corners to the bounding RPP....
int bg_fit_plane(point_t *c, vect_t *n, size_t npnts, point_t *pnts)
Calculates the best fit plane for a set of points.
int bg_dist_pnt2_lseg2(fastf_t *dist_sq, fastf_t pca[2], const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
Find the distance from a point P to a line segment described by the two endpoints A and B,...
int bg_coplanar_pts(const point_t *pts, int pt_cnt, const struct bn_tol *tol)
Test if a set of points are coplanar. Note: if 0 < pt_cnt <=3 the point(s) are trivially coplanar,...
int bg_dist_pnt3_lseg3(fastf_t *dist, point_t pca, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
Find the distance from a point P to a line segment described by the two endpoints A and B,...
int bg_does_ray_isect_tri(const point_t pt, const vect_t dir, const point_t V, const point_t A, const point_t B, point_t inter)
int bg_isect_line2_line2(fastf_t *dist, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
int bg_isect_line2_lseg2(fastf_t *dist, const point_t p, const vect_t d, const point_t a, const vect_t c, const struct bn_tol *tol)
Intersect a line in parametric form:
double bg_angle_measure(vect_t vec, const vect_t x_dir, const vect_t y_dir)
int bg_npnts_distinct(const int npts, const point_t *pts, const struct bn_tol *tol)
double bg_distsq_line2_point2(const point_t pt, const vect_t dir, const point_t a)
Given a parametric line defined by PT + t * DIR and a point A, return the closest distance between th...
int bg_isect_pnt_lseg(fastf_t *dist, const point_t a, const point_t b, const point_t p, const struct bn_tol *tol)
Intersect a point P with the line segment defined by two distinct points A and B.
int bg_dist_line3_lseg3(fastf_t *dist, const fastf_t *p, const fastf_t *d, const fastf_t *a, const fastf_t *b, const struct bn_tol *tol)
int bg_plane_pt_at(point_t *pt, plane_t p, fastf_t u, fastf_t v)
Return the 3D point on the plane at parametric coordinates u, v.
int bg_isect_lseg3_lseg3(fastf_t *dist, const point_t p, const vect_t pdir, const point_t q, const vect_t qdir, const struct bn_tol *tol)
Intersect two 3D line segments, defined by two points and two vectors. The vectors are unlikely to be...
int bg_dist_pnt3_line3(fastf_t *dist, point_t pca, const point_t a, const point_t p, const vect_t dir, const struct bn_tol *tol)
int bg_distsq_line3_line3(fastf_t dist[3], point_t P, vect_t d, point_t Q, vect_t e, point_t pt1, point_t pt2)
Calculate the square of the distance of closest approach for two lines.
int bg_dist_line3_line3(fastf_t dist[2], const point_t p1, const point_t p2, const vect_t d1, const vect_t d2, const struct bn_tol *tol)
int bg_isect_2planes(point_t pt, vect_t dir, const plane_t a, const plane_t b, const vect_t rpp_min, const struct bn_tol *tol)
Given two planes, find the line of intersection between them, if one exists. The line of intersection...
void int char int int double * min
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
double fastf_t
fastest 64-bit (or larger) floating point type
fastf_t mat_t[ELEMENTS_PER_MAT]
4x4 matrix
fastf_t plane_t[ELEMENTS_PER_PLANE]
Definition of a plane equation.
fastf_t point_t[ELEMENTS_PER_POINT]
3-tuple point
fastf_t pl_2d_com[MAXPTS]
struct plane_specific * pl_forw
point_t pl_points[MAXPTS]
signed char * tri_normals
struct tri_float_specific * tri_forw
struct tri_specific * tri_forw
fundamental vector, matrix, quaternion math macros