BRL-CAD
Collaboration diagram for Primitives:

Modules

 N-Manifold Geometry
 
 NURBS
 

Files

file  arb8.c
 
file  arbn.c
 
file  ars.c
 
file  bot.c
 
file  g_bot_include.c
 
file  bspline.cpp
 
file  cline.c
 
file  dsp.c
 
file  ebm.c
 
file  ehy.c
 
file  ell.c
 
file  epa.c
 
file  eto.c
 
file  extrude.c
 
file  grip.c
 
file  half.c
 
file  hf.c
 
file  hrt.c
 
file  hyp.c
 
file  grip.c
 
file  metaball.c
 
file  metaball_tri.c
 
file  nmg.c
 
file  part.c
 
file  pipe.c
 
file  poly.c
 
file  rec.c
 
file  revolve.c
 
file  rhc.c
 
file  rpc.c
 
file  sketch.c
 
file  sph.c
 
file  submodel.c
 
file  superell.c
 
file  tgc.c
 
file  tor.c
 
file  vol.c
 
file  xxx.c
 

Data Structures

struct  oface
 
struct  aface
 
struct  arb_specific
 
struct  prep_arb
 
struct  arb_info
 
struct  arbn_pts
 
struct  arbn_edges
 
struct  poly_face
 
struct  bot_fold_data
 
struct  bot_edge
 
struct  tri_edges
 
struct  tri_pts
 
struct  cline_specific
 
struct  cline_vert
 
struct  dsp_rpp
 
struct  dsp_bb
 
struct  dsp_bb_layer
 
struct  dsp_specific
 
struct  bbox_isect
 
struct  isect_stuff
 
struct  rt_ebm_specific
 
struct  ebm_hit_private
 
struct  ebm_edge
 
struct  ehy_specific
 
struct  ell_specific
 
struct  ell_draw_configuration
 
struct  ellipse_cross_section
 
struct  ell_state
 
struct  ell_vert_strip
 
struct  epa_specific
 
struct  eto_specific
 
struct  extrude_specific
 
struct  loop_inter
 
struct  grip_specific
 
struct  half_specific
 
struct  hf_specific
 
struct  joint_specific
 
struct  joint_selection
 
struct  rec_specific
 

Macros

#define RT_SLOPPY_DOT_TOL   0.0087 /* inspired by RT_DOT_TOL, but less tight (.5 deg) */
 
#define ARB_AO(_t, _a, _i)   offsetof(_t, _a) + sizeof(point_t) * _i + sizeof(point_t) / ELEMENTS_PER_POINT * X
 
#define RT_ARB8_SEG_MISS(SEG)   (SEG).seg_stp=RT_SOLTAB_NULL
 
#define ARB_FACE(vlist_head, arb_pts, 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
 
#define LOC(i, j)   i*(aip->neqn)+j
 
#define TRI_NULL   ((struct tri_specific *)0)
 
#define IJ(ii, jj)   (((i+(ii))*(arip->pts_per_curve+1))+(j+(jj)))
 
#define ARS_PT(ii, jj)   (&arip->curves[i+(ii)][(j+(jj))*ELEMENTS_PER_VECT])
 
#define FIND_IJ(a, b)
 
#define ASSOC_GEOM(corn, a, b)
 
#define GLUE(_a, _b)   _a ## _b
 
#define XGLUE(_a, _b)   GLUE(_a, _b)
 
#define MAXHITS   128
 
#define BOT_MIN_DN   1.0e-9
 
#define BOT_UNORIENTED_NORM(_ap, _hitp, _out)
 
#define TRI_TYPE   float
 
#define TRI_TYPE   double
 
#define NORM_TYPE   signed char
 
#define NORM_TYPE   fastf_t
 
#define NORMAL_SCALE   127.0
 
#define NORMAL_SCALE   1.0
 
#define ONE_OVER_SCALE   (1.0/127.0)
 
#define ONE_OVER_SCALE   1.0
 
#define MAX_AFFECTED_FACES   128
 
#define REMAP_BOT_VERTS(_oldbot, _newbot, _vmap, _vcount, _ovi, _i)
 
#define RT_CLINE_O(m)   bu_offsetof(struct rt_cline_internal, m)
 
#define FULL_DSP_DEBUGGING   1
 
#define ORDERED_ISECT   1
 
#define DIM_BB_CHILDREN   4
 
#define NUM_BB_CHILDREN   (DIM_BB_CHILDREN*DIM_BB_CHILDREN)
 
#define IMPORT_FAIL(_s)
 
#define MAGIC_dsp_bb   234
 
#define DSP_BB_CK(_p)   BU_CKMAG(_p, MAGIC_dsp_bb, "dsp_bb")
 
#define LAYER(l, x, y)   l->p[l->dim[1]*y+x]
 
#define XCNT(_p)   (((struct rt_dsp_internal *)_p)->dsp_xcnt)
 
#define YCNT(_p)   (((struct rt_dsp_internal *)_p)->dsp_ycnt)
 
#define XSIZ(_p)   (_p->dsp_i.dsp_xcnt - 1)
 
#define YSIZ(_p)   (_p->dsp_i.dsp_ycnt - 1)
 
#define dlog   if (RT_G_DEBUG & DEBUG_HF) bu_log
 
#define BBOX_PLANES   7 /* 2 tops & 5 other sides */
 
#define XMIN   0
 
#define XMAX   1
 
#define YMIN   2
 
#define YMAX   3
 
#define ZMIN   4
 
#define ZMAX   5
 
#define ZMID   6
 
#define ZTOP   7
 
#define DSP_O(m)   bu_offsetof(struct rt_dsp_internal, m)
 
#define PLOT_LAYERS
 
#define CHECK_VERTS(_v)
 
#define RT_EBM_NULL   ((struct rt_ebm_specific *)0)
 
#define RT_EBM_O(m)   bu_offsetof(struct rt_ebm_internal, m)
 
#define NORM_ZPOS   3
 
#define NORM_YPOS   2
 
#define NORM_XPOS   1
 
#define NORM_XNEG   (-1)
 
#define NORM_YNEG   (-2)
 
#define NORM_ZNEG   (-3)
 
#define BIT_XWIDEN   2
 
#define BIT_YWIDEN   2
 
#define BIT(_eip, _xx, _yy)   ((unsigned char *)((_eip)->mp->apbuf))[ ((_yy)+BIT_YWIDEN)*((_eip)->xdim + BIT_XWIDEN*2)+(_xx)+BIT_XWIDEN ]
 
#define EHY_NORM_BODY   (1) /* compute normal */
 
#define EHY_NORM_TOP   (2) /* copy ehy_N */
 
#define ELL_NULL   ((struct ell_specific *)0)
 
#define RT_ELL_SEG_MISS(SEG)   (SEG).seg_stp=RT_SOLTAB_NULL
 
#define ELLOUT(n)   ov+(n-1)*3
 
#define PROLATE   1
 
#define OBLATE   2
 
#define EPA_NORM_BODY   (1) /* compute normal */
 
#define EPA_NORM_TOP   (2) /* copy epa_N */
 
#define ELLOUT(n)   ov+(n-1)*3
 
#define MAX_HITS   64
 
#define TOP_FACE   1 /* extruded face */
 
#define BOTTOM_FACE   2 /* face in uv-plane */
 
#define LINE_SEG   3
 
#define CARC_SEG   4
 
#define NURB_SEG   5
 
#define BEZIER_SEG   6
 
#define UNKNOWN   0
 
#define A_IN_B   1
 
#define B_IN_A   2
 
#define DISJOINT   3
 
#define LOOPA   1
 
#define LOOPB   2
 
#define GRIP_NULL   ((struct grip_specific *)0)
 
#define HALF_NULL   ((struct half_specific *)0)
 
#define RT_HALF_SEG_MISS(SEG)   (SEG).seg_stp=RT_SOLTAB_NULL
 
#define HF_O(m)   bu_offsetof(struct rt_hf_internal, m)
 
#define MAXHITS   128 /* # of surfaces hit, must be even */
 
#define JOINT_NULL   ((struct joint_specific *)0)
 
#define JOINT_FLOAT_SIZE   10
 
#define LOCATION_RADIUS   5
 
#define JOINT_SELECT_VMAX_DISTSQ   100.0
 
#define REC_NORM_BODY   (1) /* compute normal */
 
#define REC_NORM_TOP   (2) /* copy tgc_N */
 
#define REC_NORM_BOT   (3) /* copy reverse tgc_N */
 
#define RT_REC_SEG_MISS(SEG)   (SEG).seg_stp=(struct soltab *) 0;
 

Enumerations

enum  {
  JOINT_SELECT_LOC, JOINT_SELECT_V1, JOINT_SELECT_V2, JOINT_SELECT_PATH1,
  JOINT_SELECT_PATH2
}
 

Functions

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 *cent, const struct rt_db_internal *ip)
 
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)
 
int rt_arb_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
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, const struct rt_view_info *info)
 
int rt_arb_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol)
 
int rt_arb_import4 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_arb_export4 (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)
 
void rt_arb_ifree (struct rt_db_internal *ip)
 
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_check_points (struct rt_arb_internal *arb, int cgtype, const struct bn_tol *tol)
 
int rt_arb_3face_intersect (point_t point, const plane_t *planes, int type, int loc)
 
int rt_arb_calc_planes (struct bu_vls *error_msg_ret, struct rt_arb_internal *arb, int cgtype, plane_t planes[6], const struct bn_tol *tol)
 
int rt_arb_move_edge (struct bu_vls *error_msg_ret, 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 (struct bu_vls *error_msg_ret, struct rt_arb_internal *arb, int arb_type, int edit_type, vect_t pos_model, plane_t planes[6], const struct bn_tol *tol)
 
int rt_arb_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_arb_volume (fastf_t *vol, const struct rt_db_internal *ip)
 
int rt_arb_get_edge_list (const struct rt_db_internal *ip, const short(*edge_list[])[2])
 
int rt_arb_find_e_nearest_pt2 (int *edge, int *vert1, int *vert2, const struct rt_db_internal *ip, const point_t pt2, const mat_t mat, fastf_t ptol)
 
int rt_arbn_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_arbn_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_arbn_print (const struct soltab *stp)
 
int rt_arbn_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_arbn_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_arbn_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_arbn_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_arbn_free (struct soltab *stp)
 
int rt_arbn_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_arbn_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_arbn_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_arbn_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_arbn_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_arbn_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_arbn_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_arbn_ifree (struct rt_db_internal *ip)
 
int rt_arbn_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_arbn_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_arbn_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_arbn_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
void rt_arbn_centroid (point_t *cent, const struct rt_db_internal *ip)
 
void rt_arbn_volume (fastf_t *volume, const struct rt_db_internal *ip)
 
int rt_bot_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_bot_ifree (struct rt_db_internal *ip)
 
void rt_ars_free (register struct soltab *stp)
 
int rt_ars_class (const struct soltab *stp, const vect_t min, const vect_t max, const struct bn_tol *tol)
 
HIDDEN fastf_tars_rd_curve (union record *rp, int npts, int flip)
 
int rt_ars_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_ars_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ars_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_ars_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ars_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_ars_ifree (struct rt_db_internal *ip)
 
int rt_ars_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_ars_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_ars_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_ars_print (register const struct soltab *stp)
 
int rt_ars_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_hitsort (register struct hit *h, register int nh)
 
void rt_ars_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
 
void rt_ars_curve (register struct curvature *cvp, register struct hit *hitp, struct soltab *stp)
 
void rt_ars_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
int rt_ars_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_ars_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_ars_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_ars_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int rt_bot_makesegs (struct hit *hits, size_t nhits, struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead, struct rt_piecestate *psp)
 
HIDDEN int rt_bot_unoriented_segs (struct hit *hits, size_t nhits, struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead, struct bot_specific *bot)
 
size_t rt_botface_w_normals (struct soltab *stp, struct bot_specific *bot, fastf_t *ap, fastf_t *bp, fastf_t *cp, fastf_t *vertex_normals, size_t face_no, const struct bn_tol *tol)
 
size_t rt_botface (struct soltab *stp, struct bot_specific *bot, fastf_t *ap, fastf_t *bp, fastf_t *cp, size_t face_no, const struct bn_tol *tol)
 
void rt_bot_prep_pieces (struct bot_specific *bot, struct soltab *stp, size_t ntri, const struct bn_tol *tol)
 
int rt_bot_bbox (struct rt_db_internal *ip, point_t *min, point_t *max)
 
void rt_bot_print (const struct soltab *stp)
 
HIDDEN int rt_bot_plate_segs (struct hit *hits, size_t nhits, struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead, struct bot_specific *bot)
 
int rt_bot_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
int rt_bot_piece_shot (struct rt_piecestate *psp, struct rt_piecelist *plp, double dist_corr, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_bot_piece_hitsegs (struct rt_piecestate *psp, struct seg *seghead, struct application *ap)
 
void rt_bot_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_bot_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_bot_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_bot_free (struct soltab *stp)
 
int rt_bot_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol)
 
vdsNode * build_vertex_tree (struct rt_bot_internal *bot)
 
int rt_bot_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_bot_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_bot_plot_poly (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)
 
void rt_bot_centroid (point_t *cent, const struct rt_db_internal *ip)
 
int rt_bot_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_bot_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_bot_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_bot_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_bot_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_bot_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
HIDDEN void bot_ifree2 (struct rt_bot_internal *bot_ip)
 
int rt_bot_xform (struct rt_db_internal *op, const fastf_t *mat, struct rt_db_internal *ip, const int release, struct db_i *dbip)
 
int rt_bot_find_v_nearest_pt2 (const struct rt_bot_internal *bot, const point_t pt2, const mat_t mat)
 
size_t rt_bot_get_edge_list (const struct rt_bot_internal *bot, size_t **edge_list)
 
int rt_bot_edge_in_list (const size_t v1, const size_t v2, const size_t edge_list[], const size_t edge_count)
 
int rt_bot_find_e_nearest_pt2 (int *vert1, int *vert2, const struct rt_bot_internal *bot, const point_t pt2, const mat_t mat)
 
int rt_bot_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int bot_check_vertex_indices (struct bu_vls *logstr, struct rt_bot_internal *bot)
 
int rt_bot_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_bot_form (struct bu_vls *logstr, const struct rt_functab *ftp)
 
int rt_bot_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int buildEdgeTable (struct rt_bot_internal *bot, struct bot_edge ***edges)
 
float minEdge (struct rt_bot_internal *bot)
 
float maxEdge (struct rt_bot_internal *bot)
 
fastf_t rt_bot_propget (struct rt_bot_internal *bot, const char *property)
 
int rt_bot_vertex_fuse (struct rt_bot_internal *bot, const struct bn_tol *tol)
 
int rt_bot_same_orientation (const int *a, const int *b)
 
int rt_bot_face_fuse (struct rt_bot_internal *bot)
 
int rt_bot_condense (struct rt_bot_internal *bot)
 
int find_closest_face (fastf_t **centers, int *piece, int *old_faces, size_t num_faces, fastf_t *vertices)
 
void Add_unique_verts (int *piece_verts, int *v)
 
int rt_bot_sort_faces (struct rt_bot_internal *bot, size_t tris_per_piece)
 
HIDDEN void delete_edge (int v1, int v2, struct bot_edge **edges)
 
HIDDEN int decimate_edge (int v1, int v2, struct bot_edge **edges, size_t num_edges, int *faces, size_t num_faces, int face_del1, int face_del2)
 
HIDDEN int edge_can_be_decimated (struct rt_bot_internal *bot, int *faces, struct bot_edge **edges, int v1, int v2, int *face_del1, int *face_del2, fastf_t max_chord_error, fastf_t max_normal_error, fastf_t min_edge_length_sq)
 
int rt_bot_decimate (struct rt_bot_internal *bot, fastf_t max_chord_error, fastf_t max_normal_error, fastf_t min_edge_length)
 
HIDDEN int bot_smooth_miss (struct application *ap)
 
HIDDEN int bot_smooth_hit (struct application *ap, struct partition *PartHeadp, struct seg *seg)
 
int rt_bot_smooth (struct rt_bot_internal *bot, const char *bot_name, struct db_i *dbip, fastf_t norm_tol_angle)
 
int rt_bot_flip (struct rt_bot_internal *bot)
 
void rt_bot_sync_func (struct rt_bot_internal *bot, struct tri_edges *tep, struct tri_edges *headTep, struct tri_edges *usedTep)
 
int rt_bot_sync (struct rt_bot_internal *bot)
 
void rt_bot_split_func (struct rt_bot_internal *bot, struct tri_pts *tpp, struct tri_pts *headTpp, struct tri_pts *usedTpp)
 
struct rt_bot_internal * rt_bot_create (struct rt_bot_internal *bot, struct tri_pts *newTpp)
 
struct rt_bot_list * rt_bot_split (struct rt_bot_internal *bot)
 
struct rt_bot_list * rt_bot_patches (struct rt_bot_internal *bot)
 
void rt_bot_list_free (struct rt_bot_list *headRblp, int fbflag)
 
void rt_bot_volume (fastf_t *volume, const struct rt_db_internal *ip)
 
void rt_bot_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
int XGLUE (rt_botface_w_normals_, TRI_TYPE)
 
void XGLUE (rt_bot_prep_pieces_, TRI_TYPE)
 
int XGLUE (rt_bot_prep_, TRI_TYPE)
 
HIDDEN int XGLUE (rt_bot_makesegs_, TRI_TYPE)
 
int XGLUE (rt_bot_shot_, TRI_TYPE)
 
int XGLUE (rt_bot_piece_shot_, TRI_TYPE)
 
void XGLUE (rt_bot_norm_, TRI_TYPE)
 
void XGLUE (rt_bot_free_, TRI_TYPE)
 
int rt_cline_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_cline_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_cline_print (register const struct soltab *stp)
 
int rt_cline_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_cline_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_cline_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_cline_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_cline_free (register struct soltab *stp)
 
int rt_cline_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol)
 
int rt_cline_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_cline_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_cline_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_cline_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_cline_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_cline_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_cline_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_cline_ifree (struct rt_db_internal *ip)
 
int rt_cline_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_cline_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_cline_form (struct bu_vls *logstr, const struct rt_functab *ftp)
 
int rt_cline_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int rt_cline_to_pipe (struct rt_pipe_internal *pipep, const struct rt_db_internal *ip)
 
int rt_retrieve_binunif (struct rt_db_internal *intern, const struct db_i *dbip, const char *name)
 
HIDDEN void hook_mtos_from_stom (const struct bu_structparse *sp, const char *sp_name, void *base, const char *p, void *data)
 
