#include "common.h"
#include <stddef.h>
#include <stdio.h>
#include <math.h>
#include <strings.h>
#include "machine.h"
#include "bu.h"
#include "vmath.h"
#include "bn.h"
#include "nmg.h"
#include "db.h"
#include "rtgeom.h"
#include "raytrace.h"
#include "nurb.h"
#include "./debug.h"
#include "noalias.h"
Include dependency graph for g_arb.c:
Go to the source code of this file.
Data Structures | |
struct | oface |
struct | aface |
struct | arb_specific |
struct | prep_arb |
struct | arb_info |
Defines | |
#define | RT_SLOPPY_DOT_TOL 0.0087 |
#define | NO 0 |
#define | YES 1 |
#define | SEG_MISS(SEG) (SEG).seg_stp=(struct soltab *) 0; |
#define | ARB_FACE(valp, a, b, c, d) |
#define | RT_ARB_EDIT_EDGE 0 |
#define | RT_ARB_EDIT_POINT 1 |
#define | RT_ARB7_MOVE_POINT_5 11 |
#define | RT_ARB6_MOVE_POINT_5 8 |
#define | RT_ARB6_MOVE_POINT_6 9 |
#define | RT_ARB5_MOVE_POINT_5 8 |
#define | RT_ARB4_MOVE_POINT_4 3 |
Functions | |
void | rt_arb_ifree (struct rt_db_internal *) |
int | rt_arb_get_cgtype (int *cgtype, struct rt_arb_internal *arb, const struct bn_tol *tol, register int *uvec, register int *svec) |
int | rt_arb_std_type (const struct rt_db_internal *ip, const struct bn_tol *tol) |
void | rt_arb_centroid (point_t center_pt, const struct rt_arb_internal *arb, int npoints) |
HIDDEN int | rt_arb_add_pt (register pointp_t point, const char *title, struct prep_arb *pap, int ptno, const char *name) |
HIDDEN int | rt_arb_mk_planes (register struct prep_arb *pap, struct rt_arb_internal *aip, const char *name) |
HIDDEN int | rt_arb_setup (struct soltab *stp, struct rt_arb_internal *aip, struct rt_i *rtip, int uv_wanted) |
int | rt_arb_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) |
void | rt_arb_print (register const struct soltab *stp) |
int | rt_arb_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) |
void | rt_arb_vshot (struct soltab **stp, struct xray **rp, struct seg *segp, int n, struct application *ap) |
void | rt_arb_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp) |
void | rt_arb_curve (register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) |
void | rt_arb_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) |
void | rt_arb_free (register struct soltab *stp) |
int | rt_arb_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) |
int | rt_arb_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) |
int | rt_arb_import (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) |
int | rt_arb_export (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip) |
int | rt_arb_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) |
int | rt_arb_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip) |
int | rt_arb_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) |
int | rt_arb_tess (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) |
int | rt_arb_tnurb (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct bn_tol *tol) |
int | rt_arb_calc_points (struct rt_arb_internal *arb, int cgtype, const plane_t planes[6], const struct bn_tol *tol) |
int | rt_arb_3face_intersect (point_t point, const plane_t planes[6], int type, int loc) |
int | rt_arb_calc_planes (Tcl_Interp *interp, struct rt_arb_internal *arb, int type, plane_t planes[6], const struct bn_tol *tol) |
int | rt_arb_move_edge (Tcl_Interp *interp, struct rt_arb_internal *arb, vect_t thru, int bp1, int bp2, int end1, int end2, const vect_t dir, plane_t planes[6], const struct bn_tol *tol) |
int | rt_arb_edit (Tcl_Interp *interp, struct rt_arb_internal *arb, int arb_type, int edit_type, vect_t pos_model, plane_t planes[6], const struct bn_tol *tol) |
Variables | |
const struct bu_structparse | rt_arb_parse [] |
const int | rt_arb_faces [5][24] |
const int | rt_arb_planes [5][24] |
short | earb8 [12][18] |
short | earb7 [12][18] |
short | earb6 [10][18] |
short | earb5 [9][18] |
short | earb4 [5][18] |
An ARB is a convex volume bounded by 4 (pyramid), 5 (wedge), or 6 (box) planes. This analysis depends on the properties of objects with convex hulls. Let the ray in question be defined such that any point X on the ray may be expressed as X = P + k D. Intersect the ray with each of the planes bounding the ARB as discussed above, and record the values of the parametric distance k along the ray.
With outward pointing normal vectors, note that the ray enters the half-space defined by a plane when D cdot N < 0, is parallel to the plane when D cdot N = 0, and exits otherwise. Find the entry point farthest away from the starting point bold P, i.e. it has the largest value of k among the entry points. The ray enters the solid at this point. Similarly, find the exit point closest to point P, i.e. it has the smallest value of k among the exit points. The ray exits the solid here.
This algorithm is due to Cyrus & Beck, USAF.
Author - Michael John Muuss
Source - SECAD/VLD Computing Consortium, Bldg 394 The U. S. Army Ballistic Research Laboratory Aberdeen Proving Ground, Maryland 21005
Definition in file g_arb.c.