HIDDEN void hook_file (const struct bu_structparse *sp, const char *sp_name, void *base, const char *p, void *data)
 
HIDDEN void plot_rpp (FILE *fp, struct bound_rpp *rpp, int r, int g, int b)
 
HIDDEN void plot_dsp_bb (FILE *fp, struct dsp_bb *dsp_bb, struct dsp_specific *dsp, int r, int g, int b, int blather)
 
HIDDEN FILE * draw_dsp_bb (int *plotnum, struct dsp_bb *dsp_bb, struct dsp_specific *dsp, int r, int g, int b)
 
HIDDEN void plot_layers (struct dsp_specific *dsp_sp)
 
HIDDEN void plot_cell_top (struct isect_stuff *isect, struct dsp_bb *dsp_bb, point_t A, point_t B, point_t C, point_t D, struct hit hitlist[], int hitflags, int style)
 
HIDDEN void dsp_print_v4 (struct bu_vls *vls, const struct rt_dsp_internal *dsp_ip)
 
HIDDEN void dsp_print_v5 (struct bu_vls *vls, const struct rt_dsp_internal *dsp_ip)
 
void rt_dsp_print (register const struct soltab *stp)
 
HIDDEN void dsp_layers (struct dsp_specific *dsp, unsigned short *d_min, unsigned short *d_max)
 
int rt_dsp_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_dsp_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
HIDDEN void plot_seg (struct isect_stuff *isect, struct hit *in_hit, struct hit *out_hit, const point_t bbmin, const point_t bbmax, int r, int g, int b)
 
HIDDEN int add_seg (struct isect_stuff *isect, struct hit *in_hit, struct hit *out_hit, const point_t bbmin, const point_t bbmax, int r, int g, int b)
 
HIDDEN int isect_ray_triangle (struct isect_stuff *isect, point_t A, point_t B, point_t C, struct hit *hitp, fastf_t alphabbeta[])
 
HIDDEN int permute_cell (point_t A, point_t B, point_t C, point_t D, struct dsp_specific *dsp, struct dsp_rpp *dsp_rpp)
 
HIDDEN int check_bbpt_hit_elev (int i, point_t A, point_t B, point_t C, point_t D, point_t P)
 
HIDDEN int isect_ray_cell_top (struct isect_stuff *isect, struct dsp_bb *dsp_bb)
 
int dsp_in_rpp (struct isect_stuff *isect, register const fastf_t *min, register const fastf_t *max)
 
HIDDEN int isect_ray_dsp_bb (struct isect_stuff *isect, struct dsp_bb *dsp_bb)
 
HIDDEN int recurse_dsp_bb (struct isect_stuff *isect, struct dsp_bb *dsp_bb, point_t minpt, point_t maxpt, point_t bbmin, point_t bbmax)
 
int rt_dsp_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
HIDDEN void compute_normal_at_gridpoint (vect_t N, struct dsp_specific *dsp, unsigned int x, unsigned int y, FILE *fd, fastf_t len)
 
void rt_dsp_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
 
void rt_dsp_curve (register struct curvature *cvp, register struct hit *hitp, struct soltab *stp)
 
void rt_dsp_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
void rt_dsp_free (register struct soltab *stp)
 
int rt_dsp_class (const struct soltab *s, const vect_t v0, const vect_t v2, const struct bn_tol *b)
 
int rt_dsp_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
HIDDEN int get_cut_dir (struct rt_dsp_internal *dsp_ip, int x, int y, int xlim, int ylim)
 
int rt_dsp_tess (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)
 
HIDDEN int get_file_data (struct rt_dsp_internal *dsp_ip, const struct db_i *dbip)
 
HIDDEN int get_obj_data (struct rt_dsp_internal *dsp_ip, const struct db_i *dbip)
 
HIDDEN int dsp_get_data (struct rt_dsp_internal *dsp_ip, const mat_t mat, const struct db_i *dbip)
 
int rt_dsp_import4 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_dsp_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_dsp_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip, struct resource *resp)
 
int rt_dsp_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip, struct resource *resp)
 
int rt_dsp_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local, struct resource *resp, struct db_i *db_ip)
 
void rt_dsp_ifree (struct rt_db_internal *ip)
 
HIDDEN void hook_verify (const struct bu_structparse *sp, const char *sp_name, void *base, const char *p, void *data)
 
int rt_dsp_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_dsp_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
void rt_dsp_make (const struct rt_functab *ftp, struct rt_db_internal *intern)
 
int rt_dsp_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
HIDDEN int swap_cell_pts (int A[3], int B[3], int C[3], int D[3], struct dsp_specific *dsp)
 
int project_pt (point_t out, int A[3], int B[3], int C[3], point_t pt)
 
int dsp_pos (point_t out, struct soltab *stp, point_t p)
 
int rt_ebm_dda (struct xray *rp, struct soltab *stp, struct application *ap, struct seg *seghead)
 
int rt_seg_planeclip (struct seg *out_hd, struct seg *in_hd, vect_t out_norm, fastf_t in, fastf_t out, struct xray *rp, struct application *ap)
 
void rt_ebm_centroid (point_t *cent, const struct rt_db_internal *ip)
 
int rt_seg_planeclip (struct seg *out_hd, struct seg *in_hd, fastf_t *out_norm, fastf_t in, fastf_t out, struct xray *rp, struct application *ap)
 
int rt_ebm_dda (register struct xray *rp, struct soltab *stp, struct application *ap, struct seg *seghead)
 
int rt_ebm_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_ebm_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ebm_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_ebm_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ebm_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_ebm_ifree (struct rt_db_internal *ip)
 
int rt_ebm_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_ebm_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_ebm_print (register const struct soltab *stp)
 
int rt_ebm_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_ebm_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
 
void rt_ebm_curve (register struct curvature *cvp, register struct hit *hitp, struct soltab *stp)
 
void rt_ebm_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
void rt_ebm_free (struct soltab *stp)
 
void rt_ebm_plate (int x_1, int y_1, int x_2, int y_2, double t, register fastf_t *mat, register struct bu_list *vhead)
 
int rt_ebm_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_ebm_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_ebm_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_ebm_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_ebm_form (struct bu_vls *logstr, const struct rt_functab *ftp)
 
void rt_ebm_make (const struct rt_functab *ftp, struct rt_db_internal *intern)
 
int rt_ebm_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_ebm_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
int rt_ehy_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_ehy_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_ehy_print (const struct soltab *stp)
 
int rt_ehy_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_ehy_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_ehy_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_ehy_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_ehy_free (struct soltab *stp)
 
int rt_ehy_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_ehy_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_ehy_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_ehy_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_ehy_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ehy_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_ehy_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ehy_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_ehy_ifree (struct rt_db_internal *ip)
 
int rt_ehy_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_ehy_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
int rt_sph_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
HIDDEN void nmg_sphere_face_snurb (struct faceuse *fu, const matp_t m)
 
int rt_ell_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_ell_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_ell_print (register const struct soltab *stp)
 
int rt_ell_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_ell_vshot (struct soltab **stp, struct xray **rp, struct seg *segp, int n, struct application *ap)
 
void rt_ell_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
 
void rt_ell_curve (register struct curvature *cvp, register struct hit *hitp, struct soltab *stp)
 
void rt_ell_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
void rt_ell_free (register struct soltab *stp)
 
void rt_ell_16pts (fastf_t *ov, fastf_t *V, fastf_t *A, fastf_t *B)
 
int rt_ell_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_ell_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_ell_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_ell_import4 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_ell_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ell_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_ell_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_ell_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_ell_ifree (struct rt_db_internal *ip)
 
int rt_ell_tnurb (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct bn_tol *tol)
 
int rt_ell_params (struct pc_pc_set *pcs, const struct rt_db_internal *ip)
 Method for declaration of parameters so that it can be used by Parametrics and Constraints library. More...
 
fastf_t ell_angle (fastf_t *p1, fastf_t a, fastf_t b, fastf_t dtol, fastf_t ntol)
 
void rt_ell_volume (fastf_t *volume, const struct rt_db_internal *ip)
 
void rt_ell_centroid (point_t *cent, const struct rt_db_internal *ip)
 
void rt_ell_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
int rt_epa_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_epa_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_epa_print (const struct soltab *stp)
 
int rt_epa_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_epa_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_epa_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_epa_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_epa_free (struct soltab *stp)
 
int rt_epa_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_epa_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
void rt_ell_norms (fastf_t *ov, fastf_t *A, fastf_t *B, fastf_t *h_vec, fastf_t t, int sides)
 
void rt_ell (fastf_t *ov, const fastf_t *V, const fastf_t *A, const fastf_t *B, int sides)
 
int rt_epa_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_epa_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_epa_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_epa_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_epa_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_epa_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_epa_ifree (struct rt_db_internal *ip)
 
int rt_epa_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_epa_volume (fastf_t *vol, const struct rt_db_internal *ip)
 
void rt_epa_centroid (point_t *cent, const struct rt_db_internal *ip)
 
void rt_epa_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
int rt_eto_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_eto_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_eto_print (const struct soltab *stp)
 
int rt_eto_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_eto_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_eto_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_eto_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_eto_free (struct soltab *stp)
 
HIDDEN int make_ellipse4 (struct rt_pt_node *pts, fastf_t a, fastf_t b, fastf_t dtol, fastf_t ntol)
 
HIDDEN point_t * make_ellipse (int *n, fastf_t a, fastf_t b, fastf_t dtol, fastf_t ntol)
 
int rt_eto_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_eto_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_eto_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_eto_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_eto_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_eto_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_eto_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_eto_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_eto_ifree (struct rt_db_internal *ip)
 
int rt_eto_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_eto_volume (fastf_t *vol, const struct rt_db_internal *ip)
 
void rt_eto_centroid (point_t *cent, const struct rt_db_internal *ip)
 
void rt_eto_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
int seg_to_vlist (struct bu_list *vhead, const struct rt_tess_tol *ttol, point_t V, vect_t u_vec, vect_t v_vec, struct rt_sketch_internal *sketch_ip, void *seg)
 
void rt_sketch_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 
void rt_sketch_centroid (point_t *cent, const struct rt_db_internal *ip)
 
int rt_extrude_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
void rt_extrude_volume (fastf_t *vol, const struct rt_db_internal *ip)
 
int rt_extrude_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_extrude_print (const struct soltab *stp)
 
int rt_extrude_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_extrude_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_extrude_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_extrude_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
void rt_extrude_free (struct soltab *stp)
 
int rt_extrude_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
void rt_extrude_centroid (point_t *cent, const struct rt_db_internal *ip)
 
void get_indices (void *seg, int *start, int *end)
 
int rt_extrude_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_extrude_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip, struct resource *resp)
 
int rt_extrude_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_extrude_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_extrude_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const mat_t mat, const struct db_i *dbip, struct resource *resp)
 
int rt_extrude_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_extrude_ifree (struct rt_db_internal *ip)
 
int rt_extrude_xform (struct rt_db_internal *op, const mat_t mat, struct rt_db_internal *ip, int release, struct db_i *dbip, struct resource *resp)
 
int rt_extrude_form (struct bu_vls *logstr, const struct rt_functab *ftp)
 
int rt_extrude_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int rt_extrude_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_extrude_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int rt_grp_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_grp_print (const struct soltab *stp)
 
int rt_grp_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_grp_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_grp_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_grp_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_grp_free (struct soltab *stp)
 
int rt_grp_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_grp_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_grp_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_grp_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_grp_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_grp_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_grp_ifree (struct rt_db_internal *ip)
 
int rt_grp_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_grp_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int rt_hlf_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_hlf_print (register const struct soltab *stp)
 
int rt_hlf_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_hlf_vshot (struct soltab **stp, struct xray **rp, struct seg *segp, int n, struct application *ap)
 
void rt_hlf_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
 
void rt_hlf_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_hlf_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
void rt_hlf_free (struct soltab *stp)
 
int rt_hlf_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol)
 
int rt_hlf_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_hlf_xform (struct rt_db_internal *op, const mat_t mat, struct rt_db_internal *ip, int release, struct db_i *dbip, struct resource *resp)
 
int rt_hlf_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_hlf_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hlf_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_hlf_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hlf_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_hlf_ifree (struct rt_db_internal *ip)
 
int rt_hlf_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_hlf_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int rt_hf_to_dsp (struct rt_db_internal *db_intern)
 
int rt_hf_bbox (struct rt_db_internal *ip, point_t *min_pt, point_t *max_pt, const struct bn_tol *tol)
 
int rt_hf_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_hf_print (const struct soltab *stp)
 
int rt_hf_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_hf_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_hf_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_hf_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_hf_free (struct soltab *stp)
 
int rt_hf_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_hf_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_hf_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_hf_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hf_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_hf_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hf_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_hf_ifree (struct rt_db_internal *ip)
 
int rt_hf_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int rt_joint_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_joint_print (const struct soltab *stp)
 
int rt_joint_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_joint_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_joint_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_joint_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_joint_free (struct soltab *stp)
 
int rt_joint_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_joint_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_joint_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_joint_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_joint_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_joint_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_joint_ifree (struct rt_db_internal *ip)
 
int rt_joint_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_joint_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
struct rt_selection_setrt_joint_find_selections (const struct rt_db_internal *ip, const struct rt_selection_query *query)
 
int rt_joint_process_selection (struct rt_db_internal *ip, struct db_i *dbip, const struct rt_selection *selection, const struct rt_selection_operation *op)
 
int rt_rec_bbox (struct rt_db_internal *ip, point_t *min, point_t *max, const struct bn_tol *tol)
 
int rt_rec_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_rec_print (const struct soltab *stp)
 
int rt_rec_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_rec_vshot (struct soltab **stp, struct xray **rp, struct seg *segp, int n, struct application *ap)
 
void rt_rec_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_rec_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_rec_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
int rt_rec_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
void rt_rec_free (struct soltab *stp)
 

Variables

const struct bu_structparse rt_arb_parse []
 
const short local_arb6_edge_vertex_mapping [10][2]
 
const short local_arb4_edge_vertex_mapping [6][2]
 
const struct bu_structparse rt_cline_parse []
 
const struct bu_structparse rt_dsp_parse []
 
const struct bu_structparse rt_dsp_ptab []
 
const struct bu_structparse fake_dsp_printab []
 
const struct bu_structparse rt_ebm_parse []
 
const struct bu_structparse rt_ehy_parse []
 
const struct bu_structparse rt_ell_parse []
 
const struct bu_structparse rt_epa_parse []
 
const struct bu_structparse rt_eto_parse []
 
const struct bu_structparse rt_grp_parse []
 
const struct bu_structparse rt_hlf_parse []
 
const struct bu_structparse rt_hf_parse []
 
const struct bu_structparse rt_hf_cparse []
 
const struct bu_structparse rt_joint_parse []
 

Detailed Description

Macro Definition Documentation

#define RT_SLOPPY_DOT_TOL   0.0087 /* inspired by RT_DOT_TOL, but less tight (.5 deg) */

Definition at line 70 of file arb8.c.

Referenced by rt_arb_add_pt().

#define ARB_AO (   _t,
  _a,
  _i 
)    offsetof(_t, _a) + sizeof(point_t) * _i + sizeof(point_t) / ELEMENTS_PER_POINT * X

Definition at line 145 of file arb8.c.

#define RT_ARB8_SEG_MISS (   SEG)    (SEG).seg_stp=RT_SOLTAB_NULL

Definition at line 911 of file arb8.c.

Referenced by rt_arb_vshot().

#define ARB_FACE (   vlist_head,
  arb_pts,
  a,
  b,
  c,
 
)
Value:
RT_ADD_VLIST(vlist_head, arb_pts[a], BN_VLIST_LINE_MOVE); \
RT_ADD_VLIST(vlist_head, arb_pts[b], BN_VLIST_LINE_DRAW); \
RT_ADD_VLIST(vlist_head, arb_pts[c], BN_VLIST_LINE_DRAW); \
RT_ADD_VLIST(vlist_head, arb_pts[d], BN_VLIST_LINE_DRAW);
#define RT_ADD_VLIST(hd, pnt, draw)
Definition: raytrace.h:1865
#define BN_VLIST_LINE_MOVE
Definition: vlist.h:82
#define BN_VLIST_LINE_DRAW
Definition: vlist.h:83

Definition at line 1131 of file arb8.c.

Referenced by rt_arb_plot().

#define RT_ARB_EDIT_EDGE   0

An ARB edge is moved by finding the direction of the line containing the edge and the 2 "bounding" planes. The new edge is found by intersecting the new line location with the bounding planes. The two "new" planes thus defined are calculated and the affected points are calculated by intersecting planes. This keeps ALL faces planar.

Note: This code came from mged/edarb.c (written mostly by Keith Applin) and was modified to live here.

Definition at line 1982 of file arb8.c.

Referenced by rt_arb_edit().

#define RT_ARB_EDIT_POINT   1

Definition at line 1983 of file arb8.c.

Referenced by rt_arb_edit().

#define RT_ARB7_MOVE_POINT_5   11

Definition at line 1984 of file arb8.c.

Referenced by rt_arb_edit().

#define RT_ARB6_MOVE_POINT_5   8

Definition at line 1985 of file arb8.c.

Referenced by rt_arb_edit().

#define RT_ARB6_MOVE_POINT_6   9

Definition at line 1986 of file arb8.c.

Referenced by rt_arb_edit().

#define RT_ARB5_MOVE_POINT_5   8

Definition at line 1987 of file arb8.c.

Referenced by rt_arb_edit().

#define RT_ARB4_MOVE_POINT_4   3

Definition at line 1988 of file arb8.c.

Referenced by rt_arb_edit().

#define LOC (   i,
 
)    i*(aip->neqn)+j

Definition at line 483 of file arbn.c.

Referenced by rt_arbn_tess().

#define TRI_NULL   ((struct tri_specific *)0)

Definition at line 49 of file ars.c.

Referenced by rt_ars_class(), rt_ars_free(), and rt_ars_print().

#define IJ (   ii,
  jj 
)    (((i+(ii))*(arip->pts_per_curve+1))+(j+(jj)))

Definition at line 51 of file ars.c.

Referenced by rt_ars_tess().

#define ARS_PT (   ii,
  jj 
)    (&arip->curves[i+(ii)][(j+(jj))*ELEMENTS_PER_VECT])

Definition at line 52 of file ars.c.

Referenced by rt_ars_tess().

#define FIND_IJ (   a,
 
)
Value:
if (!(verts[IJ(a, b)])) { \
verts[IJ(a, b)] = \
}
if lu s
Definition: nmg_mod.c:3860
#define IJ(ii, jj)
Definition: ars.c:51
#define ARS_PT(ii, jj)
Definition: ars.c:52
struct vertex * nmg_find_pt_in_shell(const struct shell *s, const fastf_t *pt, const struct bn_tol *tol)
Definition: nmg_info.c:1634

Definition at line 53 of file ars.c.

Referenced by rt_ars_tess().

#define ASSOC_GEOM (   corn,
  a,
 
)
Value:
if (!((*corners[corn])->vg_p)) { \
nmg_vertex_gv(*(corners[corn]), ARS_PT(a, b)); \
}
void nmg_vertex_gv(struct vertex *v, const fastf_t *pt)
Definition: nmg_mk.c:1668
#define ARS_PT(ii, jj)
Definition: ars.c:52

Definition at line 58 of file ars.c.

Referenced by rt_ars_tess().

#define GLUE (   _a,
  _b 
)    _a ## _b

Definition at line 48 of file bot.c.

#define XGLUE (   _a,
  _b 
)    GLUE(_a, _b)

Definition at line 49 of file bot.c.

#define MAXHITS   128

Definition at line 54 of file bot.c.

Referenced by XGLUE().

#define BOT_MIN_DN   1.0e-9

Definition at line 56 of file bot.c.

Referenced by XGLUE().

#define BOT_UNORIENTED_NORM (   _ap,
  _hitp,
  _out 
)
Value:
{ \
if (!(_ap)->a_bot_reverse_normal_disabled) { \
if (_out) { /* this is an exit */ \
if ((_hitp)->hit_vpriv[X] < 0.0) { \
VREVERSE((_hitp)->hit_normal, trip->tri_N); \
} else { \
VMOVE((_hitp)->hit_normal, trip->tri_N); \
} \
} else { /* this is an entrance */ \
if ((_hitp)->hit_vpriv[X] > 0.0) { \
VREVERSE((_hitp)->hit_normal, trip->tri_N); \
} else { \
VMOVE((_hitp)->hit_normal, trip->tri_N); \
} \
} \
} else { \
VMOVE((_hitp)->hit_normal, trip->tri_N); \
} \
}
if(share_geom)
Definition: nmg_mod.c:3829
Definition: color.c:49

Definition at line 58 of file bot.c.

Referenced by XGLUE().

#define TRI_TYPE   float

Definition at line 119 of file bot.c.

Referenced by XGLUE().

#define TRI_TYPE   double

Definition at line 119 of file bot.c.

#define NORM_TYPE   signed char

Definition at line 120 of file bot.c.

Referenced by XGLUE().

#define NORM_TYPE   fastf_t

Definition at line 120 of file bot.c.

#define NORMAL_SCALE   127.0

Definition at line 121 of file bot.c.

Referenced by XGLUE().

#define NORMAL_SCALE   1.0

Definition at line 121 of file bot.c.

#define ONE_OVER_SCALE   (1.0/127.0)

Definition at line 122 of file bot.c.

Referenced by XGLUE().

#define ONE_OVER_SCALE   1.0

Definition at line 122 of file bot.c.

#define MAX_AFFECTED_FACES   128

Definition at line 4061 of file bot.c.

Referenced by edge_can_be_decimated().

#define REMAP_BOT_VERTS (   _oldbot,
  _newbot,
  _vmap,
  _vcount,
  _ovi,
  _i 
)
Value:
{ \
size_t vmi; \
\
for (vmi = 0; vmi < _vcount; vmi++) { \
if (_ovi == _vmap[vmi]) { \
_newbot->faces[_i] = vmi; \
break; \
} \
} \
if (vmi == _vcount) { \
_vmap[_vcount] = _ovi; \
_newbot->faces[_i] = _vcount; \
VMOVE(&_newbot->vertices[_vcount*3], &_oldbot->vertices[_ovi*3]); \
++_vcount; \
} \
}
if(share_geom)
Definition: nmg_mod.c:3829

Definition at line 4889 of file bot.c.

Referenced by rt_bot_create().

#define RT_CLINE_O (   m)    bu_offsetof(struct rt_cline_internal, m)

Definition at line 55 of file cline.c.

#define FULL_DSP_DEBUGGING   1

Definition at line 70 of file dsp.c.

#define ORDERED_ISECT   1

Definition at line 72 of file dsp.c.

#define DIM_BB_CHILDREN   4

Definition at line 74 of file dsp.c.

Referenced by dsp_layers().

#define NUM_BB_CHILDREN   (DIM_BB_CHILDREN*DIM_BB_CHILDREN)

Definition at line 75 of file dsp.c.

Referenced by dsp_layers().

#define IMPORT_FAIL (   _s)
Value:
if (dsp_ip) { \
bu_log("rt_dsp_import4(%d) '%s' %s\n", __LINE__, bu_vls_addr(&dsp_ip->dsp_name), _s); \
bu_free((char *)dsp_ip, "rt_dsp_import4: dsp_ip"); \
} \
ip->idb_type = ID_NULL; \
ip->idb_ptr = (void *)NULL; \
return -2
void bu_log(const char *,...) _BU_ATTR_PRINTF12
Definition: log.c:176
#define ID_NULL
Unused.
Definition: raytrace.h:458
char * bu_vls_addr(const struct bu_vls *vp)
Definition: vls.c:111
void bu_free(void *ptr, const char *str)
Definition: malloc.c:328

Definition at line 77 of file dsp.c.

Referenced by rt_dsp_import4(), and rt_dsp_import5().

#define MAGIC_dsp_bb   234

Definition at line 114 of file dsp.c.

Referenced by dsp_layers().

#define DSP_BB_CK (   _p)    BU_CKMAG(_p, MAGIC_dsp_bb, "dsp_bb")
#define LAYER (   l,
  x,
 
)    l->p[l->dim[1]*y+x]

Definition at line 120 of file dsp.c.

#define XCNT (   _p)    (((struct rt_dsp_internal *)_p)->dsp_xcnt)

Definition at line 126 of file dsp.c.

Referenced by dsp_layers().

#define YCNT (   _p)    (((struct rt_dsp_internal *)_p)->dsp_ycnt)

Definition at line 127 of file dsp.c.

Referenced by dsp_layers().

#define XSIZ (   _p)    (_p->dsp_i.dsp_xcnt - 1)

Definition at line 128 of file dsp.c.

Referenced by compute_normal_at_gridpoint(), dsp_layers(), dsp_pos(), and rt_dsp_uv().

#define YSIZ (   _p)    (_p->dsp_i.dsp_ycnt - 1)

Definition at line 129 of file dsp.c.

Referenced by compute_normal_at_gridpoint(), dsp_layers(), dsp_pos(), and rt_dsp_uv().

#define dlog   if (RT_G_DEBUG & DEBUG_HF) bu_log
#define BBOX_PLANES   7 /* 2 tops & 5 other sides */

Definition at line 141 of file dsp.c.

#define XMIN   0

Definition at line 142 of file dsp.c.

Referenced by check_bbpt_hit_elev(), dsp_in_rpp(), rt_dsp_bbox(), rt_dsp_norm(), and rt_dsp_prep().

#define XMAX   1

Definition at line 143 of file dsp.c.

Referenced by check_bbpt_hit_elev(), dsp_in_rpp(), rt_dsp_bbox(), and rt_dsp_prep().

#define YMIN   2

Definition at line 144 of file dsp.c.

Referenced by check_bbpt_hit_elev(), dsp_in_rpp(), rt_dsp_bbox(), and rt_dsp_prep().

#define YMAX   3

Definition at line 145 of file dsp.c.

Referenced by check_bbpt_hit_elev(), dsp_in_rpp(), rt_dsp_bbox(), and rt_dsp_prep().

#define ZMIN   4

Definition at line 146 of file dsp.c.

Referenced by check_bbpt_hit_elev(), dsp_in_rpp(), rt_dsp_bbox(), and rt_dsp_prep().

#define ZMAX   5

Definition at line 147 of file dsp.c.

Referenced by add_seg(), check_bbpt_hit_elev(), dsp_in_rpp(), rt_dsp_bbox(), and rt_dsp_prep().

#define ZMID   6

Definition at line 148 of file dsp.c.

Referenced by rt_dsp_bbox(), and rt_dsp_prep().

#define ZTOP   7

Definition at line 149 of file dsp.c.

Referenced by add_seg(), isect_ray_cell_top(), and rt_dsp_norm().

#define DSP_O (   m)    bu_offsetof(struct rt_dsp_internal, m)

Definition at line 254 of file dsp.c.

#define PLOT_LAYERS

Definition at line 364 of file dsp.c.

#define CHECK_VERTS (   _v)
Value:
((*_v[0] != *_v[1]) || (*_v[0] == NULL)) && \
((*_v[0] != *_v[2]) || (*_v[2] == NULL)) && \
((*_v[1] != *_v[2]) || (*_v[1] == NULL))

Definition at line 3500 of file dsp.c.

Referenced by rt_dsp_tess().

#define RT_EBM_NULL   ((struct rt_ebm_specific *)0)

Definition at line 61 of file ebm.c.

#define RT_EBM_O (   m)    bu_offsetof(struct rt_ebm_internal, m)

Definition at line 63 of file ebm.c.

#define NORM_ZPOS   3

Definition at line 92 of file ebm.c.

Referenced by rt_ebm_dda(), rt_ebm_norm(), and rt_seg_planeclip().

#define NORM_YPOS   2

Definition at line 93 of file ebm.c.

Referenced by rt_ebm_norm().

#define NORM_XPOS   1

Definition at line 94 of file ebm.c.

Referenced by rt_ebm_norm().

#define NORM_XNEG   (-1)

Definition at line 95 of file ebm.c.

Referenced by rt_ebm_norm().

#define NORM_YNEG   (-2)

Definition at line 96 of file ebm.c.

Referenced by rt_ebm_norm().

#define NORM_ZNEG   (-3)

Definition at line 97 of file ebm.c.

Referenced by rt_ebm_dda(), rt_ebm_norm(), and rt_seg_planeclip().

#define BIT_XWIDEN   2

Definition at line 105 of file ebm.c.

Referenced by rt_ebm_import4(), and rt_ebm_import5().

#define BIT_YWIDEN   2

Definition at line 106 of file ebm.c.

Referenced by rt_ebm_import4(), and rt_ebm_import5().

#define BIT (   _eip,
  _xx,
  _yy 
)    ((unsigned char *)((_eip)->mp->apbuf))[ ((_yy)+BIT_YWIDEN)*((_eip)->xdim + BIT_XWIDEN*2)+(_xx)+BIT_XWIDEN ]
#define EHY_NORM_BODY   (1) /* compute normal */

Definition at line 349 of file ehy.c.

Referenced by rt_ehy_curve(), rt_ehy_norm(), rt_ehy_shot(), and rt_ehy_uv().

#define EHY_NORM_TOP   (2) /* copy ehy_N */

Definition at line 350 of file ehy.c.

Referenced by rt_ehy_curve(), rt_ehy_norm(), rt_ehy_shot(), and rt_ehy_uv().

#define ELL_NULL   ((struct ell_specific *)0)

Definition at line 166 of file ell.c.

#define RT_ELL_SEG_MISS (   SEG)    (SEG).seg_stp=RT_SOLTAB_NULL

Definition at line 432 of file ell.c.

Referenced by rt_ell_vshot().

#define ELLOUT (   n)    ov+(n-1)*3

Also used by the TGC code

Definition at line 604 of file ell.c.

Referenced by rt_ell_16pts().

#define PROLATE   1

Computes the surface area of an ellipsoid. logs error if triaxial ellipsoid (cannot find surface area).

Definition at line 1856 of file ell.c.

Referenced by rt_ell_surf_area().

#define OBLATE   2

Definition at line 1857 of file ell.c.

Referenced by rt_ell_surf_area().

#define EPA_NORM_BODY   (1) /* compute normal */

Definition at line 348 of file epa.c.

Referenced by rt_epa_curve(), rt_epa_norm(), rt_epa_shot(), and rt_epa_uv().

#define EPA_NORM_TOP   (2) /* copy epa_N */

Definition at line 349 of file epa.c.

Referenced by rt_epa_curve(), rt_epa_norm(), rt_epa_shot(), and rt_epa_uv().

#define ELLOUT (   n)    ov+(n-1)*3

Definition at line 1110 of file epa.c.

Referenced by rt_ell(), and rt_ell_norms().

#define MAX_HITS   64

Definition at line 80 of file extrude.c.

Referenced by rt_extrude_shot().

#define TOP_FACE   1 /* extruded face */

Definition at line 83 of file extrude.c.

Referenced by rt_extrude_norm(), and rt_extrude_shot().

#define BOTTOM_FACE   2 /* face in uv-plane */

Definition at line 84 of file extrude.c.

Referenced by rt_extrude_norm(), and rt_extrude_shot().

#define LINE_SEG   3

Definition at line 85 of file extrude.c.

Referenced by rt_extrude_curve(), rt_extrude_norm(), and rt_extrude_shot().

#define CARC_SEG   4

Definition at line 86 of file extrude.c.

Referenced by rt_extrude_curve(), rt_extrude_norm(), and rt_extrude_shot().

#define NURB_SEG   5

Definition at line 87 of file extrude.c.

#define BEZIER_SEG   6

Definition at line 88 of file extrude.c.

Referenced by rt_extrude_norm(), and rt_extrude_shot().

#define UNKNOWN   0

Definition at line 91 of file extrude.c.

#define A_IN_B   1

Definition at line 92 of file extrude.c.

Referenced by rt_extrude_tess().

#define B_IN_A   2

Definition at line 93 of file extrude.c.

Referenced by rt_extrude_tess().

#define DISJOINT   3

Definition at line 94 of file extrude.c.

Referenced by rt_extrude_tess().

#define LOOPA   1

Definition at line 96 of file extrude.c.

#define LOOPB   2

Definition at line 97 of file extrude.c.

#define GRIP_NULL   ((struct grip_specific *)0)

Definition at line 58 of file grip.c.

Referenced by rt_grp_print().

#define HALF_NULL   ((struct half_specific *)0)

Definition at line 61 of file half.c.

Referenced by rt_hlf_print().

#define RT_HALF_SEG_MISS (   SEG)    (SEG).seg_stp=RT_SOLTAB_NULL

Definition at line 192 of file half.c.

Referenced by rt_hlf_vshot().

#define HF_O (   m)    bu_offsetof(struct rt_hf_internal, m)

Definition at line 63 of file hf.c.

#define MAXHITS   128 /* # of surfaces hit, must be even */

Definition at line 676 of file hf.c.

Referenced by rt_hf_shot().

#define JOINT_NULL   ((struct joint_specific *)0)

Definition at line 64 of file joint.c.

Referenced by rt_joint_print().

#define JOINT_FLOAT_SIZE   10

Definition at line 65 of file joint.c.

Referenced by rt_joint_export5(), and rt_joint_import5().

#define LOCATION_RADIUS   5

We represent a joint as a pyramid. The center describes where the center of the base is. The normal describes which direction the tip of the pyramid is. Mag describes the distance from the center to the tip. 1/4 of the width is the length of a base side. Plot a joint by tracing out joint vectors This draws each edge only once.

XXX No checking for degenerate faces is done, but probably should be.

Definition at line 224 of file joint.c.

Referenced by rt_joint_plot().

#define JOINT_SELECT_VMAX_DISTSQ   100.0

Definition at line 491 of file joint.c.

Referenced by rt_joint_find_selections().

#define REC_NORM_BODY   (1) /* compute normal */

Definition at line 412 of file rec.c.

Referenced by rt_rec_curve(), rt_rec_norm(), rt_rec_shot(), rt_rec_uv(), and rt_rec_vshot().

#define REC_NORM_TOP   (2) /* copy tgc_N */

Definition at line 413 of file rec.c.

Referenced by rt_rec_curve(), rt_rec_norm(), rt_rec_shot(), rt_rec_uv(), and rt_rec_vshot().

#define REC_NORM_BOT   (3) /* copy reverse tgc_N */

Definition at line 414 of file rec.c.

Referenced by rt_rec_curve(), rt_rec_norm(), rt_rec_shot(), rt_rec_uv(), and rt_rec_vshot().

#define RT_REC_SEG_MISS (   SEG)    (SEG).seg_stp=(struct soltab *) 0;

Definition at line 628 of file rec.c.

Referenced by rt_rec_vshot().

Enumeration Type Documentation

anonymous enum
Enumerator
JOINT_SELECT_LOC 
JOINT_SELECT_V1 
JOINT_SELECT_V2 
JOINT_SELECT_PATH1 
JOINT_SELECT_PATH2 

Definition at line 493 of file joint.c.

Function Documentation

int rt_arb_get_cgtype ( int *  cgtype,
struct rt_arb_internal *  arb,
const struct bn_tol tol,
register int *  uvec,
register int *  svec 
)

determines COMGEOM arb types from GED general arbs

Inputs -

Returns number of distinct edge vectors (number of entries in uvec array)

Implicit returns - *cgtype - Comgeom type (number range 4..8; ARB4 .. ARB8). uvec[8] - indices of unique vertices (return value is the number of valid entries) svec[11] - Entries [0] and [1] are special (they are the counts of duplicates) entries 2-10 are 2 lists of duplicate vertices entry[0] gives length of first list (starts at entry[2]) entry[1] gives length of second list (starts at entry[2+entry[0]])

Definition at line 203 of file arb8.c.

References BN_CK_TOL, bu_log(), and bn_tol::dist.

Referenced by arb_edit(), arb_extrude(), arb_mirror_face_axis(), arb_permute(), ged_inside_internal(), and rt_arb_std_type().

Here is the call graph for this function:

int rt_arb_std_type ( const struct rt_db_internal ip,
const struct bn_tol tol 
)

Given an ARB in internal form, return its specific ARB type.

Set tol.dist = 0.0001 to obtain past behavior.

Returns - 0 Error in input ARB 4 ARB4 5 ARB5 6 ARB6 7 ARB7 8 ARB8

Implicit return - rt_arb_internal pt[] array reorganized into GIFT "standard" order.

Definition at line 317 of file arb8.c.

References BN_CK_TOL, bu_bomb(), ID_ARB8, rt_db_internal::idb_ptr, rt_arb_get_cgtype(), and RT_CK_DB_INTERNAL.

Referenced by analyze_arb8(), db_fullpath_to_vls(), dm_label_primitive(), edarb_facedef(), f_type(), ged_get_type(), ged_move_arb_edge(), ged_move_arb_face(), ged_rotate_arb_face(), get_diff_components(), rt_arb_centroid(), rt_arb_describe(), and rt_arb_get_edge_list().

Here is the call graph for this function:

void rt_arb_centroid ( point_t *  cent,
const struct rt_db_internal ip 
)

Find the center point for the arb in the rt_db_internal structure, and return it as a point_t.

Definition at line 345 of file arb8.c.

References BN_TOL_MAGIC, bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, bn_tol::magic, bn_tol::para, bn_tol::perp, and rt_arb_std_type().

Referenced by analyze_arb8().

Here is the call graph for this function:

HIDDEN int rt_arb_add_pt ( register pointp_t  point,
const char *  title,
struct prep_arb pap,
int  ptno,
const char *  name 
)

Add another point to a struct arb_specific, checking for unique pts. The first two points are easy. The third one triggers most of the plane calculations, and forth and subsequent ones are merely checked for validity.

Returns - 0 point was accepted -1 point was rejected

Definition at line 399 of file arb8.c.

References aface::A, oface::arb_U, oface::arb_Ulen, oface::arb_UVorig, oface::arb_V, oface::arb_Vlen, bu_log(), NEAR_ZERO, prep_arb::pa_center, prep_arb::pa_clockwise, prep_arb::pa_doopt, prep_arb::pa_face, prep_arb::pa_faces, prep_arb::pa_opt, aface::peqn, RT_SLOPPY_DOT_TOL, and ZERO.

Referenced by rt_arb_mk_planes().

Here is the call graph for this function:

HIDDEN int rt_arb_mk_planes ( register struct prep_arb pap,
struct rt_arb_internal *  aip,
const char *  name 
)

Given an rt_arb_internal structure with 8 points in it, compute the face information.

Returns - 0 OK <0 failure

Definition at line 540 of file arb8.c.

References arb_info::ai_sub, arb_info::ai_title, oface::arb_U, oface::arb_Ulen, oface::arb_V, oface::arb_Vlen, bu_log(), DEBUG_ARB8, prep_arb::pa_center, prep_arb::pa_doopt, prep_arb::pa_faces, prep_arb::pa_npts, prep_arb::pa_opt, prep_arb::pa_pindex, prep_arb::pa_tol_sq, rt_arb_add_pt(), RT_G_DEBUG, and VSETALL.

Referenced by rt_arb_setup(), rt_arb_tess(), and rt_arb_tnurb().

Here is the call graph for this function:

int rt_arb_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

Find the bounding RPP of an arb

Definition at line 661 of file arb8.c.

References rt_db_internal::idb_ptr, and VSETALL.

HIDDEN int rt_arb_setup ( struct soltab stp,
struct rt_arb_internal *  aip,
struct rt_i rtip,
int  uv_wanted 
)

This is packaged as a separate function, so that it can also be called "on the fly" from the UV mapper.

Returns - 0 OK !0 failure

Definition at line 688 of file arb8.c.

References arb_specific::arb_face, arb_specific::arb_nmfaces, arb_specific::arb_opt, bu_malloc(), directory::d_namep, bn_tol::dist_sq, prep_arb::pa_doopt, prep_arb::pa_face, prep_arb::pa_faces, prep_arb::pa_opt, prep_arb::pa_tol_sq, rt_arb_mk_planes(), rt_i::rti_tol, soltab::st_aradius, soltab::st_bradius, soltab::st_center, soltab::st_dp, soltab::st_max, soltab::st_min, soltab::st_specific, X, Y, and Z.

Referenced by rt_arb_prep(), and rt_arb_uv().

Here is the call graph for this function:

int rt_arb_prep ( struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip 
)

This is the actual LIBRT "prep" interface.

Returns - 0 OK !0 failure

Definition at line 773 of file arb8.c.

References rt_db_internal::idb_ptr, and rt_arb_setup().

Here is the call graph for this function:

void rt_arb_print ( register const struct soltab stp)

Definition at line 785 of file arb8.c.

References arb_specific::arb_face, arb_specific::arb_nmfaces, arb_specific::arb_opt, oface::arb_U, oface::arb_Ulen, oface::arb_UVorig, oface::arb_V, oface::arb_Vlen, bu_log(), HPRINT, if(), soltab::st_specific, and VPRINT.

Here is the call graph for this function:

int rt_arb_shot ( struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead 
)

Function - Shoot a ray at an ARB8.

Algorithm - The intersection distance is computed for each face. The largest IN distance and the smallest OUT distance are used as the entry and exit points.

Returns - 0 MISS >0 HIT

Definition at line 828 of file arb8.c.

References application::a_resource, arb_specific::arb_face, arb_specific::arb_nmfaces, BU_LIST_INSERT, bu_log(), DEBUG_ARB8, hit::hit_dist, hit::hit_surfno, HPRINT, if(), seg::l, out, xray::r_dir, xray::r_pt, RT_G_DEBUG, RT_GET_SEG, s, seg::seg_in, seg::seg_out, seg::seg_stp, SQRT_SMALL_FASTF, soltab::st_specific, and V3ARGS.

Here is the call graph for this function:

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 
)

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 1003 of file arb8.c.

References arb_specific::arb_face, hit::hit_dist, hit::hit_normal, hit::hit_point, hit::hit_surfno, aface::peqn, xray::r_dir, xray::r_pt, and soltab::st_specific.

void rt_arb_curve ( register struct curvature cvp,
register struct hit hitp,
struct soltab stp 
)

Return the "curvature" of the ARB face. Pick a principle direction orthogonal to normal, and indicate no curvature.

Definition at line 1020 of file arb8.c.

References bn_vec_ortho(), curvature::crv_c1, curvature::crv_c2, curvature::crv_pdir, hit::hit_normal, and RT_CK_SOLTAB.

Here is the call graph for this function:

void rt_arb_uv ( struct application ap,
struct soltab stp,
register struct hit hitp,
register struct uvcoord uvp 
)

For a hit on a face of an ARB, return the (u, v) coordinates of the hit point. 0 <= u, v <= 1.

u extends along the arb_U direction defined by B-A, v extends along the arb_V direction defined by Nx(B-A).

Definition at line 1037 of file arb8.c.

References application::a_diverge, application::a_ray, application::a_rbeam, application::a_resource, application::a_rt_i, arb_specific::arb_face, arb_specific::arb_opt, bu_log(), bu_semaphore_acquire(), bu_semaphore_release(), DEBUG_SOLIDS, hit::hit_dist, hit::hit_point, hit::hit_surfno, rt_db_internal::idb_ptr, if(), aface::peqn, xray::r_dir, rt_arb_setup(), RT_CK_DB_INTERNAL, rt_db_free_internal(), rt_db_get_internal(), RT_G_DEBUG, rt_pr_soltab(), RT_SEM_MODEL, rt_i::rti_dbip, soltab::st_dp, soltab::st_matp, soltab::st_specific, uvcoord::uv_du, uvcoord::uv_dv, uvcoord::uv_u, and uvcoord::uv_v.

Here is the call graph for this function:

void rt_arb_free ( register struct soltab stp)

Definition at line 1120 of file arb8.c.

References arb_specific::arb_opt, bu_free(), if(), and soltab::st_specific.

Here is the call graph for this function:

int rt_arb_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)

Plot an ARB by tracing out four "U" shaped contours This draws each edge only once.

XXX No checking for degenerate faces is done, but probably should be.

Definition at line 1145 of file arb8.c.

References ARB_FACE, BU_CK_LIST_HEAD, rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

int rt_arb_class ( const struct soltab stp,
const fastf_t min,
const fastf_t max,
const struct bn_tol tol 
)

Definition at line 1166 of file arb8.c.

References arb_specific::arb_face, arb_specific::arb_nmfaces, BN_CLASSIFY_OUTSIDE, BN_CLASSIFY_UNIMPLEMENTED, bn_hlf_class(), bu_log(), if(), aface::peqn, and soltab::st_specific.

Here is the call graph for this function:

int rt_arb_import4 ( struct rt_db_internal ip,
const struct bu_external ep,
register const fastf_t mat,
const struct db_i dbip 
)

Import an ARB8 from the database format to the internal format. There are two parts to this: First, the database is presently single precision binary floating point. Second, the ARB in the database is represented as a vector from the origin to the first point, and 7 vectors from the first point to the remaining points. In 1979 it seemed like a good idea...

Convert from vector to point notation by rotating each vector and adding in the base vector.

Definition at line 1200 of file arb8.c.

References bn_mat_identity, BU_ALLOC, BU_CK_EXTERNAL, bu_log(), db_i::dbi_version, bu_external::ext_buf, flip_fastf_float(), ID_ARB8, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_ARB_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

int rt_arb_export4 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

Definition at line 1245 of file arb8.c.

References BU_CK_EXTERNAL, bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARB8, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

int rt_arb_import5 ( struct rt_db_internal ip,
const struct bu_external ep,
register const fastf_t mat,
const struct db_i dbip 
)

Import an arb from the db5 format and convert to the internal structure. Code duplicated from rt_arb_import4() with db5 help from g_ell.c

Definition at line 1282 of file arb8.c.

References bn_mat_identity, BU_ALLOC, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_cv_ntohd(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARB8, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, OBJ, RT_ARB_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, and SIZEOF_NETWORK_DOUBLE.

Here is the call graph for this function:

int rt_arb_export5 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

Definition at line 1315 of file arb8.c.

References BU_CK_EXTERNAL, bu_cv_htond(), bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARB8, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, and SIZEOF_NETWORK_DOUBLE.

Here is the call graph for this function:

int rt_arb_describe ( struct bu_vls str,
const struct rt_db_internal ip,
int  verbose,
double  mm2local 
)

Make human-readable formatted presentation of this solid. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 1347 of file arb8.c.

References BN_TOL_MAGIC, bu_vls_strcat(), bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, bn_tol::magic, bn_tol::para, bn_tol::perp, rt_arb_std_type(), RT_CK_DB_INTERNAL, X, Y, and Z.

Here is the call graph for this function:

void rt_arb_ifree ( struct rt_db_internal ip)

Free the storage associated with the rt_db_internal version of this solid.

Definition at line 1458 of file arb8.c.

References bu_free(), rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

Here is the call graph for this function:

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 
)

"Tessellate" an ARB into an NMG data structure. Purely a mechanical transformation of one faceted object into another.

Returns - -1 failure 0 OK. *r points to nmgregion that holds this tessellation.

Definition at line 1475 of file arb8.c.

References BU_LIST_FIRST, bu_log(), DEBUG_ARB8, bn_tol::dist_sq, rt_db_internal::idb_ptr, memset(), nmg_cmface(), nmg_face_g(), nmg_make_faces_within_tol(), nmg_mark_edges_real(), nmg_mrsv(), nmg_region_a(), nmg_vertex_gv(), prep_arb::pa_clockwise, prep_arb::pa_doopt, prep_arb::pa_face, prep_arb::pa_faces, prep_arb::pa_npts, prep_arb::pa_pindex, prep_arb::pa_tol_sq, aface::peqn, rt_arb_mk_planes(), RT_CK_DB_INTERNAL, RT_G_DEBUG, and s.

Referenced by rt_arb_brep().

Here is the call graph for this function:

int rt_arb_tnurb ( struct nmgregion **  r,
struct model *  m,
struct rt_db_internal ip,
const struct bn_tol tol 
)

"Tessellate" an ARB into a trimmed-NURB-NMG data structure. Purely a mechanical transformation of one faceted object into another.

Depending on the application, it might be beneficial to keep ARBs as planar-NMG objects; there is no real benefit to using B-splines here, other than uniformity of the conversion for all solids.

Returns - -1 failure 0 OK. *r points to nmgregion that holds this tessellation.

Definition at line 1580 of file arb8.c.

References BU_LIST_FIRST, BU_LIST_NEXT, bu_log(), DEBUG_ARB8, bn_tol::dist_sq, rt_db_internal::idb_ptr, lu, memset(), NMG_CK_LOOPUSE(), nmg_cmface(), nmg_edge_g_cnurb_plinear(), nmg_face_g_snurb(), nmg_mark_edges_real(), nmg_mrsv(), nmg_region_a(), nmg_vertex_gv(), nmg_vertexuse_a_cnurb(), prep_arb::pa_clockwise, prep_arb::pa_doopt, prep_arb::pa_faces, prep_arb::pa_npts, prep_arb::pa_pindex, prep_arb::pa_tol_sq, rt_arb_mk_planes(), RT_CK_DB_INTERNAL, RT_G_DEBUG, and s.

Here is the call graph for this function:

int rt_arb_calc_points ( struct rt_arb_internal *  arb,
int  cgtype,
const plane_t  planes[6],
const struct bn_tol tol 
)

Takes the planes[] array and intersects the planes to find the vertices of a GENARB8. The vertices are stored into arb->pt[]. This is an analog of rt_arb_calc_planes().

Definition at line 1740 of file arb8.c.

References bu_log(), rt_arb_3face_intersect(), and rt_arb_check_points().

Referenced by edarb_facedef(), ged_move_arb_face(), and ged_rotate_arb_face().

Here is the call graph for this function:

int rt_arb_check_points ( struct rt_arb_internal *  arb,
int  cgtype,
const struct bn_tol tol 
)
int rt_arb_3face_intersect ( point_t  point,
const plane_t *  planes,
int  type,
int  loc 
)

Finds the intersection point of three faces of an ARB.

Returns - 0 success, value is in 'point' -1 failure

Definition at line 1840 of file arb8.c.

References bn_mkpoint_3planes().

Referenced by rt_arb_calc_points(), and rt_arb_edit().

Here is the call graph for this function:

int rt_arb_calc_planes ( struct bu_vls error_msg_ret,
struct rt_arb_internal *  arb,
int  cgtype,
plane_t  planes[6],
const struct bn_tol tol 
)

Calculate the plane (face) equations for an arb output previously went to es_peqn[i].

Returns - -1 Failure 0 OK

Note - This function migrated from mged/edsol.c.

Definition at line 1871 of file arb8.c.

References BN_CK_TOL, bn_mk_plane_3pts(), bu_vls_printf(), and rt_arb_faces.

Referenced by arb_edit(), arb_extrude(), arb_mirror_face_axis(), edarb_facedef(), ged_inside_internal(), ged_move_arb_edge(), ged_move_arb_face(), ged_rotate_arb_face(), and rt_arb_edit().

Here is the call graph for this function:

int rt_arb_move_edge ( struct bu_vls error_msg_ret,
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 
)

Moves an arb edge (end1, end2) with bounding planes bp1 and bp2 through point "thru". The edge has (non-unit) slope "dir". Note that the fact that the normals here point in rather than out makes no difference for computing the correct intercepts. After the intercepts are found, they should be checked against the other faces to make sure that they are always "inside".

Definition at line 1916 of file arb8.c.

References bn_isect_line3_plane(), and bu_vls_printf().

Referenced by rt_arb_edit().

Here is the call graph for this function:

int rt_arb_edit ( struct bu_vls error_msg_ret,
struct rt_arb_internal *  arb,
int  arb_type,
int  edit_type,
vect_t  pos_model,
plane_t  planes[6],
const struct bn_tol tol 
)
int rt_arb_params ( struct pc_pc_set ps,
const struct rt_db_internal ip 
)

Definition at line 2217 of file arb8.c.

References RT_CK_DB_INTERNAL.

void rt_arb_volume ( fastf_t vol,
const struct rt_db_internal ip 
)

compute volume of an arb8 by dividing it into 6 arb4 and summing the volumes.

Definition at line 2230 of file arb8.c.

References bn_mk_plane_3pts(), BN_TOL_MAGIC, bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, bn_tol::magic, and RT_LEN_TOL.

Here is the call graph for this function:

int rt_arb_get_edge_list ( const struct rt_db_internal ip,
const short(*[])  edge_list[2] 
)

Definition at line 2276 of file arb8.c.

References arb4_edge_vertex_mapping, arb5_edge_vertex_mapping, arb7_edge_vertex_mapping, arb8_edge_vertex_mapping, BN_TOL_MAGIC, bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, local_arb6_edge_vertex_mapping, bn_tol::magic, bn_tol::para, bn_tol::perp, and rt_arb_std_type().

Referenced by rt_arb_find_e_nearest_pt2().

Here is the call graph for this function:

int rt_arb_find_e_nearest_pt2 ( int *  edge,
int *  vert1,
int *  vert2,
const struct rt_db_internal ip,
const point_t  pt2,
const mat_t  mat,
fastf_t  ptol 
)

Definition at line 2334 of file arb8.c.

References bn_dist_pt2_lseg2(), bn_dist_pt3_pt3(), BN_TOL_MAGIC, bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, bn_tol::magic, MAX_FASTF, bn_tol::para, bn_tol::perp, rt_arb_get_edge_list(), and Z.

Referenced by ged_find_arb_edge_nearest_pt().

Here is the call graph for this function:

int rt_arbn_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

Calculate a bounding RPP for an ARBN

Definition at line 50 of file arbn.c.

References bn_mkpoint_3planes(), rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_DOT_TOL, RT_LEN_TOL, SMALL_FASTF, and VSETALL.

Here is the call graph for this function:

int rt_arbn_prep ( struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip 
)

Returns - 0 OK !0 failure

Definition at line 105 of file arbn.c.

References bn_mkpoint_3planes(), BN_VECT_ARE_PARALLEL, bu_free(), bu_log(), bu_malloc(), bn_tol::dist, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, rt_i::rti_tol, soltab::st_aradius, soltab::st_bradius, soltab::st_center, soltab::st_max, soltab::st_min, soltab::st_specific, X, Y, Z, and ZERO.

Here is the call graph for this function:

void rt_arbn_print ( const struct soltab stp)

Definition at line 209 of file arbn.c.

References bu_log(), soltab::st_specific, X, Y, and Z.

Here is the call graph for this function:

int rt_arbn_shot ( struct soltab stp,
struct xray rp,
struct application ap,
struct seg seghead 
)

Intersect a ray with an ARBN. Find the largest "in" distance and the smallest "out" distance. Cyrus & Beck algorithm for convex polyhedra.

Returns - 0 MISS >0 HIT

Definition at line 238 of file arbn.c.

References application::a_resource, BU_LIST_INSERT, bu_log(), hit::hit_dist, hit::hit_surfno, seg::l, out, xray::r_dir, xray::r_pt, RT_GET_SEG, s, seg::seg_in, seg::seg_out, seg::seg_stp, SQRT_SMALL_FASTF, and soltab::st_specific.

Here is the call graph for this function:

void rt_arbn_norm ( struct hit hitp,
struct soltab stp,
struct xray rp 
)

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 310 of file arbn.c.

References bu_log(), hit::hit_dist, hit::hit_normal, hit::hit_point, hit::hit_surfno, xray::r_dir, xray::r_pt, soltab::st_specific, and VSETALL.

Here is the call graph for this function:

void rt_arbn_curve ( struct curvature cvp,
struct hit hitp,
struct soltab stp 
)

Return the "curvature" of the ARB face. Pick a principle direction orthogonal to normal, and indicate no curvature.

Definition at line 333 of file arbn.c.

References bn_vec_ortho(), curvature::crv_c1, curvature::crv_c2, curvature::crv_pdir, hit::hit_normal, and soltab::st_specific.

Here is the call graph for this function:

void rt_arbn_uv ( struct application ap,
struct soltab stp,
struct hit hitp,
struct uvcoord uvp 
)

For a hit on a face of an ARB, return the (u, v) coordinates of the hit point. 0 <= u, v <= 1. u extends along the arb_U direction defined by B-A, v extends along the arb_V direction defined by Nx(B-A).

Definition at line 351 of file arbn.c.

References if(), RT_CK_APPLICATION, RT_CK_HIT, soltab::st_specific, uvcoord::uv_du, uvcoord::uv_dv, uvcoord::uv_u, and uvcoord::uv_v.

Here is the call graph for this function:

void rt_arbn_free ( struct soltab stp)

Definition at line 367 of file arbn.c.

References bu_free(), and soltab::st_specific.

Here is the call graph for this function:

int rt_arbn_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)

Brute force through all possible plane intersections. Generate all edge lines, then intersect the line with all the other faces to find the vertices on that line. If the geometry is correct, there will be no more than two. While not the fastest strategy, this will produce an accurate plot without requiring extra bookkeeping. Note that the vectors will be drawn in no special order.

Definition at line 387 of file arbn.c.

References bn_mkpoint_3planes(), BN_VECT_ARE_PARALLEL, BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, bu_log(), bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, RT_ADD_VLIST, RT_CK_DB_INTERNAL, VPRINT, and VSETALL.

Here is the call graph for this function:

int rt_arbn_tess ( struct nmgregion **  r,
struct model *  m,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol 
)

"Tessellate" an ARB into an NMG data structure. Purely a mechanical transformation of one faceted object into another.

Returns - -1 failure 0 OK. *r points to nmgregion that holds this tessellation.

Definition at line 554 of file arbn.c.

References bn_mkpoint_3planes(), bu_calloc(), bu_free(), BU_LIST_FIRST, bu_log(), bn_tol::dist, bn_tol::dist_sq, rt_db_internal::idb_ptr, LOC, nmg_cmface(), nmg_fix_normals(), nmg_fu_planeeqn(), nmg_kr(), nmg_mark_edges_real(), nmg_mrsv(), nmg_region_a(), nmg_vertex_gv(), arbn_pts::plane_no, RT_CK_DB_INTERNAL, s, arbn_edges::v1_no, arbn_edges::v2_no, and arbn_pts::vp.

Referenced by rt_arbn_brep().

Here is the call graph for this function:

int rt_arbn_import4 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Convert from "network" doubles to machine specific. Transform

Definition at line 801 of file arbn.c.

References bn_mat_identity, BU_ALLOC, BU_CK_EXTERNAL, bu_cv_ntohd(), bu_free(), bu_log(), bu_malloc(), bu_external::ext_buf, ID_ARBN, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_ARBN_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, X, Y, and Z.

Here is the call graph for this function:

int rt_arbn_export4 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

Definition at line 874 of file arbn.c.

References bu_calloc(), BU_CK_EXTERNAL, bu_cv_htond(), bu_free(), bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARBN, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, X, Y, and Z.

Here is the call graph for this function:

int rt_arbn_import5 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Convert from "network" doubles to machine specific. Transform

Definition at line 933 of file arbn.c.

References bn_mat_is_identity(), BU_ALLOC, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_cv_ntohd(), bu_free(), bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARBN, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_ARBN_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, and SIZEOF_NETWORK_DOUBLE.

Here is the call graph for this function:

int rt_arbn_export5 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

Definition at line 1004 of file arbn.c.

References BU_CK_EXTERNAL, bu_cv_htond(), bu_free(), bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARBN, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, SIZEOF_NETWORK_DOUBLE, SIZEOF_NETWORK_LONG, X, Y, and Z.

Here is the call graph for this function:

int rt_arbn_describe ( struct bu_vls str,
const struct rt_db_internal ip,
int  verbose,
double  mm2local 
)

Make human-readable formatted presentation of this solid. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 1057 of file arbn.c.

References bu_vls_strcat(), rt_db_internal::idb_ptr, X, Y, and Z.

Here is the call graph for this function:

void rt_arbn_ifree ( struct rt_db_internal ip)

Free the storage associated with the rt_db_internal version of this solid.

Definition at line 1087 of file arbn.c.

References bu_free(), rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

Here is the call graph for this function:

int rt_arbn_get ( struct bu_vls logstr,
const struct rt_db_internal intern,
const char *  attr 
)

Routine to format the parameters of an ARBN primitive for "db get"

Legal requested parameters include: "N" - number of equations "P" - list of all the planes "P#" - the specified plane number (0 based) no arguments returns everything

Definition at line 1113 of file arbn.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_STR_EQUAL, bu_vls_printf(), bu_vls_strcpy(), and rt_db_internal::idb_ptr.

Here is the call graph for this function:

int rt_arbn_adjust ( struct bu_vls logstr,
struct rt_db_internal intern,
int  argc,
const char **  argv 
)

Routine to modify an arbn via the "db adjust" command

Legal parameters are: "N" - adjust the number of planes (new ones will be zeroed) "P" - adjust the entire list of planes "P#" - adjust a specific plane (0 based) "P+" - add a new plane to the list of planes

Definition at line 1168 of file arbn.c.

References BRLCAD_ERROR, brlcad_interp, BRLCAD_OK, bu_free(), bu_realloc(), BU_STR_EQUAL, bu_vls_printf(), rt_db_internal::idb_ptr, if(), RT_CK_DB_INTERNAL, and tcl_list_to_fastf_array().

Here is the call graph for this function:

int rt_arbn_params ( struct pc_pc_set ps,
const struct rt_db_internal ip 
)

Definition at line 1268 of file arbn.c.

References rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

void rt_arbn_surf_area ( fastf_t area,
const struct rt_db_internal ip 
)

Definition at line 1321 of file arbn.c.

References poly_face::area, bu_calloc(), bu_free(), rt_db_internal::idb_ptr, and poly_face::pts.

Here is the call graph for this function:

void rt_arbn_centroid ( point_t *  cent,
const struct rt_db_internal ip 
)

Definition at line 1343 of file arbn.c.

References poly_face::area, bn_polygon_centroid(), bu_calloc(), bu_free(), poly_face::cent_pyramid, rt_db_internal::idb_ptr, if(), poly_face::plane_eqn, poly_face::pts, and poly_face::vol_pyramid.

Here is the call graph for this function:

void rt_arbn_volume ( fastf_t volume,
const struct rt_db_internal ip 
)

Definition at line 1399 of file arbn.c.

References bu_calloc(), bu_free(), rt_db_internal::idb_ptr, and poly_face::pts.

Here is the call graph for this function:

int rt_bot_prep ( struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip 
)

Given a pointer to a GED database record, and a transformation matrix, determine if this is a valid BOT, and if so, precompute various terms of the formula.

Returns - 0 BOT is OK !0 Error in description

Implicit return - A struct bot_specific is created, and its address is stored in stp->st_specific for use by bot_shot().

Definition at line 249 of file bot.c.

References bottie_prep_double(), rt_db_internal::idb_ptr, rt_bot_bbox(), RT_CK_DB_INTERNAL, RT_DEFAULT_MINTIE, soltab::st_max, and soltab::st_min.

Referenced by rt_ars_prep().

Here is the call graph for this function:

void rt_bot_ifree ( struct rt_db_internal ip)

Free the storage associated with the rt_db_internal version of this solid.

Definition at line 1526 of file bot.c.

References bot_ifree2(), rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

Referenced by rt_ars_prep(), and rt_bot_xform().

Here is the call graph for this function:

void rt_ars_free ( register struct soltab stp)

Definition at line 72 of file ars.c.

References bu_bomb(), if(), soltab::st_specific, and TRI_NULL.

Here is the call graph for this function:

int rt_ars_class ( const struct soltab stp,
const vect_t  min,
const vect_t  max,
const struct bn_tol tol 
)

Definition at line 83 of file ars.c.

References bu_bomb(), if(), soltab::st_specific, and TRI_NULL.

Here is the call graph for this function:

HIDDEN fastf_t* ars_rd_curve ( union record *  rp,
int  npts,
int  flip 
)

reads a set of ARS B records and returns a pointer to memory allocated for holding the curve's fastf_t values.

Definition at line 103 of file ars.c.

References bu_log(), bu_malloc(), and flip_fastf_float().

Referenced by rt_ars_import4().

Here is the call graph for this function:

int rt_ars_import4 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Read all the curves in as a two dimensional array. The caller is responsible for freeing the dynamic memory.

Note that in each curve array, the first point is replicated as the last point, to make processing the data easier.

Definition at line 147 of file ars.c.

References ars_rd_curve(), bn_mat_identity, BU_ALLOC, BU_CK_EXTERNAL, bu_log(), bu_malloc(), db_i::dbi_version, bu_external::ext_buf, flip_short(), ID_ARS, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_ARS_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, OSL::Strings::v, and VSETALL.

Here is the call graph for this function:

int rt_ars_export4 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

The name will be added by the caller. Generally, only libwdb will set conv2mm != 1.0

Definition at line 229 of file ars.c.

References bp, bu_calloc(), BU_CK_EXTERNAL, bu_external::ext_buf, bu_external::ext_nbytes, ID_ARS, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

int rt_ars_import5 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Read all the curves in as a two dimensional array. The caller is responsible for freeing the dynamic memory.

Note that in each curve array, the first point is replicated as the last point, to make processing the data easier.

Definition at line 306 of file ars.c.

References bn_mat_identity, BU_ALLOC, bu_calloc(), BU_CK_EXTERNAL, bu_cv_ntohd(), bu_external::ext_buf, ID_ARS, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, OBJ, RT_ARS_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, SIZEOF_NETWORK_DOUBLE, and SIZEOF_NETWORK_LONG.

Here is the call graph for this function:

int rt_ars_export5 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

The name will be added by the caller. Generally, only libwdb will set conv2mm != 1.0

Definition at line 361 of file ars.c.

References bu_calloc(), BU_CK_EXTERNAL, bu_cv_htond(), bu_external::ext_buf, bu_external::ext_nbytes, ID_ARS, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, SIZEOF_NETWORK_DOUBLE, and SIZEOF_NETWORK_LONG.

Here is the call graph for this function:

int rt_ars_describe ( struct bu_vls str,
const struct rt_db_internal ip,
int  verbose,
double  mm2local 
)

Make human-readable formatted presentation of this solid. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 409 of file ars.c.

References bu_vls_strcat(), rt_db_internal::idb_ptr, OSL::Strings::v, X, Y, and Z.

Here is the call graph for this function:

void rt_ars_ifree ( struct rt_db_internal ip)

Free the storage associated with the rt_db_internal version of this solid.

Definition at line 457 of file ars.c.

References bu_free(), rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

Referenced by rt_ars_prep().

Here is the call graph for this function:

int rt_ars_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_ars_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

TODO: produces bboxes that are waaay too big.

Definition at line 657 of file ars.c.

References rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, and VSETALL.

int rt_ars_prep ( struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip 
)

This routine is used to prepare a list of planar faces for being shot at by the ars routines.

Process an ARS, which is represented as a vector from the origin to the first point, and many vectors from the first point to the remaining points.

This routine is unusual in that it has to read additional database records to obtain all the necessary information.

Definition at line 699 of file ars.c.

References bu_avs_init(), BU_LIST_FIRST, bu_log(), directory::d_namep, ID_BOT, rt_db_internal::idb_avs, rt_db_internal::idb_magic, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, nmg_bot(), nmg_km(), nmg_mm(), OBJ, rt_ars_ifree(), rt_ars_tess(), rt_bot_ifree(), rt_bot_prep(), RT_DB_INTERNAL_MAGIC, rt_i::rti_tol, rt_i::rti_ttol, s, and soltab::st_dp.

Here is the call graph for this function:

void rt_ars_print ( register const struct soltab stp)

Definition at line 752 of file ars.c.

References bu_log(), if(), soltab::st_specific, tri_specific::tri_A, tri_specific::tri_BA, tri_specific::tri_CA, tri_specific::tri_forw, tri_specific::tri_N, TRI_NULL, tri_specific::tri_wn, and VPRINT.

Here is the call graph for this function:

int rt_ars_shot ( struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead 
)

Shoot a ray at an ARS.

Returns - 0 MISS !0 HIT

Definition at line 781 of file ars.c.

References application::a_resource, application::a_rt_i, OSL::Strings::alpha, BU_LIST_INSERT, bu_log(), DEBUG_ARB8, bn_tol::dist, hit::hit_dist, hit::hit_vpriv, seg::l, xray::r_dir, xray::r_pt, RT_ARS_MAXHITS, RT_G_DEBUG, RT_GET_SEG, RT_HIT_MAGIC, RT_HIT_NORMAL, rt_hitsort(), RT_LEN_TOL, rt_i::rti_tol, seg::seg_in, seg::seg_out, seg::seg_stp, soltab::st_specific, tri_specific::tri_A, tri_specific::tri_BA, tri_specific::tri_CA, tri_specific::tri_forw, tri_specific::tri_surfno, tri_specific::tri_wn, and X.

Here is the call graph for this function:

void rt_hitsort ( register struct hit h,
register int  nh 
)

Sort an array of hits into ascending order.

Definition at line 971 of file ars.c.

References hit::hit_dist.

Referenced by rt_ars_shot().

void rt_ars_norm ( register struct hit hitp,
struct soltab stp,
register struct xray rp 
)

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 992 of file ars.c.

References hit::hit_dist, hit::hit_normal, hit::hit_point, if(), xray::r_dir, xray::r_pt, soltab::st_specific, and tri_specific::tri_N.

Here is the call graph for this function:

void rt_ars_curve ( register struct curvature cvp,
register struct hit hitp,
struct soltab stp 
)

Return the "curvature" of the ARB face. Pick a principle direction orthogonal to normal, and indicate no curvature.

Definition at line 1008 of file ars.c.

References bn_vec_ortho(), curvature::crv_c1, curvature::crv_c2, curvature::crv_pdir, hit::hit_normal, if(), and soltab::st_specific.

Here is the call graph for this function:

void rt_ars_uv ( struct application ap,
struct soltab stp,
register struct hit hitp,
register struct uvcoord uvp 
)

For a hit on a face of an ARB, return the (u, v) coordinates of the hit point. 0 <= u, v <= 1.

u extends along the Xbasis direction defined by B-A, v extends along the "Ybasis" direction defined by (B-A)xN.

Definition at line 1027 of file ars.c.

References application::a_diverge, application::a_rbeam, bu_log(), hit::hit_dist, hit::hit_point, if(), RT_G_DEBUG, soltab::st_specific, tri_specific::tri_A, tri_specific::tri_BA, tri_specific::tri_CA, uvcoord::uv_du, uvcoord::uv_dv, uvcoord::uv_u, and uvcoord::uv_v.

Here is the call graph for this function:

int rt_ars_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)
int rt_ars_get ( struct bu_vls logstr,
const struct rt_db_internal intern,
const char *  attr 
)

Definition at line 1095 of file ars.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_STR_EQUAL, bu_vls_printf(), bu_vls_strcpy(), rt_db_internal::idb_ptr, strchr(), and V3ARGS.

Here is the call graph for this function:

int rt_ars_adjust ( struct bu_vls logstr,
struct rt_db_internal intern,
int  argc,
const char **  argv 
)

Definition at line 1166 of file ars.c.

References BRLCAD_ERROR, brlcad_interp, BRLCAD_OK, bu_calloc(), bu_free(), bu_malloc(), bu_realloc(), BU_STR_EQUAL, bu_strdup, bu_vls_printf(), rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, strchr(), tcl_list_to_fastf_array(), and VSETALL.

Here is the call graph for this function:

int rt_ars_params ( struct pc_pc_set ps,
const struct rt_db_internal ip 
)

Definition at line 1302 of file ars.c.

References RT_CK_DB_INTERNAL.

int rt_bot_makesegs ( struct hit hits,
size_t  nhits,
struct soltab stp,
struct xray rp,
struct application ap,
struct seg seghead,
struct rt_piecestate psp 
)

Given an array of hits, make segments out of them. Exactly how this is to be done depends on the mode of the BoT.

Definition at line 320 of file bot.c.

References if(), rt_bot_plate_segs(), and soltab::st_specific.

Referenced by bottie_shot_double(), rt_bot_piece_hitsegs(), and XGLUE().

Here is the call graph for this function:

HIDDEN int rt_bot_unoriented_segs ( struct hit hits,
size_t  nhits,
struct soltab stp,
struct xray rp,
struct application ap,
struct seg seghead,
struct bot_specific *  bot 
)

Definition at line 299 of file bot.c.

Referenced by XGLUE().

size_t rt_botface_w_normals ( struct soltab stp,
struct bot_specific *  bot,
fastf_t ap,
fastf_t bp,
fastf_t cp,
fastf_t vertex_normals,
size_t  face_no,
const struct bn_tol tol 
)

This function is called with pointers to 3 points, and is used to prepare BOT faces. ap, bp, cp point to vect_t points.

Return - 0 if the 3 points didn't form a plane (e.g., collinear, etc.).

pts (3) if a valid plane resulted.

Definition at line 139 of file bot.c.

Referenced by rt_botface(), and XGLUE().

size_t rt_botface ( struct soltab stp,
struct bot_specific *  bot,
fastf_t ap,
fastf_t bp,
fastf_t cp,
size_t  face_no,
const struct bn_tol tol 
)

Definition at line 160 of file bot.c.

References rt_botface_w_normals().

Referenced by XGLUE().

Here is the call graph for this function:

void rt_bot_prep_pieces ( struct bot_specific *  bot,
struct soltab stp,
size_t  ntri,
const struct bn_tol tol 
)

Do the prep to support pieces for a BOT/ARS

Definition at line 176 of file bot.c.

Referenced by XGLUE().

int rt_bot_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max 
)

Calculate an RPP for a BoT

Definition at line 193 of file bot.c.

References rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, SMALL_FASTF, VSETALL, X, Y, and Z.

Referenced by rt_bot_adaptive_plot(), and rt_bot_prep().

void rt_bot_print ( const struct soltab stp)

Definition at line 275 of file bot.c.

References RT_CK_SOLTAB.

HIDDEN int rt_bot_plate_segs ( struct hit hits,
size_t  nhits,
struct soltab stp,
struct xray rp,
struct application ap,
struct seg seghead,
struct bot_specific *  bot 
)

Definition at line 282 of file bot.c.

Referenced by rt_bot_makesegs().

int rt_bot_shot ( struct soltab stp,
struct xray rp,
struct application ap,
struct seg seghead 
)

Intersect a ray with a bot. If an intersection occurs, a struct seg will be acquired and filled in.

Notes for rt_bot_norm(): hit_private contains pointer to the tri_specific structure. hit_vpriv[X] contains dot product of ray direction and unit normal from tri_specific.

Returns - 0 MISS >0 HIT

Definition at line 350 of file bot.c.

References bottie_shot_double(), if(), soltab::st_specific, and UNLIKELY.

Here is the call graph for this function:

int rt_bot_piece_shot ( struct rt_piecestate psp,
struct rt_piecelist plp,
double  dist_corr,
struct xray rp,
struct application ap,
struct seg seghead 
)

Intersect a ray with a list of "pieces" of a BoT.

This routine may be invoked many times for a single ray, as the ray traverses from one space partitioning cell to the next.

Plate-mode (2 hit) segments will be returned immediately in seghead.

Generally the hits are stashed between invocations in psp.

Definition at line 383 of file bot.c.

References if(), RT_CK_PIECELIST, RT_CK_SOLTAB, soltab::st_specific, and rt_piecelist::stp.

Here is the call graph for this function:

void rt_bot_piece_hitsegs ( struct rt_piecestate psp,
struct seg seghead,
struct application ap 
)

Definition at line 402 of file bot.c.

References application::a_ray, rt_htbl::end, rt_htbl::hits, rt_piecestate::htab, rt_bot_makesegs(), RT_CK_AP, RT_CK_HTBL, RT_CK_PIECESTATE, rt_hitsort(), and rt_piecestate::stp.

Here is the call graph for this function:

void rt_bot_norm ( struct hit hitp,
struct soltab stp,
struct xray rp 
)

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 420 of file bot.c.

References if(), and soltab::st_specific.

Here is the call graph for this function:

void rt_bot_curve ( struct curvature cvp,
struct hit hitp,
struct soltab stp 
)

Return the curvature of the bot.

Definition at line 436 of file bot.c.

References bn_vec_ortho(), curvature::crv_c1, curvature::crv_c2, curvature::crv_pdir, hit::hit_normal, and RT_CK_SOLTAB.

Here is the call graph for this function:

void rt_bot_uv ( struct application ap,
struct soltab stp,
struct hit hitp,
struct uvcoord uvp 
)

For a hit on the surface of an bot, return the (u, v) coordinates of the hit point, 0 <= u, v <= 1.

u = azimuth v = elevation

Definition at line 456 of file bot.c.

References RT_CK_APPLICATION, RT_CK_HIT, and RT_CK_SOLTAB.

void rt_bot_free ( struct soltab stp)

Definition at line 466 of file bot.c.

References bottie_free_double(), if(), and soltab::st_specific.

Here is the call graph for this function:

int rt_bot_class ( const struct soltab stp,
const fastf_t min,
const fastf_t max,
const struct bn_tol tol 
)

Definition at line 485 of file bot.c.

References BN_CK_TOL, and RT_CK_SOLTAB.

vdsNode* build_vertex_tree ( struct rt_bot_internal *  bot)

Definition at line 497 of file bot.c.

References bu_free(), and bu_malloc().

Referenced by rt_bot_adaptive_plot().

Here is the call graph for this function:

int rt_bot_adaptive_plot ( struct rt_db_internal ip,
const struct rt_view_info info 
)

Definition at line 613 of file bot.c.

References BU_CK_LIST_HEAD, build_vertex_tree(), bot_fold_data::dmax, bot_fold_data::dmin, rt_db_internal::idb_ptr, bot_fold_data::point_spacing, rt_view_info::point_spacing, bot_fold_data::root, rt_bot_bbox(), RT_CK_DB_INTERNAL, and rt_view_info::vhead.

Here is the call graph for this function:

int rt_bot_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)
int rt_bot_plot_poly ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol 
)
void rt_bot_centroid ( point_t *  cent,
const struct rt_db_internal ip 
)

Definition at line 740 of file bot.c.

References rt_db_internal::idb_ptr, rt_bot_condense(), and VSETALL.

Referenced by rt_bot_tess().

Here is the call graph for this function:

int rt_bot_tess ( struct nmgregion **  r,
struct model *  m,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol 
)

Returns - -1 failure 0 OK. *r points to nmgregion that holds this tessellation.

Definition at line 761 of file bot.c.

References bn_3pts_collinear(), bn_3pts_distinct(), bu_calloc(), bu_free(), BU_LIST_FIRST, bu_log(), rt_db_internal::idb_ptr, nmg_calc_face_g(), nmg_cmface(), nmg_fix_normals(), nmg_kfu(), nmg_mark_edges_real(), nmg_mrsv(), nmg_region_a(), nmg_vertex_gv(), rt_bot_centroid(), RT_BOT_TESS_MAX_FACES, RT_CK_DB_INTERNAL, s, and V3ARGS.

Referenced by ged_bot_fuse(), and rt_bot_brep().

Here is the call graph for this function:

int rt_bot_import4 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Import an BOT from the database format to the internal format. Apply modeling transformations as well.

Definition at line 892 of file bot.c.

References bn_mat_identity, BU_ALLOC, bu_calloc(), BU_CK_EXTERNAL, bu_cv_ntohd(), bu_hex_to_bitv(), bu_log(), bu_external::ext_buf, ID_BOT, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_BOT_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

int rt_bot_export4 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

The name is added by the caller, in the usual place.

Definition at line 969 of file bot.c.

References bu_bitv_new(), bu_bitv_to_hex(), bu_calloc(), BU_CK_EXTERNAL, bu_cv_htond(), bu_log(), bu_strlcpy, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_strlen(), bu_external::ext_buf, bu_external::ext_nbytes, ID_BOT, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

int rt_bot_import5 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Definition at line 1067 of file bot.c.

References bn_mat_identity, BU_ALLOC, bu_calloc(), BU_CK_EXTERNAL, bu_cv_ntohd(), bu_hex_to_bitv(), bu_log(), bu_external::ext_buf, ID_BOT, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, OBJ, RT_BOT_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, SIZEOF_NETWORK_DOUBLE, and SIZEOF_NETWORK_LONG.

Here is the call graph for this function:

int rt_bot_export5 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

Definition at line 1197 of file bot.c.

References bu_bitv_to_hex(), BU_CK_EXTERNAL, bu_cv_htond(), bu_free(), bu_malloc(), bu_strlcpy, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_strlen(), bu_external::ext_buf, bu_external::ext_nbytes, ID_BOT, rt_db_internal::idb_ptr, if(), rem, RT_CK_DB_INTERNAL, RT_CK_DBI, SIZEOF_NETWORK_DOUBLE, and SIZEOF_NETWORK_LONG.

Here is the call graph for this function:

int rt_bot_describe ( struct bu_vls str,
const struct rt_db_internal ip,
int  verbose,
double  mm2local 
)

Make human-readable formatted presentation of this solid. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 1358 of file bot.c.

References BU_BITTEST, bu_vls_strcat(), rt_db_internal::idb_ptr, and orientation.

Here is the call graph for this function:

HIDDEN void bot_ifree2 ( struct rt_bot_internal *  bot_ip)

Definition at line 1478 of file bot.c.

References bu_free().

Referenced by rt_bot_ifree(), and rt_bot_list_free().

Here is the call graph for this function:

int rt_bot_xform ( struct rt_db_internal op,
const fastf_t mat,
struct rt_db_internal ip,
const int  release,
struct db_i dbip 
)

Definition at line 1539 of file bot.c.

References BU_ALLOC, bu_avs_init(), BU_AVS_MAGIC, bu_avs_merge(), bu_bitv_dup(), bu_calloc(), bu_malloc(), bu_attribute_value_set::count, ID_BOT, rt_db_internal::idb_avs, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, bu_attribute_value_set::magic, OBJ, rt_bot_ifree(), RT_BOT_INTERNAL_MAGIC, RT_CK_DB_INTERNAL, RT_CK_DBI, and RT_DB_INTERNAL_INIT.

Here is the call graph for this function:

int rt_bot_find_v_nearest_pt2 ( const struct rt_bot_internal *  bot,
const point_t  pt2,
const mat_t  mat 
)

Definition at line 1614 of file bot.c.

References OSL::Strings::closest, MAX_FASTF, OSL::Strings::v, X, and Y.

Referenced by ged_find_botpt_nearest_pt().

size_t rt_bot_get_edge_list ( const struct rt_bot_internal *  bot,
size_t **  edge_list 
)

Definition at line 1645 of file bot.c.

References bu_calloc(), and rt_bot_edge_in_list().

Referenced by ged_get_bot_edges(), and rt_bot_find_e_nearest_pt2().

Here is the call graph for this function:

int rt_bot_edge_in_list ( const size_t  v1,
const size_t  v2,
const size_t  edge_list[],
const size_t  edge_count 
)

Definition at line 1683 of file bot.c.

Referenced by rt_bot_get_edge_list().

int rt_bot_find_e_nearest_pt2 ( int *  vert1,
int *  vert2,
const struct rt_bot_internal *  bot,
const point_t  pt2,
const mat_t  mat 
)

This routine finds the edge closest to the 2D point "pt2", and returns the edge as two vertex indices (vert1 and vert2). These vertices are ordered (closest to pt2 is first)

Definition at line 1709 of file bot.c.

References bn_dist_pt2_lseg2(), BN_TOL_MAGIC, bu_free(), bn_tol::dist, bn_tol::dist_sq, bn_tol::magic, MAX_FASTF, bn_tol::para, bn_tol::perp, rt_bot_get_edge_list(), and Z.

Referenced by ged_find_bot_edge_nearest_pt().

Here is the call graph for this function:

int rt_bot_get ( struct bu_vls logstr,
const struct rt_db_internal intern,
const char *  attr 
)

Examples - db get name fm get los facemode bit vector db get name fm# get los face mode of face # (center, append) db get name V get coords for all vertices db get name V# get coords for vertex # db get name F get vertex indices for all faces db get name F# get vertex indices for face # db get name f get list of coords for all faces db get name f# get list of 3 3tuple coords for face # db get name T get thickness for all faces db get name T# get thickness for face # db get name N get list of normals db get name N# get coords for normal # db get name fn get list indices into normal vectors for all faces db get name fn# get list indices into normal vectors for face # db get name nv get num_vertices db get name nt get num_faces db get name nn get num_normals db get name nfn get num_face_normals db get name mode get mode (surf, volume, plate, plane_nocos) db get name orient get orientation (no, rh, lh) db get name flags get BOT flags

Definition at line 1853 of file bot.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_BITTEST, bu_bitv_to_hex(), BU_STR_EQUAL, bu_strncmp(), bu_vls_printf(), bu_vls_strcat(), bu_vls_strcpy(), rt_db_internal::idb_ptr, and V3ARGS.

Here is the call graph for this function:

int bot_check_vertex_indices ( struct bu_vls logstr,
struct rt_bot_internal *  bot 
)

Definition at line 2112 of file bot.c.

References bu_vls_printf().

Referenced by rt_bot_adjust().

Here is the call graph for this function:

int rt_bot_adjust ( struct bu_vls logstr,
struct rt_db_internal intern,
int  argc,
const char **  argv 
)

Examples - db adjust name fm set los facemode bit vector db adjust name fm# set los face mode of face # (center, append) db adjust name V set coords for all vertices db adjust name V# set coords for vertex # db adjust name F set vertex indices for all faces db adjust name F# set vertex indices for face # db adjust name T set thickness for all faces db adjust name T# set thickness for face # db adjust name N set list of normals db adjust name N# set coords for normal # db adjust name fn set list indices into normal vectors for all faces db adjust name fn# set list indices into normal vectors for face # db adjust name nn set num_normals db adjust name mode set mode (surf, volume, plate, plane_nocos) db adjust name orient set orientation (no, rh, lh) db adjust name flags set flags

Definition at line 2150 of file bot.c.

References bot_check_vertex_indices(), BRLCAD_ERROR, brlcad_interp, BRLCAD_OK, BU_BITCLR, BU_BITSET, bu_bitv_new(), bu_calloc(), bu_free(), bu_hex_to_bitv(), bu_malloc(), bu_next_token(), bu_realloc(), BU_STR_EQUAL, bu_strncmp(), bu_vls_printf(), rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, VSET, and VSETALL.

Here is the call graph for this function:

int rt_bot_form ( struct bu_vls logstr,
const struct rt_functab ftp 
)

Definition at line 2738 of file bot.c.

References BRLCAD_OK, bu_vls_printf(), and RT_CK_FUNCTAB.

Here is the call graph for this function:

int rt_bot_params ( struct pc_pc_set ps,
const struct rt_db_internal ip 
)

Definition at line 2750 of file bot.c.

References RT_CK_DB_INTERNAL.

int buildEdgeTable ( struct rt_bot_internal *  bot,
struct bot_edge ***  edges 
)

Definition at line 2779 of file bot.c.

References BU_ALLOC, bu_calloc(), bot_edge::next, bot_edge::use_count, and bot_edge::v.

Referenced by maxEdge(), minEdge(), and rt_bot_decimate().

Here is the call graph for this function:

float minEdge ( struct rt_bot_internal *  bot)

Routine for finding the smallest edge length in a BoT.

Definition at line 2869 of file bot.c.

References bu_free(), buildEdgeTable(), MAX_FASTF, bot_edge::next, and bot_edge::v.

Referenced by rt_bot_propget().

Here is the call graph for this function:

float maxEdge ( struct rt_bot_internal *  bot)

Routine for finding the largest edge length in a BoT.

Definition at line 2940 of file bot.c.

References bu_free(), buildEdgeTable(), bot_edge::next, and bot_edge::v.

Referenced by rt_bot_propget().

Here is the call graph for this function:

fastf_t rt_bot_propget ( struct rt_bot_internal *  bot,
const char *  property 
)

RT_BOT_PROPGET

Command used to query BoT property values. Returns parseable values rather than formatted strings.

Returns -1 on error.

Definition at line 3015 of file bot.c.

References bu_strncmp(), maxEdge(), and minEdge().

Referenced by ged_bot().

Here is the call graph for this function:

int rt_bot_vertex_fuse ( struct rt_bot_internal *  bot,
const struct bn_tol tol 
)

This routine adjusts the vertex pointers in each face so that pointers to duplicate vertices end up pointing to the same vertex. The unused vertices are removed and the resulting bot is condensed. Returns the number of vertices fused.

Definition at line 3060 of file bot.c.

References bin(), bn_pt3_pt3_equal(), BU_ASSERT_LONG, bu_bomb(), bu_calloc(), bu_free(), bu_log(), bu_realloc(), delta, memset(), rt_bot_condense(), VSETALL, X, and ZERO.

Referenced by ged_bot_vertex_fuse(), make_bot_object(), and rt_pg_to_bot().

Here is the call graph for this function:

int rt_bot_same_orientation ( const int *  a,
const int *  b 
)

Definition at line 3262 of file bot.c.

Referenced by rt_bot_face_fuse().

int rt_bot_face_fuse ( struct rt_bot_internal *  bot)

Definition at line 3283 of file bot.c.

References BU_BITCLR, BU_BITSET, BU_BITTEST, bu_bitv_new(), bu_bomb(), bu_free(), bu_realloc(), rt_bot_same_orientation(), and ZERO.

Referenced by ged_bot_face_fuse(), make_bot_object(), and rt_pg_to_bot().

Here is the call graph for this function:

int rt_bot_condense ( struct rt_bot_internal *  bot)

Get rid of unused vertices

Definition at line 3392 of file bot.c.

References bu_bomb(), bu_calloc(), bu_free(), bu_log(), and bu_realloc().

Referenced by ged_bot_condense(), rt_bot_centroid(), rt_bot_decimate(), and rt_bot_vertex_fuse().

Here is the call graph for this function:

int find_closest_face ( fastf_t **  centers,
int *  piece,
int *  old_faces,
size_t  num_faces,
fastf_t vertices 
)

Definition at line 3448 of file bot.c.

References bu_malloc(), and MAX_FASTF.

Referenced by rt_bot_sort_faces().

Here is the call graph for this function:

void Add_unique_verts ( int *  piece_verts,
int *  v 
)

Definition at line 3505 of file bot.c.

References OSL::Strings::v.

Referenced by rt_bot_sort_faces().

int rt_bot_sort_faces ( struct rt_bot_internal *  bot,
size_t  tris_per_piece 
)

This routine sorts the faces of the BOT such that when they are taken in groups of "tris_per_piece", * each group (piece) will consist of adjacent faces

Definition at line 3531 of file bot.c.

References Add_unique_verts(), bu_calloc(), bu_free(), bu_log(), bu_malloc(), find_closest_face(), memset(), and VSETALL.

Referenced by ged_bot_face_sort().

Here is the call graph for this function:

HIDDEN void delete_edge ( int  v1,
int  v2,
struct bot_edge **  edges 
)

Definition at line 3828 of file bot.c.

References bu_free(), bot_edge::next, bot_edge::use_count, and bot_edge::v.

Referenced by decimate_edge().

Here is the call graph for this function:

HIDDEN int decimate_edge ( int  v1,
int  v2,
struct bot_edge **  edges,
size_t  num_edges,
int *  faces,
size_t  num_faces,
int  face_del1,
int  face_del2 
)

Routine to perform the actual edge decimation step The edge from v1 to v2 is eliminated by moving v1 to v2. Faces that used this edge are eliminated. Faces that used v1 will have that reference changed to v2.

Definition at line 3883 of file bot.c.

References bu_free(), delete_edge(), bot_edge::next, bot_edge::use_count, and bot_edge::v.

Referenced by rt_bot_decimate().

Here is the call graph for this function:

HIDDEN int edge_can_be_decimated ( struct rt_bot_internal *  bot,
int *  faces,
struct bot_edge **  edges,
int  v1,
int  v2,
int *  face_del1,
int *  face_del2,
fastf_t  max_chord_error,
fastf_t  max_normal_error,
fastf_t  min_edge_length_sq 
)

Routine to determine if the specified edge can be eliminated within the given constraints:

"faces" is the current working version of the BOT face list.

"v1" and "v2" are the indices into the BOT vertex list, they define the edge.

"max_chord_error" is the maximum distance allowed between the old surface and new.

"max_normal_error" is actually the minimum dot product allowed between old and new surface normals (cosine).

"min_edge_length_sq" is the square of the minimum allowed edge length.

any constraint value of -1.0 means ignore this constraint

returns 1 if edge can be eliminated without breaking constraints, 0 otherwise.

Definition at line 4088 of file bot.c.

References MAX_AFFECTED_FACES, bot_edge::next, SMALL_FASTF, bot_edge::use_count, and bot_edge::v.

Referenced by rt_bot_decimate().

int rt_bot_decimate ( struct rt_bot_internal *  bot,
fastf_t  max_chord_error,
fastf_t  max_normal_error,
fastf_t  min_edge_length 
)

routine to reduce the number of triangles in a BOT by edges decimation.

max_chord_error is the maximum error distance allowed max_normal_error is the maximum change in surface normal allowed

This and associated routines maintain a list of edges and their "use counts" A "free edge" is one with a use count of 1, most edges have a use count of 2 When a use count reaches zero, the edge is removed from the list. The list is used to direct the edge decimation process and to avoid deforming the shape of a non-volume enclosing BOT by keeping track of use counts (and thereby free edges) If a free edge would be moved, that decimation is not performed.

Definition at line 4267 of file bot.c.

References bu_free(), bu_log(), bu_malloc(), bu_realloc(), buildEdgeTable(), decimate_edge(), edge_can_be_decimated(), bot_edge::next, rt_bot_condense(), SMALL_FASTF, and bot_edge::v.

Referenced by ged_bot_decimate().

Here is the call graph for this function:

HIDDEN int bot_smooth_miss ( struct application ap)

Definition at line 4414 of file bot.c.

References RT_CK_APPLICATION.

Referenced by rt_bot_smooth().

int rt_bot_smooth ( struct rt_bot_internal *  bot,
const char *  bot_name,
struct db_i dbip,
fastf_t  norm_tol_angle 
)

Definition at line 4450 of file bot.c.

References application::a_hit, application::a_miss, application::a_ray, application::a_rt_i, application::a_uptr, application::a_user, bot_smooth_hit(), bot_smooth_miss(), bu_calloc(), bu_free(), bu_log(), M_PI, rt_i::mdl_max, rt_i::mdl_min, xray::r_dir, xray::r_min, xray::r_pt, RT_APPLICATION_INIT, rt_free_rti(), rt_gettree(), rt_in_rpp(), rt_new_rti(), rt_prep(), rt_shootray(), SQRT_SMALL_FASTF, VSETALL, X, Y, and Z.

Referenced by ged_bot_smooth().

Here is the call graph for this function:

int rt_bot_flip ( struct rt_bot_internal *  bot)

Definition at line 4632 of file bot.c.

Referenced by ged_bot_flip().

void rt_bot_sync_func ( struct rt_bot_internal *  bot,
struct tri_edges tep,
struct tri_edges headTep,
struct tri_edges usedTep 
)

Definition at line 4681 of file bot.c.

References bu_calloc(), bu_free(), BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_FOR, tri_edges::edge_1, tri_edges::edge_2, tri_edges::edge_3, tri_edges::l, and tri_edges::tri.

Referenced by rt_bot_sync().

Here is the call graph for this function:

int rt_bot_sync ( struct rt_bot_internal *  bot)

Definition at line 4781 of file bot.c.

References bu_calloc(), bu_free(), BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_INIT, BU_LIST_WHILE, tri_edges::edge_1, tri_edges::edge_2, tri_edges::edge_3, tri_edges::l, rt_bot_sync_func(), and tri_edges::tri.

Referenced by ged_bot_sync().

Here is the call graph for this function:

void rt_bot_split_func ( struct rt_bot_internal *  bot,
struct tri_pts tpp,
struct tri_pts headTpp,
struct tri_pts usedTpp 
)

Definition at line 4837 of file bot.c.

References tri_pts::a, tri_pts::b, bu_calloc(), bu_free(), BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_FOR, tri_pts::c, and tri_pts::l.

Referenced by rt_bot_split().

Here is the call graph for this function:

struct rt_bot_internal* rt_bot_create ( struct rt_bot_internal *  bot,
struct tri_pts newTpp 
)

Definition at line 4909 of file bot.c.

References tri_pts::a, tri_pts::b, BU_ALLOC, BU_BITSET, BU_BITTEST, bu_bitv_new(), bu_calloc(), bu_free(), BU_LIST_FOR, tri_pts::c, tri_pts::l, REMAP_BOT_VERTS, and tri_pts::tri.

Referenced by rt_bot_patches(), and rt_bot_split().

Here is the call graph for this function:

struct rt_bot_list* rt_bot_split ( struct rt_bot_internal *  bot)

Definition at line 4966 of file bot.c.

References tri_pts::a, tri_pts::b, BU_ALLOC, bu_calloc(), bu_free(), BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_INIT, BU_LIST_NON_EMPTY, BU_LIST_WHILE, tri_pts::c, tri_pts::l, rt_bot_create(), rt_bot_split_func(), and tri_pts::tri.

Referenced by ged_bot_split().

Here is the call graph for this function:

struct rt_bot_list* rt_bot_patches ( struct rt_bot_internal *  bot)

Definition at line 5037 of file bot.c.

References tri_pts::a, tri_pts::b, BU_ALLOC, bu_calloc(), bu_free(), BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_INIT, BU_LIST_NON_EMPTY, BU_LIST_WHILE, tri_pts::c, tri_pts::l, rt_bot_create(), and tri_pts::tri.

Here is the call graph for this function:

void rt_bot_list_free ( struct rt_bot_list *  headRblp,
int  fbflag 
)

Definition at line 5200 of file bot.c.

References bot_ifree2(), bu_free(), BU_LIST_DEQUEUE, and BU_LIST_WHILE.

Referenced by ged_bot_split().

Here is the call graph for this function:

void rt_bot_volume ( fastf_t volume,
const struct rt_db_internal ip 
)

Definition at line 5219 of file bot.c.

References poly_face::area, bn_mk_plane_3pts(), bn_polygon_area(), bn_polygon_sort_ccw(), BN_TOL_DIST, BN_TOL_INIT, BU_BITTEST, bu_calloc(), bu_free(), rt_db_internal::idb_ptr, poly_face::label, poly_face::npts, poly_face::plane_eqn, poly_face::pts, and UNLIKELY.

Here is the call graph for this function:

void rt_bot_surf_area ( fastf_t area,
const struct rt_db_internal ip 
)

Definition at line 5289 of file bot.c.

References bn_area_of_triangle(), bn_dist_pt3_pt3(), bu_calloc(), bu_free(), rt_db_internal::idb_ptr, X, Y, and Z.

Here is the call graph for this function:

int XGLUE ( rt_botface_w_normals_  ,
TRI_TYPE   
)

This function is called with pointers to 3 points, and is used to prepare BOT faces. ap, bp, cp point to vect_t points.

Returns 0 if the 3 points didn't form a plane (e.g., collinear, etc.). Returns # pts (3) if a valid plane resulted.

Definition at line 43 of file g_bot_include.c.

References bp, BU_GET, bu_log(), bu_malloc(), BU_PUT, DEBUG_SHOOT, bn_tol::dist_sq, NORM_TYPE, NORMAL_SCALE, RT_G_DEBUG, TRI_TYPE, and V3ARGS.

Referenced by XGLUE().

Here is the call graph for this function:

void XGLUE ( rt_bot_prep_pieces_  ,
TRI_TYPE   
)

Definition at line 125 of file g_bot_include.c.

References BU_BITTEST, bu_malloc(), bound_rpp::max, bound_rpp::min, rt_bot_tri_per_piece, SMALL_FASTF, soltab::st_max, soltab::st_min, soltab::st_npieces, soltab::st_piece_rpps, TRI_TYPE, X, XGLUE(), Y, and Z.

Here is the call graph for this function:

int XGLUE ( rt_bot_prep_  ,
TRI_TYPE   
)

Given a pointer to a GED database record, and a transformation matrix, determine if this is a valid BOT, and if so, precompute various terms of the formula.

Returns - 0 BOT is OK !0 Error in description

Implicit return - A struct bot_specific is created, and its address is stored in stp->st_specific for use by bot_shot().

Definition at line 240 of file g_bot_include.c.

References bu_bitv_dup(), bu_calloc(), BU_GET, bu_log(), bn_tol::dist, rt_bot_minpieces, rt_bot_prep_pieces(), rt_botface(), rt_botface_w_normals(), SMALL_FASTF, soltab::st_aradius, soltab::st_bradius, soltab::st_center, soltab::st_max, soltab::st_min, soltab::st_specific, TRI_TYPE, X, XGLUE(), Y, and Z.

Here is the call graph for this function:

HIDDEN int XGLUE ( rt_bot_makesegs_  ,
TRI_TYPE   
)

Given an array of hits, make segments out of them. Exactly how this is to be done depends on the mode of the BoT.

Definition at line 572 of file g_bot_include.c.

References application::a_ray, application::a_resource, application::a_rt_i, BOT_UNORIENTED_NORM, BU_ASSERT, BU_LIST_INSERT, bu_log(), directory::d_namep, bn_tol::dist, hit::hit_dist, hit::hit_private, hit::hit_vpriv, seg::l, MAXHITS, NEAR_ZERO, xray::r_dir, xray::r_pt, rt_bot_unoriented_segs(), RT_CK_SOLTAB, RT_GET_SEG, rt_htbl_get(), rt_i::rti_tol, seg::seg_in, seg::seg_out, seg::seg_stp, soltab::st_dp, soltab::st_specific, TRI_TYPE, V3ARGS, X, and XGLUE().

Here is the call graph for this function:

int XGLUE ( rt_bot_shot_  ,
TRI_TYPE   
)

Intersect a ray with a bot. If an intersection occurs, a struct seg will be acquired and filled in.

Notes for rt_bot_norm(): hit_private contains pointer to the tri_specific structure. hit_vpriv[X] contains dot product of ray direction and unit normal from tri_specific.

Returns - 0 MISS >0 HIT

Definition at line 1031 of file g_bot_include.c.

References application::a_ray, OSL::Strings::alpha, BOT_MIN_DN, bu_log(), if(), MAXHITS, xray::r_dir, xray::r_pt, rt_bot_makesegs(), RT_HIT_MAGIC, rt_hitsort(), soltab::st_aradius, soltab::st_specific, TRI_TYPE, X, XGLUE(), Y, and Z.

Here is the call graph for this function:

int XGLUE ( rt_bot_piece_shot_  ,
TRI_TYPE   
)

Intersect a ray with a list of "pieces" of a BoT.

This routine may be invoked many times for a single ray, as the ray traverses from one space partitioning cell to the next.

Plate-mode (2 hit) segments will be returned immediately in seghead.

Generally the hits are stashed between invocations in psp.

Definition at line 1131 of file g_bot_include.c.

References application::a_ray, application::a_resource, OSL::Strings::alpha, BOT_MIN_DN, BU_BITSET, BU_BITTEST, bu_log(), DEBUG_SHOOT, rt_htbl::end, hit::hit_dist, hit::hit_magic, hit::hit_private, hit::hit_rayp, hit::hit_surfno, hit::hit_vpriv, rt_htbl::hits, rt_piecestate::htab, rt_piecelist::npieces, rt_piecelist::pieces, xray::r_dir, xray::r_pt, resource::re_piece_ndup, rt_bot_makesegs(), RT_CK_APPLICATION, RT_CK_PIECELIST, RT_CK_PIECESTATE, RT_CK_RESOURCE, RT_CK_SOLTAB, RT_G_DEBUG, RT_HIT_MAGIC, rt_hitsort(), rt_htbl_get(), rt_piecestate::shot, soltab::st_aradius, soltab::st_specific, rt_piecestate::stp, rt_piecelist::stp, TRI_TYPE, X, XGLUE(), Y, and Z.

Here is the call graph for this function:

void XGLUE ( rt_bot_norm_  ,
TRI_TYPE   
)

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 1283 of file g_bot_include.c.

References hit::hit_dist, hit::hit_normal, hit::hit_point, hit::hit_private, hit::hit_vpriv, if(), ONE_OVER_SCALE, xray::r_dir, xray::r_pt, RT_CK_SOLTAB, TRI_TYPE, OSL::Strings::u, OSL::Strings::v, VSETALL, X, XGLUE(), Y, and Z.

Here is the call graph for this function:

void XGLUE ( rt_bot_free_  ,
TRI_TYPE   
)

Definition at line 1344 of file g_bot_include.c.

References bu_free(), BU_PUT, TRI_TYPE, and XGLUE().

Here is the call graph for this function:

int rt_cline_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

Calculate bounding RPP for cline

Definition at line 69 of file cline.c.

References rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, rt_cline_radius, top(), and VSETALL.

Referenced by rt_cline_prep().

Here is the call graph for this function:

int rt_cline_prep ( struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip 
)

Given a pointer to a GED database record, determine if this is a valid cline solid, and if so, precompute various terms of the formula.

Returns - 0 cline is OK !0 Error in description

Implicit return - A struct cline_specific is created, and its address is stored in stp->st_specific for use by rt_cline_shot().

Definition at line 114 of file cline.c.

References BU_GET, cline_specific::h, cline_specific::height, rt_db_internal::idb_ptr, cline_specific::radius, RT_CK_DB_INTERNAL, RT_CK_RTI, rt_cline_bbox(), rt_cline_radius, rt_i::rti_tol, soltab::st_aradius, soltab::st_bradius, soltab::st_max, soltab::st_min, soltab::st_specific, cline_specific::thickness, and cline_specific::V.

Here is the call graph for this function:

void rt_cline_print ( register const struct soltab stp)

Definition at line 150 of file cline.c.

References bu_log(), cline_specific::h, cline_specific::height, cline_specific::radius, soltab::st_specific, cline_specific::thickness, cline_specific::V, and VPRINT.

Here is the call graph for this function:

int rt_cline_shot ( struct soltab stp,
register struct xray rp,
struct application ap,
struct seg seghead 
)

Intersect a ray with a cline mode solid. If an intersection occurs, at least one struct seg will be acquired and filled in.

Returns - 0 MISS >0 HIT

Definition at line 175 of file cline.c.

References application::a_resource, bn_distsq_line3_line3(), BU_LIST_INIT, BU_LIST_INSERT, cline_specific::h, cline_specific::height, if(), seg::l, NEAR_ZERO, xray::r_dir, xray::r_pt, cline_specific::radius, RT_CK_APPLICATION, rt_cline_radius, RT_DOT_TOL, RT_GET_SEG, soltab::st_specific, cline_specific::thickness, and cline_specific::V.

Here is the call graph for this function:

void rt_cline_norm ( struct hit hitp,
struct soltab stp,
struct xray rp 
)

Given ONE ray distance, return the normal and entry/exit point.

Definition at line 351 of file cline.c.

References bu_bomb(), bu_log(), hit::hit_dist, hit::hit_normal, hit::hit_point, hit::hit_surfno, hit::hit_vpriv, xray::r_dir, xray::r_pt, RT_CK_HIT, and V3ARGS.

Here is the call graph for this function:

void rt_cline_curve ( struct curvature cvp,
struct hit hitp,
struct soltab stp 
)

Return the curvature of the cline.

Definition at line 387 of file cline.c.

References bn_vec_ortho(), curvature::crv_c1, curvature::crv_c2, curvature::crv_pdir, hit::hit_normal, RT_CK_HIT, and RT_CK_SOLTAB.

Here is the call graph for this function:

void rt_cline_uv ( struct application ap,
struct soltab stp,
struct hit hitp,
struct uvcoord uvp 
)

For a hit on the surface of an cline, return the (u, v) coordinates of the hit point, 0 <= u, v <= 1.

Definition at line 405 of file cline.c.

References RT_CK_APPLICATION, RT_CK_HIT, RT_CK_SOLTAB, uvcoord::uv_du, uvcoord::uv_dv, uvcoord::uv_u, and uvcoord::uv_v.

void rt_cline_free ( register struct soltab stp)

Definition at line 419 of file cline.c.

References BU_PUT, if(), RT_CK_SOLTAB, and soltab::st_specific.

Here is the call graph for this function:

int rt_cline_class ( const struct soltab stp,
const fastf_t min,
const fastf_t max,
const struct bn_tol tol 
)

Definition at line 431 of file cline.c.

References BN_CK_TOL, and RT_CK_SOLTAB.

int rt_cline_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol,
const struct rt_view_info info 
)

Definition at line 443 of file cline.c.

References bn_vec_ortho(), BN_VLIST_LINE_DRAW, BN_VLIST_LINE_MOVE, BU_CK_LIST_HEAD, rt_db_internal::idb_ptr, RT_ADD_VLIST, RT_CK_DB_INTERNAL, rt_ell_16pts(), and top().

Here is the call graph for this function:

int rt_cline_tess ( struct nmgregion **  r,
struct model *  m,
struct rt_db_internal ip,
const struct rt_tess_tol ttol,
const struct bn_tol tol 
)

Returns - -1 failure 0 OK. *r points to nmgregion that holds this tessellation.

Definition at line 534 of file cline.c.

References rt_tess_tol::abs, bn_vec_ortho(), bu_calloc(), bu_free(), BU_LIST_FIRST, bu_log(), BU_PTBL_END, bu_ptbl_free(), BU_PTBL_GET, bu_ptbl_init(), bu_ptbl_ins(), rt_db_internal::idb_ptr, nmg_calc_face_g(), nmg_cmface(), nmg_mrsv(), nmg_pr_fu_briefly(), nmg_region_a(), nmg_vertex_gv(), rt_tess_tol::norm, cline_vert::pt, rt_tess_tol::rel, RT_CK_DB_INTERNAL, s, top(), cline_vert::v, and OSL::Strings::v.

Here is the call graph for this function:

int rt_cline_import4 ( struct rt_db_internal ip,
const struct bu_external ep,
const fastf_t mat,
const struct db_i dbip 
)

Import an cline from the database format to the internal format. Apply modeling transformations as well.

Definition at line 801 of file cline.c.

References bn_mat_identity, BU_ALLOC, BU_CK_EXTERNAL, bu_cv_ntohd(), bu_log(), bu_external::ext_buf, ID_CLINE, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, if(), OBJ, RT_CK_DB_INTERNAL, RT_CK_DBI, and RT_CLINE_INTERNAL_MAGIC.

Here is the call graph for this function:

int rt_cline_export4 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

The name is added by the caller, in the usual place.

Definition at line 848 of file cline.c.

References bu_calloc(), BU_CK_EXTERNAL, bu_cv_htond(), bu_external::ext_buf, bu_external::ext_nbytes, ID_CLINE, rt_db_internal::idb_ptr, if(), RT_CK_DB_INTERNAL, and RT_CK_DBI.

Here is the call graph for this function:

int rt_cline_import5 ( struct rt_db_internal ip,
const struct bu_external ep,
register const fastf_t mat,
const struct db_i dbip 
)

Import an cline from the database format to the internal format. Apply modeling transformations as well.

Definition at line 890 of file cline.c.

References bn_mat_identity, BU_ALLOC, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_cv_ntohd(), bu_external::ext_buf, bu_external::ext_nbytes, ID_CLINE, rt_db_internal::idb_major_type, rt_db_internal::idb_meth, rt_db_internal::idb_ptr, OBJ, RT_CK_DB_INTERNAL, RT_CK_DBI, RT_CLINE_INTERNAL_MAGIC, and SIZEOF_NETWORK_DOUBLE.

Here is the call graph for this function:

int rt_cline_export5 ( struct bu_external ep,
const struct rt_db_internal ip,
double  local2mm,
const struct db_i dbip 
)

The name is added by the caller, in the usual place.

Definition at line 928 of file cline.c.

References BU_CK_EXTERNAL, bu_cv_htond(), bu_malloc(), bu_external::ext_buf, bu_external::ext_nbytes, ID_CLINE, rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, and SIZEOF_NETWORK_DOUBLE.

Here is the call graph for this function:

int rt_cline_describe ( struct bu_vls str,
const struct rt_db_internal ip,
int  verbose,
double  mm2local 
)

Make human-readable formatted presentation of this solid. First line describes type of solid. Additional lines are indented one tab, and give parameter values.

Definition at line 964 of file cline.c.

References bu_vls_strcat(), and rt_db_internal::idb_ptr.

Here is the call graph for this function:

void rt_cline_ifree ( struct rt_db_internal ip)

Free the storage associated with the rt_db_internal version of this solid.

Definition at line 999 of file cline.c.

References bu_free(), rt_db_internal::idb_ptr, and RT_CK_DB_INTERNAL.

Here is the call graph for this function:

int rt_cline_get ( struct bu_vls logstr,
const struct rt_db_internal intern,
const char *  attr 
)

Definition at line 1015 of file cline.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_vls_printf(), bu_vls_strcat(), bu_vls_strcpy(), rt_db_internal::idb_ptr, and V3ARGS.

Here is the call graph for this function:

int rt_cline_adjust ( struct bu_vls logstr,
struct rt_db_internal intern,
int  argc,
const char **  argv 
)

Definition at line 1045 of file cline.c.

References BRLCAD_ERROR, brlcad_interp, BRLCAD_OK, bu_vls_printf(), rt_db_internal::idb_ptr, RT_CK_DB_INTERNAL, and tcl_list_to_fastf_array().

Here is the call graph for this function:

int rt_cline_form ( struct bu_vls logstr,
const struct rt_functab ftp 
)

Definition at line 1085 of file cline.c.

References BRLCAD_OK, bu_vls_printf(), and RT_CK_FUNCTAB.

Here is the call graph for this function:

int rt_cline_params ( struct pc_pc_set ps,
const struct rt_db_internal ip 
)

Definition at line 1098 of file cline.c.

References RT_CK_DB_INTERNAL.

int rt_cline_to_pipe ( struct rt_pipe_internal *  pipep,
const struct rt_db_internal ip 
)
int rt_retrieve_binunif ( struct rt_db_internal intern,
const struct db_i dbip,
const char *  name 
)

Referenced by get_obj_data().

HIDDEN void hook_mtos_from_stom ( const struct bu_structparse sp,
const char *  sp_name,
void *  base,
const char *  p,
void *  data 
)

This function computes the DSP mtos matrix from the stom matrix whenever the stom matrix is parsed using a bu_structparse.

Definition at line 218 of file dsp.c.

References bn_mat_inv().

Here is the call graph for this function:

HIDDEN void hook_file ( const struct bu_structparse sp,
const char *  sp_name,
void *  base,
const char *  p,
void *  data 
)

Definition at line 236 of file dsp.c.

HIDDEN void plot_rpp ( FILE *  fp,
struct bound_rpp rpp,
int  r,
int  g,
int  b 
)

Plot an RPP to a file in the given color

Definition at line 290 of file dsp.c.

References bound_rpp::max, bound_rpp::min, pd_3cont(), pd_3move(), pl_color(), X, Y, and Z.

Referenced by plot_dsp_bb(), and plot_seg().

Here is the call graph for this function:

HIDDEN void plot_dsp_bb ( FILE *  fp,
struct dsp_bb dsp_bb,
struct dsp_specific dsp,
int  r,
int  g,
int  b,
int  blather 
)

Plot a dsp_bb structure

Definition at line 312 of file dsp.c.

References bu_log(), DSP_BB_CK, dsp_specific::dsp_i, dsp_rpp::dsp_max, dsp_rpp::dsp_min, dsp_bb::dspb_rpp, bound_rpp::max, bound_rpp::min, plot_rpp(), and V3ARGS.

Referenced by draw_dsp_bb(), plot_cell_top(), and plot_layers().

Here is the call graph for this function:

HIDDEN FILE* draw_dsp_bb ( int *  plotnum,
struct dsp_bb dsp_bb,
struct dsp_specific dsp,
int  r,
int  g,
int  b 
)

Definition at line 340 of file dsp.c.

References bu_bomb(), bu_log(), dsp_rpp::dsp_min, dsp_bb::dspb_rpp, plot_dsp_bb(), and Z.

Referenced by isect_ray_dsp_bb().

Here is the call graph for this function:

HIDDEN void plot_layers ( struct dsp_specific dsp_sp)

Plot the bounding box layers for a dsp

Definition at line 372 of file dsp.c.

References bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), dsp_bb_layer::dim, dsp_specific::layer, dsp_specific::layers, dsp_bb_layer::p, plot_dsp_bb(), X, and Y.

Referenced by dsp_layers().

Here is the call graph for this function:

HIDDEN void plot_cell_top ( struct isect_stuff isect,
struct dsp_bb dsp_bb,
point_t  A,
point_t  B,
point_t  C,
point_t  D,
struct hit  hitlist[],
int  hitflags,
int  style 
)

Plot the results of intersecting a ray with the top of a cell

Definition at line 428 of file dsp.c.

References bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), isect_stuff::dsp, DSP_BB_CK, dsp_specific::dsp_i, pdv_3cont(), pdv_3move(), pl_color(), and plot_dsp_bb().

Referenced by isect_ray_cell_top().

Here is the call graph for this function:

HIDDEN void dsp_print_v4 ( struct bu_vls vls,
const struct rt_dsp_internal *  dsp_ip 
)

Definition at line 516 of file dsp.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_printf(), OSL::Strings::v, and VSETALL.

Referenced by rt_dsp_describe(), and rt_dsp_print().

Here is the call graph for this function:

HIDDEN void dsp_print_v5 ( struct bu_vls vls,
const struct rt_dsp_internal *  dsp_ip 
)

Definition at line 551 of file dsp.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_printf(), OSL::Strings::v, and VSETALL.

Referenced by rt_dsp_describe(), and rt_dsp_print().

Here is the call graph for this function:

void rt_dsp_print ( register const struct soltab stp)

Definition at line 614 of file dsp.c.

References BU_CK_VLS, bu_log(), bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, BU_VLS_IS_INITIALIZED, bu_vls_printf(), db_version(), dsp_specific::dsp_i, dsp_print_v4(), dsp_print_v5(), rt_i::rti_dbip, soltab::st_rtip, and soltab::st_specific.

Here is the call graph for this function:

HIDDEN void dsp_layers ( struct dsp_specific dsp,
unsigned short *  d_min,
unsigned short *  d_max 
)

compute bounding boxes for each cell, then compute bounding boxes for collections of bounding boxes

Definition at line 650 of file dsp.c.

References dsp_specific::bb_array, bu_log(), bu_malloc(), DEBUG_HF, dsp_bb_layer::dim, DIM_BB_CHILDREN, DSP, dsp_specific::dsp_i, dsp_rpp::dsp_max, dsp_rpp::dsp_min, dsp_bb::dspb_ch_dim, dsp_bb::dspb_children, dsp_bb::dspb_rpp, dsp_bb::dspb_subcell_size, dsp_specific::layer, dsp_specific::layers, dsp_bb::magic, MAGIC_dsp_bb, NUM_BB_CHILDREN, dsp_bb_layer::p, plot_layers(), RT_G_DEBUG, VSET, X, XCNT, XSIZ, dsp_specific::xsiz, Y, YCNT, YSIZ, and dsp_specific::ysiz.

Referenced by rt_dsp_bbox(), and rt_dsp_prep().

Here is the call graph for this function:

int rt_dsp_bbox ( struct rt_db_internal ip,
point_t *  min,
point_t *  max,
const struct bn_tol tol 
)

Calculate the bounding box for a dsp.

Definition at line 862 of file dsp.c.

References BBOX_PT, BU_CK_MAPPED_FILE, BU_CK_VLS, bu_close_mapped_file(), bu_free(), bu_log(), bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_addr(), dsp_specific::dsp_i, dsp_layers(), dsp_specific::dsp_pl_dist, rt_db_internal::idb_ptr, memset(), RT_CK_BINUNIF, RT_CK_DB_INTERNAL, RT_SEM_MODEL, VSETALL, XMAX, XMIN, dsp_specific::xsiz, YMAX, YMIN, dsp_specific::ysiz, ZMAX, ZMID, and ZMIN.

Here is the call graph for this function:

int rt_dsp_prep ( struct soltab stp,
struct rt_db_internal ip,
struct rt_i rtip 
)

Given a pointer to a GED database record, and a transformation matrix, determine if this is a valid DSP, and if so, precompute various terms of the formula.

Returns - 0 DSP is OK !0 Error in description

Implicit return - A struct dsp_specific is created, and its address is stored in stp->st_specific for use by dsp_shot().

Note: because the stand-along bbox calculation requires much of the prep logic, the in-prep bbox calculations are left in to avoid duplication rather than calling rt_dsp_bbox.

Definition at line 982 of file dsp.c.

References BBOX_PT, BU_CK_MAPPED_FILE, BU_CK_VLS, BU_GET, bu_log(), bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_addr(), DEBUG_HF, dsp_specific::dsp_i, dsp_layers(), dsp_specific::dsp_pl_dist, rt_db_internal::idb_ptr, RT_CK_BINUNIF, RT_CK_DB_INTERNAL, RT_CK_RTI, RT_G_DEBUG, RT_SEM_MODEL, soltab::st_aradius, soltab::st_bradius, soltab::st_center, soltab::st_max, soltab::st_min, soltab::st_specific, V3ARGS, X, XMAX, XMIN, dsp_specific::xsiz, Y, YMAX, YMIN, dsp_specific::ysiz, Z, ZMAX, ZMID, and ZMIN.

Here is the call graph for this function:

HIDDEN void plot_seg ( struct isect_stuff isect,
struct hit in_hit,
struct hit out_hit,
const point_t  bbmin,
const point_t  bbmax,
int  r,
int  g,
int  b 
)

Definition at line 1096 of file dsp.c.

References bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), isect_stuff::dsp, dsp_specific::dsp_i, hit::hit_point, bound_rpp::max, bound_rpp::min, pdv_3line(), pl_color(), and plot_rpp().

Referenced by add_seg().

Here is the call graph for this function:

HIDDEN int add_seg ( struct isect_stuff isect,
struct hit in_hit,
struct hit out_hit,
const point_t  bbmin,
const point_t  bbmax,
int  r,
int  g,
int  b 
)

Add a segment to the list of intersections in DSP space

Return: 0 continue to intersect 1 All intersections computed, terminate intersection processing

Definition at line 1144 of file dsp.c.

References application::a_onehit, application::a_resource, application::a_x, application::a_y, isect_stuff::ap, bu_bomb(), BU_LIST_FOR, BU_LIST_INSERT, BU_LIST_LAST, BU_LIST_NON_EMPTY, bu_log(), DEBUG_HF, delta, bn_tol::dist, dlog, hit::hit_dist, hit::hit_magic, hit::hit_normal, hit::hit_point, hit::hit_surfno, hit::hit_vpriv, seg::l, NEAR_ZERO, isect_stuff::num_segs, plot_seg(), isect_stuff::r, xray::r_dir, RT_G_DEBUG, RT_GET_SEG, RT_HIT_MAGIC, seg::seg_in, seg::seg_out, seg::seg_stp, isect_stuff::seglist, isect_stuff::stp, isect_stuff::tol, V3ARGS, VPRINT, X, Y, Z, ZERO, ZMAX, and ZTOP.

Referenced by isect_ray_cell_top(), and isect_ray_dsp_bb().

Here is the call graph for this function:

HIDDEN int isect_ray_triangle ( struct isect_stuff isect,
point_t  A,
point_t  B,
point_t  C,
struct hit hitp,
fastf_t  alphabbeta[] 
)

Side Effects: dist and P may be set

Return: 1 Ray intersects triangle 0 Ray misses triangle -1 Ray/plane parallel

Definition at line 1319 of file dsp.c.

References OSL::Strings::alpha, BN_VECT_ARE_PERP, bu_bomb(), bu_log(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), DEBUG_HF, bn_tol::dist, dlog, isect_stuff::dsp, dsp_specific::dsp_i, hit::hit_dist, hit::hit_normal, hit::hit_point, N, OSL::Strings::P, pdv_3cont(), pdv_3line(), pdv_3move(), pl_color(), isect_stuff::r, xray::r_dir, xray::r_pt, RT_G_DEBUG, isect_stuff::tol, V3ARGS, VPRINT, X, Y, and ZERO.

Referenced by isect_ray_cell_top().

Here is the call graph for this function:

HIDDEN int permute_cell ( point_t  A,
point_t  B,
point_t  C,
point_t  D,
struct dsp_specific dsp,
struct dsp_rpp dsp_rpp 
)

For adaptive diagonal selection or for Upper-Left to lower right cell cut, we must permute the vertices of the cell before handing them to the intersection algorithm. That's what this function does.

Definition at line 1515 of file dsp.c.

References bu_bomb(), bu_log(), DEBUG_HF, DSP, dsp_specific::dsp_i, dsp_rpp::dsp_max, dsp_rpp::dsp_min, RT_G_DEBUG, VPRINT, VSET, X, dsp_specific::xsiz, Y, dsp_specific::ysiz, and Z.

Referenced by isect_ray_cell_top().

Here is the call graph for this function:

HIDDEN int check_bbpt_hit_elev ( int  i,
point_t  A,
point_t  B,
point_t  C,
point_t  D,
point_t  P 
)

determine if a point P is above/below the slope line on the bounding box. e.g.:

Bounding box side view:

 +-------+
 |  |
 |  *       Determine if P (or Q) is above the
 |      /|  diagonal from the two * points at the corners
 | P.  /    |       of the bounding box.
 |    /     |
 |   /      |
 |  /  .    |
 | /   Q    |
 |/ |
 *  |
 |  |
 +-------+

Return 0 if pt above line (such as P in diagram) 1 if pt at/below line (such as Q in diagram)

Definition at line 1680 of file dsp.c.

References bu_bomb(), bu_log(), delta, dlog, X, XMAX, XMIN, Y, YMAX, YMIN, Z, ZMAX, and ZMIN.

Referenced by isect_ray_cell_top().

Here is the call graph for this function:

HIDDEN int isect_ray_cell_top ( struct isect_stuff isect,
struct dsp_bb dsp_bb 
)
int dsp_in_rpp ( struct isect_stuff isect,
register const fastf_t min,
register const fastf_t max 
)

Compute the intersections of a ray with a rectangular parallelepiped (RPP) that has faces parallel to the coordinate planes

The algorithm here was developed by Gary Kuehl for GIFT. A good description of the approach used can be found in "??" by XYZZY and Barsky, ACM Transactions on Graphics, Vol 3 No 1, January 1984.

Note - The computation of entry and exit distance is mandatory, as the final test catches the majority of misses.

Note - A hit is returned if the intersect is behind the start point.

Returns - 0 if ray does not hit RPP, !0 if ray hits RPP.

Implicit return - rp->r_min = dist from start of ray to point at which ray ENTERS solid rp->r_max = dist from start of ray to point at which ray LEAVES solid isect->dmin isect->dmax

Definition at line 2057 of file dsp.c.

References isect_stuff::dmax, isect_stuff::dmin, isect_stuff::inv_dir, isect_stuff::r, xray::r_max, xray::r_min, xray::r_pt, XMAX, XMIN, YMAX, YMIN, ZMAX, and ZMIN.

Referenced by isect_ray_dsp_bb().

HIDDEN int isect_ray_dsp_bb ( struct isect_stuff isect,
struct dsp_bb dsp_bb 
)

Intersect a ray with a DSP bounding box. This is the primary child of rt_dsp_shot()

Return 0 continue intersection calculations 1 Terminate intersection computation

Definition at line 2350 of file dsp.c.

References application::a_x, application::a_y, add_seg(), isect_stuff::ap, bu_bomb(), bu_log(), bu_log_indent_delta(), DEBUG_HF, isect_stuff::dmax, isect_stuff::dmin, draw_dsp_bb(), isect_stuff::dsp, DSP_BB_CK, dsp_specific::dsp_i, dsp_in_rpp(), dsp_rpp::dsp_max, dsp_rpp::dsp_min, dsp_bb::dspb_ch_dim, dsp_bb::dspb_children, dsp_bb::dspb_rpp, hit::hit_dist, hit::hit_magic, hit::hit_normal, hit::hit_point, hit::hit_surfno, hit::hit_vpriv, isect_ray_cell_top(), pdv_3cont(), pdv_3move(), pl_color(), isect_stuff::r, xray::r_dir, xray::r_max, xray::r_min, xray::r_pt, recurse_dsp_bb(), RT_G_DEBUG, RT_HIT_MAGIC, V3ARGS, VSET, VSETALL, X, Y, and Z.

Referenced by recurse_dsp_bb(), and rt_dsp_shot().

Here is the call graph for this function:

HIDDEN int recurse_dsp_bb ( struct isect_stuff isect,
struct dsp_bb dsp_bb,
point_t  minpt,
point_t  maxpt,
point_t  bbmin,
point_t  bbmax 
)

Return 0 continue intersection calculations 1 Terminate intersection computation

Definition at line 2185 of file dsp.c.

References bu_log(), bu_log_indent_delta(), cs, DEBUG_HF, bn_tol::dist, dlog, isect_stuff::dsp, DSP_BB_CK, dsp_specific::dsp_i,