Thread: [brlcad-commits] SF.net SVN: brlcad:[37099] brlcad/trunk/src/librt/primitives (Page 2)
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2010-01-02 14:11:08
|
Revision: 37099 http://brlcad.svn.sourceforge.net/brlcad/?rev=37099&view=rev Author: brlcad Date: 2010-01-02 14:10:55 +0000 (Sat, 02 Jan 2010) Log Message: ----------- more warnings being quelled. unused params/vars and extra checks. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/revolve/revolve.c brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp brlcad/trunk/src/librt/primitives/rpc/rpc.c Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2010-01-02 13:38:38 UTC (rev 37098) +++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2010-01-02 14:10:55 UTC (rev 37099) @@ -50,6 +50,12 @@ #define MAX_HITS 64 + +/* some sketch routines called here */ +extern int rt_sketch_contains(struct rt_sketch_internal *, point2d_t); +extern void rt_sketch_bounds(struct rt_sketch_internal *, fastf_t *); + + /** * R T _ R E V O L V E _ P R E P * @@ -69,15 +75,14 @@ rt_revolve_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { struct rt_revolve_internal *rip; - register struct revolve_specific *rev; - const struct bn_tol *tol = &rtip->rti_tol; + struct revolve_specific *rev; vect_t xEnd, yEnd; int *endcount; - int nseg, degree, i, j, k, nends; + int nseg, i, j, k; - fastf_t bounds[4]; /* { XMIN, XMAX, YMIN, YMAX } */ + if (rtip) RT_CK_RTI(rtip); RT_CK_DB_INTERNAL(ip); rip = (struct rt_revolve_internal *)ip->idb_ptr; @@ -202,7 +207,7 @@ void rt_revolve_print(const struct soltab *stp) { - register const struct revolve_specific *rev = + const struct revolve_specific *rev = (struct revolve_specific *)stp->st_specific; VPRINT("V", rev->v3d); @@ -227,32 +232,28 @@ int rt_revolve_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct revolve_specific *rev = + struct revolve_specific *rev = (struct revolve_specific *)stp->st_specific; - register struct seg *segp; - const struct bn_tol *tol = &ap->a_rt_i->rti_tol; + struct seg *segp; - register struct hit *hitp; + struct hit *hitp; struct hit *hits[MAX_HITS], hit[MAX_HITS]; int i, j, nseg, nhits, in, out; fastf_t k, m, h, aa, bb; point_t dp, pr, xlated; - vect_t vr, ur, norm, temp, normS, normE; + vect_t vr, ur, norm, normS, normE; - fastf_t start, end, min, max, angle; + fastf_t start, end, angle; vect_t dir; point_t hit1, hit2; - point2d_t hit2d, pt1, pt2, dist; - fastf_t a, b, c, disc, k1, k2, t1, t2, x, y; - fastf_t xmin, xmax, ymin, ymax; + point2d_t hit2d, pt1, pt2; + fastf_t a, b, c, disc, k1, k2, t1, t2; long *lng; struct line_seg *lsg; struct carc_seg *csg; - struct nurb_seg *nsg; - struct bezier_seg *bsg; nhits = 0; @@ -721,21 +722,21 @@ V2SUB2(radius, rev->sk->verts[csg->start], center); crsq = MAG2SQ(radius); } else { - point_t start, end, mid; + point_t startpt, endpt, midpt; vect_t s_to_m; vect_t bisector; vect_t vertical; - fastf_t dist; + fastf_t distance; fastf_t magsq_s2m; VSET(vertical, 0, 0, 1); - VMOVE(start, rev->sk->verts[csg->start]); - start[Z] = 0.0; - VMOVE(end, rev->sk->verts[csg->end]); - end[Z] = 0.0; + VMOVE(startpt, rev->sk->verts[csg->start]); + startpt[Z] = 0.0; + VMOVE(endpt, rev->sk->verts[csg->end]); + endpt[Z] = 0.0; - VBLEND2(mid, 0.5, start, 0.5, end); - VSUB2(s_to_m, mid, start); + VBLEND2(midpt, 0.5, startpt, 0.5, endpt); + VSUB2(s_to_m, midpt, startpt); VCROSS(bisector, vertical, s_to_m); VUNITIZE(bisector); magsq_s2m = MAGSQ(s_to_m); @@ -752,13 +753,13 @@ return(-1); } } - dist = sqrt(csg->radius*csg->radius - magsq_s2m); + distance = sqrt(csg->radius*csg->radius - magsq_s2m); /* save arc center */ if (csg->center_is_left) { - VJOIN1(center, mid, dist, bisector); + VJOIN1(center, midpt, distance, bisector); } else { - VJOIN1(center, mid, -dist, bisector); + VJOIN1(center, midpt, -distance, bisector); } } @@ -876,10 +877,9 @@ void rt_revolve_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { - register struct revolve_specific *rev = + struct revolve_specific *rev = (struct revolve_specific *)stp->st_specific; - vect_t n, nT, xv, yv; - fastf_t angle; + vect_t n, nT; VJOIN1(hitp->hit_point, rp->r_pt, hitp->hit_dist, rp->r_dir); @@ -950,8 +950,10 @@ void rt_revolve_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { - register struct revolve_specific *revolve = - (struct revolve_specific *)stp->st_specific; + if (!cvp || !hitp) + return; + RT_CK_HIT(hitp); + if (stp) RT_CK_SOLTAB(stp); cvp->crv_c1 = cvp->crv_c2 = 0; @@ -971,8 +973,7 @@ void rt_revolve_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { - register struct revolve_specific *rev = - (struct revolve_specific *)stp->st_specific; + struct revolve_specific *rev = (struct revolve_specific *)stp->st_specific; point_t hitpoint; fastf_t angle; @@ -982,6 +983,8 @@ struct nurb_seg *nsg; struct bezier_seg *bsg; + if (ap) RT_CK_APPLICATION(ap); + VJOIN1(hitpoint, hitp->hit_rayp->r_pt, hitp->hit_dist, hitp->hit_rayp->r_dir); switch (hitp->hit_surfno) { @@ -1062,7 +1065,7 @@ void rt_revolve_free(struct soltab *stp) { - register struct revolve_specific *revolve = + struct revolve_specific *revolve = (struct revolve_specific *)stp->st_specific; bu_free(revolve->ends, "endcount"); bu_free((char *)revolve, "revolve_specific"); @@ -1073,7 +1076,7 @@ * R T _ R E V O L V E _ C L A S S */ int -rt_revolve_class(const struct soltab *stp, const vect_t min, const vect_t max, const struct bn_tol *tol) +rt_revolve_class() { return 0; } @@ -1083,7 +1086,7 @@ * R T _ R E V O L V E _ P L O T */ int -rt_revolve_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_revolve_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol __attribute__((unused))) { struct rt_revolve_internal *rip; @@ -1302,14 +1305,17 @@ * 0 OK. *r points to nmgregion that holds this tessellation. */ int -rt_revolve_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_revolve_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol __attribute((unused)), const struct bn_tol *tol __attribute((unused))) { struct rt_revolve_internal *rip; + if (r) NMG_CK_REGION(*r); + if (m) NMG_CK_MODEL(m); + rip = (struct rt_revolve_internal *)ip->idb_ptr; RT_REVOLVE_CK_MAGIC(rip); - return(-1); + return -1; } @@ -1333,9 +1339,11 @@ struct directory *dp; struct rt_db_internal tmp_ip; - RT_CK_DB_INTERNAL(ip) - BU_CK_EXTERNAL(ep); + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); + BU_CK_EXTERNAL(ep); + /* set up the internal structure */ ip->idb_major_type = DB5_MAJORTYPE_BRLCAD; ip->idb_type = ID_REVOLVE; @@ -1400,6 +1408,8 @@ fastf_t vec[ELEMENTS_PER_VECT*3 + 1]; unsigned char *ptr; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_REVOLVE) return(-1); rip = (struct rt_revolve_internal *)ip->idb_ptr; @@ -1439,13 +1449,16 @@ int rt_revolve_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_revolve_internal *rip = + struct rt_revolve_internal *rip = (struct rt_revolve_internal *)ip->idb_ptr; char buf[256]; RT_REVOLVE_CK_MAGIC(rip); bu_vls_strcat(str, "truncated general revolve (REVOLVE)\n"); + if (!verbose) + return 0; + sprintf(buf, "\tV (%g, %g, %g)\n", INTCLAMP(rip->v3d[X] * mm2local), INTCLAMP(rip->v3d[Y] * mm2local), @@ -1471,7 +1484,7 @@ bu_vls_strcat(str, buf); bu_vls_vlscat(str, &rip->sketch_name); - return(0); + return 0; } @@ -1484,7 +1497,7 @@ void rt_revolve_ifree(struct rt_db_internal *ip) { - register struct rt_revolve_internal *revolve_ip; + struct rt_revolve_internal *revolve_ip; RT_CK_DB_INTERNAL(ip); @@ -1502,19 +1515,6 @@ } -/** - * R T _ R E V O L V E _ X F O R M - * - * Create transformed version of internal form. Free *ip if - * requested. Implement this if it's faster than doing an - * export/import4 cycle. - */ -int -rt_revolve_xform(struct rt_db_internal *op, const mat_t mat, struct rt_db_internal *ip, int free) -{ -} - - /* * Local Variables: * mode: C Modified: brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp 2010-01-02 13:38:38 UTC (rev 37098) +++ brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp 2010-01-02 14:10:55 UTC (rev 37099) @@ -36,9 +36,6 @@ void FindLoops(ON_Brep **b, const ON_Line* revaxis) { - ON_TextLog dump_to_stdout; - ON_TextLog* dump = &dump_to_stdout; - ON_3dPoint ptmatch, ptterminate, pstart, pend; int *curvearray; @@ -49,9 +46,6 @@ ON_SimpleArray<ON_Curve *> allsegments; ON_SimpleArray<ON_Curve *> loopsegments; int loop_complete; - int orientation; - int current_loop = 0; - int current_segment; for (int i = 0; i < (*b)->m_C3.Count(); i++) { allsegments.Append((*b)->m_C3[i]); } @@ -73,7 +67,6 @@ loop_complete = 0; while ((loop_complete != 1) && (allcurvesassigned != 1)) { curvearray[curvecount] = loopcount; - ON_Curve *currentcurve = allsegments[curvecount]; ptmatch = (*b)->m_C3[curvecount]->PointAtEnd(); ptterminate = (*b)->m_C3[curvecount]->PointAtStart(); for (int i = 0; i < allsegments.Count(); i++) { @@ -158,7 +151,7 @@ * R T _ R E V O L V E _ B R E P */ extern "C" void -rt_revolve_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) +rt_revolve_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol __attribute__((unused))) { struct rt_db_internal *tmp_internal = (struct rt_db_internal *) bu_malloc(sizeof(struct rt_db_internal), "allocate structure"); RT_INIT_DB_INTERNAL(tmp_internal); @@ -172,12 +165,11 @@ *b = ON_Brep::New(); - ON_TextLog dump_to_stdout; - ON_TextLog* dump = &dump_to_stdout; - ON_3dPoint plane_origin; ON_3dVector plane_x_dir, plane_y_dir; + ON_TextLog dump_to_stdout; + ON_TextLog* dump = &dump_to_stdout; // Find plane in 3 space corresponding to the sketch. @@ -227,16 +219,14 @@ } else { // need to calculated 3rd point on arc - look to sketch.c around line 581 for // logic - ON_Arc* c3darc = new ON_Arc(); - ON_Curve* c3d = new ON_ArcCurve(); } break; case CURVE_BEZIER_MAGIC: bsg = (struct bezier_seg *)lng; { ON_3dPointArray *bezpoints = new ON_3dPointArray(bsg->degree + 1); - for (int i = 0; i < bsg->degree + 1; i++) { - bezpoints->Append((*b)->m_V[bsg->ctl_points[i]].Point()); + for (int j = 0; j < bsg->degree + 1; j++) { + bezpoints->Append((*b)->m_V[bsg->ctl_points[j]].Point()); } ON_BezierCurve* bez3d = new ON_BezierCurve((const ON_3dPointArray)*bezpoints); ON_NurbsCurve* beznurb3d = ON_NurbsCurve::New(); Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2010-01-02 13:38:38 UTC (rev 37098) +++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2010-01-02 14:10:55 UTC (rev 37099) @@ -220,7 +220,7 @@ rt_rhc_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { struct rt_rhc_internal *xip; - register struct rhc_specific *rhc; + struct rhc_specific *rhc; fastf_t magsq_b, magsq_h, magsq_r; fastf_t mag_b, mag_h, mag_r; fastf_t f; @@ -318,9 +318,9 @@ * R T _ R H C _ P R I N T */ void -rt_rhc_print(register const struct soltab *stp) +rt_rhc_print(const struct soltab *stp) { - register const struct rhc_specific *rhc = + const struct rhc_specific *rhc = (struct rhc_specific *)stp->st_specific; VPRINT("V", rhc->rhc_V); @@ -350,9 +350,9 @@ * >0 HIT */ int -rt_rhc_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_rhc_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct rhc_specific *rhc = + struct rhc_specific *rhc = (struct rhc_specific *)stp->st_specific; vect_t dprime; /* D' */ vect_t pprime; /* P' */ @@ -360,7 +360,7 @@ fastf_t x; vect_t xlated; /* translated vector */ struct hit hits[3]; /* 2 potential hit points */ - register struct hit *hitp; /* pointer to hit point */ + struct hit *hitp; /* pointer to hit point */ hitp = &hits[0]; @@ -492,7 +492,7 @@ if (hits[0].hit_dist < hits[1].hit_dist) { /* entry is [0], exit is [1] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -501,7 +501,7 @@ BU_LIST_INSERT(&(seghead->l), &(segp->l)); } else { /* entry is [1], exit is [0] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -519,11 +519,11 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_rhc_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_rhc_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { fastf_t c; vect_t can_normal; /* normal to canonical rhc */ - register struct rhc_specific *rhc = + struct rhc_specific *rhc = (struct rhc_specific *)stp->st_specific; VJOIN1(hitp->hit_point, rp->r_pt, hitp->hit_dist, rp->r_dir); @@ -559,11 +559,11 @@ * Return the curvature of the rhc. */ void -rt_rhc_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_rhc_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { fastf_t b, c, rsq, y; fastf_t zp1_sq, zp2; /* 1st deriv sqr, 2nd deriv */ - register struct rhc_specific *rhc = + struct rhc_specific *rhc = (struct rhc_specific *)stp->st_specific; switch (hitp->hit_surfno) { @@ -601,15 +601,16 @@ * v = elevation */ void -rt_rhc_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_rhc_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { - register struct rhc_specific *rhc = - (struct rhc_specific *)stp->st_specific; + struct rhc_specific *rhc = (struct rhc_specific *)stp->st_specific; vect_t work; vect_t pprime; fastf_t len; + if (ap) RT_CK_APPLICATION(ap); + /* * hit_point is on surface; project back to unit rhc, * creating a vector from vertex to hit point. @@ -646,9 +647,9 @@ * R T _ R H C _ F R E E */ void -rt_rhc_free(register struct soltab *stp) +rt_rhc_free(struct soltab *stp) { - register struct rhc_specific *rhc = + struct rhc_specific *rhc = (struct rhc_specific *)stp->st_specific; bu_free((char *)rhc, "rhc_specific"); @@ -669,7 +670,7 @@ * R T _ R H C _ P L O T */ int -rt_rhc_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_rhc_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol __attribute__((unused))) { int i, n; fastf_t b, c, *back, f, *front, h, rh; @@ -1167,11 +1168,13 @@ * Apply modeling transformations as well. */ int -rt_rhc_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_rhc_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_rhc_internal *xip; union record *rp; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); rp = (union record *)ep->ext_buf; /* Check record type */ @@ -1217,6 +1220,8 @@ struct rt_rhc_internal *xip; union record *rhc; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_RHC) return(-1); xip = (struct rt_rhc_internal *)ip->idb_ptr; @@ -1269,13 +1274,14 @@ * Apply modeling transformations as well. */ int -rt_rhc_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_rhc_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_rhc_internal *xip; fastf_t vec[11]; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); - BU_ASSERT_LONG(ep->ext_nbytes, ==, SIZEOF_NETWORK_DOUBLE * 11); RT_CK_DB_INTERNAL(ip); @@ -1319,6 +1325,8 @@ struct rt_rhc_internal *xip; fastf_t vec[11]; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_RHC) return(-1); xip = (struct rt_rhc_internal *)ip->idb_ptr; @@ -1373,13 +1381,16 @@ int rt_rhc_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_rhc_internal *xip = + struct rt_rhc_internal *xip = (struct rt_rhc_internal *)ip->idb_ptr; char buf[256]; RT_RHC_CK_MAGIC(xip); bu_vls_strcat(str, "Right Hyperbolic Cylinder (RHC)\n"); + if (!verbose) + return 0; + sprintf(buf, "\tV (%g, %g, %g)\n", INTCLAMP(xip->rhc_V[X] * mm2local), INTCLAMP(xip->rhc_V[Y] * mm2local), @@ -1406,7 +1417,7 @@ sprintf(buf, "\tc=%g\n", INTCLAMP(xip->rhc_c * mm2local)); bu_vls_strcat(str, buf); - return(0); + return 0; } @@ -1418,7 +1429,7 @@ void rt_rhc_ifree(struct rt_db_internal *ip) { - register struct rt_rhc_internal *xip; + struct rt_rhc_internal *xip; RT_CK_DB_INTERNAL(ip); @@ -1436,8 +1447,11 @@ * */ int -rt_rhc_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_rhc_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } Modified: brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp 2010-01-02 13:38:38 UTC (rev 37098) +++ brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp 2010-01-02 14:10:55 UTC (rev 37099) @@ -34,7 +34,7 @@ * R T _ R H C _ B R E P */ extern "C" void -rt_rhc_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) +rt_rhc_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol __attribute__((unused))) { struct rt_rhc_internal *eip; @@ -47,14 +47,14 @@ ON_TextLog dump_to_stdout; ON_TextLog* dump = &dump_to_stdout; - point_t p1_origin, p2_origin; + point_t p1_origin; ON_3dPoint plane1_origin, plane2_origin; ON_3dVector plane_x_dir, plane_y_dir; // First, find plane in 3 space corresponding to the bottom face // of the RHC. - vect_t tmp, x_dir, y_dir; + vect_t x_dir, y_dir; VCROSS(x_dir, eip->rhc_H, eip->rhc_B); VUNITIZE(x_dir); Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-01-02 13:38:38 UTC (rev 37098) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-01-02 14:10:55 UTC (rev 37099) @@ -215,7 +215,7 @@ rt_rpc_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { struct rt_rpc_internal *xip; - register struct rpc_specific *rpc; + struct rpc_specific *rpc; #ifndef NO_BOMBING_MACROS const struct bn_tol *tol = &rtip->rti_tol; /* only used to check a if tolerance is valid */ #endif @@ -314,9 +314,9 @@ * R T _ R P C _ P R I N T */ void -rt_rpc_print(register const struct soltab *stp) +rt_rpc_print(const struct soltab *stp) { - register const struct rpc_specific *rpc = + const struct rpc_specific *rpc = (struct rpc_specific *)stp->st_specific; VPRINT("V", rpc->rpc_V); @@ -346,16 +346,16 @@ * >0 HIT */ int -rt_rpc_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_rpc_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct rpc_specific *rpc = + struct rpc_specific *rpc = (struct rpc_specific *)stp->st_specific; vect_t dprime; /* D' */ vect_t pprime; /* P' */ fastf_t k1, k2; /* distance constants of solution */ vect_t xlated; /* translated vector */ struct hit hits[3]; /* 2 potential hit points */ - register struct hit *hitp; /* pointer to hit point */ + struct hit *hitp; /* pointer to hit point */ /*????? const struct bn_tol *tol = &rtip->rti_tol; ?????*/ hitp = &hits[0]; @@ -467,7 +467,7 @@ if (hits[0].hit_dist < hits[1].hit_dist) { /* entry is [0], exit is [1] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -476,7 +476,7 @@ BU_LIST_INSERT(&(seghead->l), &(segp->l)); } else { /* entry is [1], exit is [0] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -494,10 +494,10 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_rpc_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_rpc_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { vect_t can_normal; /* normal to canonical rpc */ - register struct rpc_specific *rpc = + struct rpc_specific *rpc = (struct rpc_specific *)stp->st_specific; VJOIN1(hitp->hit_point, rp->r_pt, hitp->hit_dist, rp->r_dir); @@ -529,10 +529,10 @@ * Return the curvature of the rpc. */ void -rt_rpc_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_rpc_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { fastf_t zp1, zp2; /* 1st & 2nd derivatives */ - register struct rpc_specific *rpc = + struct rpc_specific *rpc = (struct rpc_specific *)stp->st_specific; switch (hitp->hit_surfno) { @@ -565,15 +565,16 @@ * v = elevation */ void -rt_rpc_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_rpc_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { - register struct rpc_specific *rpc = - (struct rpc_specific *)stp->st_specific; + struct rpc_specific *rpc = (struct rpc_specific *)stp->st_specific; vect_t work; vect_t pprime; fastf_t len; + if (ap) RT_CK_APPLICATION(ap); + /* * hit_point is on surface; project back to unit rpc, * creating a vector from vertex to hit point. @@ -610,9 +611,9 @@ * R T _ R P C _ F R E E */ void -rt_rpc_free(register struct soltab *stp) +rt_rpc_free(struct soltab *stp) { - register struct rpc_specific *rpc = + struct rpc_specific *rpc = (struct rpc_specific *)stp->st_specific; bu_free((char *)rpc, "rpc_specific"); @@ -633,7 +634,7 @@ * R T _ R P C _ P L O T */ int -rt_rpc_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_rpc_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol __attribute__((unused))) { struct rt_rpc_internal *xip; fastf_t *front; @@ -1167,11 +1168,13 @@ * Apply modeling transformations as well. */ int -rt_rpc_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_rpc_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_rpc_internal *xip; union record *rp; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); rp = (union record *)ep->ext_buf; /* Check record type */ @@ -1217,6 +1220,8 @@ union record *rpc; fastf_t f, mag_b, mag_h; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_RPC) return(-1); xip = (struct rt_rpc_internal *)ip->idb_ptr; @@ -1261,13 +1266,14 @@ * Apply modeling transformations as well. */ int -rt_rpc_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_rpc_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_rpc_internal *xip; fastf_t vec[10]; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); - BU_ASSERT_LONG(ep->ext_nbytes, ==, SIZEOF_NETWORK_DOUBLE * 10); RT_CK_DB_INTERNAL(ip); @@ -1311,6 +1317,8 @@ fastf_t vec[10]; fastf_t f, mag_b, mag_h; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_RPC) return(-1); xip = (struct rt_rpc_internal *)ip->idb_ptr; @@ -1357,13 +1365,16 @@ int rt_rpc_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_rpc_internal *xip = + struct rt_rpc_internal *xip = (struct rt_rpc_internal *)ip->idb_ptr; char buf[256]; RT_RPC_CK_MAGIC(xip); bu_vls_strcat(str, "Right Parabolic Cylinder (RPC)\n"); + if (!verbose) + return; + sprintf(buf, "\tV (%g, %g, %g)\n", INTCLAMP(xip->rpc_V[X] * mm2local), INTCLAMP(xip->rpc_V[Y] * mm2local), @@ -1399,7 +1410,7 @@ void rt_rpc_ifree(struct rt_db_internal *ip) { - register struct rt_rpc_internal *xip; + struct rt_rpc_internal *xip; RT_CK_DB_INTERNAL(ip); @@ -1417,8 +1428,11 @@ * */ int -rt_rpc_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_rpc_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-01-02 14:23:16
|
Revision: 37100 http://brlcad.svn.sourceforge.net/brlcad/?rev=37100&view=rev Author: brlcad Date: 2010-01-02 14:23:03 +0000 (Sat, 02 Jan 2010) Log Message: ----------- invert the verbose logic test so we can reduce depth/complexity. just return early. remove some more register keywording while we're at it. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/bot/bot.c brlcad/trunk/src/librt/primitives/brep/brep.cpp brlcad/trunk/src/librt/primitives/cline/cline.c brlcad/trunk/src/librt/primitives/ebm/ebm.c brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/epa/epa.c brlcad/trunk/src/librt/primitives/eto/eto.c brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/part/part.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp Modified: brlcad/trunk/src/librt/primitives/bot/bot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/bot/bot.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -1126,6 +1126,8 @@ char *orientation, *mode; int i; + int badVertexCount = 0; + RT_BOT_CK_MAGIC(bot_ip); bu_vls_strcat(str, "Bag of triangles (BOT)\n"); @@ -1175,61 +1177,61 @@ } } - if (verbose) { - int badVertexCount = 0; - for (i=0; i<bot_ip->num_faces; i++) { - int j, k; - point_t pt[3]; + if (!verbose) + return 0; + + for (i=0; i<bot_ip->num_faces; i++) { + int j, k; + point_t pt[3]; - snprintf(buf, 256, "\tface %d:", i); - bu_vls_strcat(str, buf); + snprintf(buf, 256, "\tface %d:", i); + bu_vls_strcat(str, buf); - for (j=0; j<3; j++) { - int ptnum; + for (j=0; j<3; j++) { + int ptnum; - ptnum = bot_ip->faces[i*3+j]; - if (ptnum < 0 || ptnum >= bot_ip->num_vertices) { - bu_vls_strcat(str, " (\?\?\? \?\?\? \?\?\?)"); - badVertexCount++; + ptnum = bot_ip->faces[i*3+j]; + if (ptnum < 0 || ptnum >= bot_ip->num_vertices) { + bu_vls_strcat(str, " (\?\?\? \?\?\? \?\?\?)"); + badVertexCount++; + } else { + VSCALE(pt[j], &bot_ip->vertices[ptnum*3], mm2local); + snprintf(buf, 256, " (%g %g %g)", V3INTCLAMPARGS(pt[j])); + bu_vls_strcat(str, buf); + } + } + if ((bot_ip->bot_flags & RT_BOT_HAS_SURFACE_NORMALS) && bot_ip->num_normals > 0) { + bu_vls_strcat(str, " normals: "); + for (k=0; k<3; k++) { + int idx; + + idx = i*3 + k; + if (bot_ip->face_normals[idx] < 0 || bot_ip->face_normals[idx] >= bot_ip->num_normals) { + bu_vls_strcat(str, "none "); } else { - VSCALE(pt[j], &bot_ip->vertices[ptnum*3], mm2local); - snprintf(buf, 256, " (%g %g %g)", V3INTCLAMPARGS(pt[j])); + snprintf(buf, 256, "(%g %g %g) ", V3INTCLAMPARGS(&bot_ip->normals[bot_ip->face_normals[idx]*3])); bu_vls_strcat(str, buf); } } - if ((bot_ip->bot_flags & RT_BOT_HAS_SURFACE_NORMALS) && bot_ip->num_normals > 0) { - bu_vls_strcat(str, " normals: "); - for (k=0; k<3; k++) { - int idx; + bu_vls_strcat(str, "\n"); + } else { + bu_vls_strcat(str, "\n"); + } + if (bot_ip->mode == RT_BOT_PLATE || bot_ip->mode == RT_BOT_PLATE_NOCOS) { + char *face_mode; - idx = i*3 + k; - if (bot_ip->face_normals[idx] < 0 || bot_ip->face_normals[idx] >= bot_ip->num_normals) { - bu_vls_strcat(str, "none "); - } else { - snprintf(buf, 256, "(%g %g %g) ", V3INTCLAMPARGS(&bot_ip->normals[bot_ip->face_normals[idx]*3])); - bu_vls_strcat(str, buf); - } - } - bu_vls_strcat(str, "\n"); - } else { - bu_vls_strcat(str, "\n"); - } - if (bot_ip->mode == RT_BOT_PLATE || bot_ip->mode == RT_BOT_PLATE_NOCOS) { - char *face_mode; - - if (BU_BITTEST(bot_ip->face_mode, i)) - face_mode = "appended to hit point"; - else - face_mode = "centered about hit point"; - snprintf(buf, 256, "\t\tthickness = %g, %s\n", INTCLAMP(mm2local*bot_ip->thickness[i]), face_mode); - bu_vls_strcat(str, buf); - } - } - if (badVertexCount > 0) { - snprintf(buf, 256, "\tThis BOT has %d invalid references to vertices\n", badVertexCount); + if (BU_BITTEST(bot_ip->face_mode, i)) + face_mode = "appended to hit point"; + else + face_mode = "centered about hit point"; + snprintf(buf, 256, "\t\tthickness = %g, %s\n", INTCLAMP(mm2local*bot_ip->thickness[i]), face_mode); bu_vls_strcat(str, buf); } } + if (badVertexCount > 0) { + snprintf(buf, 256, "\tThis BOT has %d invalid references to vertices\n", badVertexCount); + bu_vls_strcat(str, buf); + } return(0); } Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/brep/brep.cpp 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/brep/brep.cpp 2010-01-02 14:23:03 UTC (rev 37100) @@ -153,16 +153,16 @@ ON_Line ray(from, to); int intersections = 0; // for (int i = 0; i < face.LoopCount(); i++) { - // ON_BrepLoop* loop = face.Loop(i); - // for each trim - // for (int j = 0; j < loop->m_ti.Count(); j++) { - // ON_BrepTrim& trim = face.Brep()->m_T[loop->m_ti[j]]; - // const ON_Curve* trimCurve = trim.TrimCurveOf(); - // intersections += brep_count_intersections(ray, trimCurve); - // ray.IntersectCurve(trimCurve, intersections, 0.0001); - // intersections += trimCurve->NumIntersectionsWith(ray); - // } + // ON_BrepLoop* loop = face.Loop(i); + // for each trim + // for (int j = 0; j < loop->m_ti.Count(); j++) { + // ON_BrepTrim& trim = face.Brep()->m_T[loop->m_ti[j]]; + // const ON_Curve* trimCurve = trim.TrimCurveOf(); + // intersections += brep_count_intersections(ray, trimCurve); + // ray.IntersectCurve(trimCurve, intersections, 0.0001); + // intersections += trimCurve->NumIntersectionsWith(ray); // } + // } /* If we base trimming on the number of intersections with, rhino * generated curves won't raytrace. In fact, we need to ignore @@ -494,52 +494,52 @@ brep_hit(const ON_BrepFace& f, const point_t orig, const point_t p, const vect_t n, const pt2d_t _uv) : face(f), trimmed(false), closeToEdge(false), oob(false), sbv(NULL) { - VMOVE(origin, orig); - VMOVE(point, p); - VMOVE(normal, n); - move(uv, _uv); + VMOVE(origin, orig); + VMOVE(point, p); + VMOVE(normal, n); + move(uv, _uv); } brep_hit(const brep_hit& h) : face(h.face), trimmed(h.trimmed), closeToEdge(h.closeToEdge), oob(h.oob), sbv(h.sbv) { - VMOVE(origin, h.origin); - VMOVE(point, h.point); - VMOVE(normal, h.normal); - move(uv, h.uv); - trimmed = h.trimmed; - closeToEdge = h.closeToEdge; - oob = h.oob; - sbv = h.sbv; - hit = h.hit; - direction = h.direction; + VMOVE(origin, h.origin); + VMOVE(point, h.point); + VMOVE(normal, h.normal); + move(uv, h.uv); + trimmed = h.trimmed; + closeToEdge = h.closeToEdge; + oob = h.oob; + sbv = h.sbv; + hit = h.hit; + direction = h.direction; } brep_hit& operator=(const brep_hit& h) { - const_cast<ON_BrepFace&>(face) = h.face; - VMOVE(origin, h.origin); - VMOVE(point, h.point); - VMOVE(normal, h.normal); - move(uv, h.uv); - trimmed = h.trimmed; - closeToEdge = h.closeToEdge; - oob = h.oob; - sbv = h.sbv; - hit = h.hit; - direction = h.direction; + const_cast<ON_BrepFace&>(face) = h.face; + VMOVE(origin, h.origin); + VMOVE(point, h.point); + VMOVE(normal, h.normal); + move(uv, h.uv); + trimmed = h.trimmed; + closeToEdge = h.closeToEdge; + oob = h.oob; + sbv = h.sbv; + hit = h.hit; + direction = h.direction; - return *this; + return *this; } bool operator==(const brep_hit& h) { - return NEAR_ZERO(DIST_PT_PT(point, h.point), BREP_SAME_POINT_TOLERANCE); + return NEAR_ZERO(DIST_PT_PT(point, h.point), BREP_SAME_POINT_TOLERANCE); } bool operator<(const brep_hit& h) { - return DIST_PT_PT(point, origin) < DIST_PT_PT(h.point, origin); + return DIST_PT_PT(point, origin) < DIST_PT_PT(h.point, origin); } }; @@ -580,8 +580,8 @@ const ON_Surface *surf = node->m_face->SurfaceOf(); double umin, umax; double vmin, vmax; - surf->GetDomain(0,&umin, &umax); - surf->GetDomain(1,&vmin, &vmax); + surf->GetDomain(0, &umin, &umax); + surf->GetDomain(1, &vmin, &vmax); ON_3dVector dir = node->m_normal; dir.Reverse(); @@ -2816,17 +2816,18 @@ ON_String onstr = ON_String(wonstr); bu_vls_strcat(str, "Boundary Representation (BREP) object\n"); - if (verbose) { - const char *description = onstr.Array(); - // skip the first "ON_Brep:" line - while (description && description[0] && description[0] != '\n') { - description++; - } - if (description && description[0] && description[0] == '\n') { - description++; - } - bu_vls_strcat(str, description); + if (!verbose) + return 0; + + const char *description = onstr.Array(); + // skip the first "ON_Brep:" line + while (description && description[0] && description[0] != '\n') { + description++; } + if (description && description[0] && description[0] == '\n') { + description++; + } + bu_vls_strcat(str, description); return 0; } Modified: brlcad/trunk/src/librt/primitives/cline/cline.c =================================================================== --- brlcad/trunk/src/librt/primitives/cline/cline.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/cline/cline.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -977,21 +977,22 @@ RT_CLINE_CK_MAGIC(cline_ip); bu_vls_strcat(str, "cline solid (CLINE)\n"); - if (verbose) { - VSCALE(local_v, cline_ip->v, mm2local); - VSCALE(local_h, cline_ip->h, mm2local); + if (!verbose) + return 0; - if (cline_ip->thickness > 0.0) { - sprintf(buf, "\tV (%g %g %g)\n\tH (%g %g %g)\n\tradius %g\n\tplate mode thickness %g", - V3INTCLAMPARGS(local_v), V3INTCLAMPARGS(local_h), INTCLAMP(cline_ip->radius*mm2local), INTCLAMP(cline_ip->thickness*mm2local)); - } else { - sprintf(buf, "\tV (%g %g %g)\n\tH (%g %g %g)\n\tradius %g\n\tVolume mode\n", - V3INTCLAMPARGS(local_v), V3INTCLAMPARGS(local_h), INTCLAMP(cline_ip->radius*mm2local)); - } - bu_vls_strcat(str, buf); + VSCALE(local_v, cline_ip->v, mm2local); + VSCALE(local_h, cline_ip->h, mm2local); + + if (cline_ip->thickness > 0.0) { + sprintf(buf, "\tV (%g %g %g)\n\tH (%g %g %g)\n\tradius %g\n\tplate mode thickness %g", + V3INTCLAMPARGS(local_v), V3INTCLAMPARGS(local_h), INTCLAMP(cline_ip->radius*mm2local), INTCLAMP(cline_ip->thickness*mm2local)); + } else { + sprintf(buf, "\tV (%g %g %g)\n\tH (%g %g %g)\n\tradius %g\n\tVolume mode\n", + V3INTCLAMPARGS(local_v), V3INTCLAMPARGS(local_h), INTCLAMP(cline_ip->radius*mm2local)); } + bu_vls_strcat(str, buf); - return(0); + return 0; } Modified: brlcad/trunk/src/librt/primitives/ebm/ebm.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/ebm/ebm.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -819,26 +819,27 @@ RT_EBM_CK_MAGIC(eip); - bu_vls_init(&substr); bu_vls_strcat(str, "extruded bitmap (EBM)\n\t"); - if (verbose) { - bu_vls_printf(&substr, " file=\"%s\" w=%d n=%d depth=%g\n mat=", - eip->file, eip->xdim, eip->ydim, INTCLAMP(eip->tallness*mm2local)); - bu_vls_vlscat(str, &substr); - for (i=0; i<15; i++) { - bu_vls_trunc2(&substr, 0); - bu_vls_printf(&substr, "%g, ", INTCLAMP(eip->mat[i])); - bu_vls_vlscat(str, &substr); - } + if (!verbose) + return 0; + + bu_vls_init(&substr); + bu_vls_printf(&substr, " file=\"%s\" w=%d n=%d depth=%g\n mat=", + eip->file, eip->xdim, eip->ydim, INTCLAMP(eip->tallness*mm2local)); + bu_vls_vlscat(str, &substr); + for (i=0; i<15; i++) { bu_vls_trunc2(&substr, 0); - bu_vls_printf(&substr, "%g\n", INTCLAMP(eip->mat[15])); + bu_vls_printf(&substr, "%g, ", INTCLAMP(eip->mat[i])); bu_vls_vlscat(str, &substr); } + bu_vls_trunc2(&substr, 0); + bu_vls_printf(&substr, "%g\n", INTCLAMP(eip->mat[15])); + bu_vls_vlscat(str, &substr); bu_vls_free(&substr); - return(0); + return 0; } Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -203,7 +203,7 @@ rt_ehy_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { struct rt_ehy_internal *xip; - register struct ehy_specific *ehy; + struct ehy_specific *ehy; #ifndef NO_MAGIC_CHECKING const struct bn_tol *tol = &rtip->rti_tol; #endif @@ -299,9 +299,9 @@ * R T _ E H Y _ P R I N T */ void -rt_ehy_print(register const struct soltab *stp) +rt_ehy_print(const struct soltab *stp) { - register const struct ehy_specific *ehy = + const struct ehy_specific *ehy = (struct ehy_specific *)stp->st_specific; VPRINT("V", ehy->ehy_V); @@ -330,9 +330,9 @@ * >0 HIT */ int -rt_ehy_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_ehy_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct ehy_specific *ehy = + struct ehy_specific *ehy = (struct ehy_specific *)stp->st_specific; vect_t dp; /* D' */ vect_t pp; /* P' */ @@ -340,7 +340,7 @@ fastf_t cp; /* c' */ vect_t xlated; /* translated vector */ struct hit hits[3]; /* 2 potential hit points */ - register struct hit *hitp; /* pointer to hit point */ + struct hit *hitp; /* pointer to hit point */ /* for finding roots */ fastf_t a, b, c; /* coeffs of polynomial */ @@ -431,7 +431,7 @@ if (hits[0].hit_dist < hits[1].hit_dist) { /* entry is [0], exit is [1] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -440,7 +440,7 @@ BU_LIST_INSERT(&(seghead->l), &(segp->l)); } else { /* entry is [1], exit is [0] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -458,11 +458,11 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_ehy_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_ehy_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { vect_t can_normal; /* normal to canonical ehy */ fastf_t cp, scale; - register struct ehy_specific *ehy = + struct ehy_specific *ehy = (struct ehy_specific *)stp->st_specific; VJOIN1(hitp->hit_point, rp->r_pt, hitp->hit_dist, rp->r_dir); @@ -496,11 +496,11 @@ * Return the curvature of the ehy. */ void -rt_ehy_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_ehy_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { fastf_t a, b, c, scale; mat_t M1, M2; - register struct ehy_specific *ehy = + struct ehy_specific *ehy = (struct ehy_specific *)stp->st_specific; vect_t u, v; /* basis vectors (with normal) */ vect_t vec1, vec2; /* eigen vectors */ @@ -557,9 +557,9 @@ * v = elevation */ void -rt_ehy_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_ehy_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { - register struct ehy_specific *ehy = + struct ehy_specific *ehy = (struct ehy_specific *)stp->st_specific; vect_t work; vect_t pprime; @@ -607,9 +607,9 @@ * R T _ E H Y _ F R E E */ void -rt_ehy_free(register struct soltab *stp) +rt_ehy_free(struct soltab *stp) { - register struct ehy_specific *ehy = + struct ehy_specific *ehy = (struct ehy_specific *)stp->st_specific; @@ -1400,7 +1400,7 @@ * Apply modeling transformations as well. */ int -rt_ehy_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_ehy_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_ehy_internal *xip; union record *rp; @@ -1512,7 +1512,7 @@ * Apply modeling transformations as well. */ int -rt_ehy_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_ehy_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_ehy_internal *xip; fastf_t vec[3*4]; @@ -1625,8 +1625,7 @@ int rt_ehy_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_ehy_internal *xip = - (struct rt_ehy_internal *)ip->idb_ptr; + struct rt_ehy_internal *xip = (struct rt_ehy_internal *)ip->idb_ptr; char buf[256]; RT_EHY_CK_MAGIC(xip); @@ -1645,18 +1644,19 @@ INTCLAMP(MAGNITUDE(xip->ehy_H) * mm2local)); bu_vls_strcat(str, buf); - if (verbose) { - sprintf(buf, "\tA=%g\n", INTCLAMP(xip->ehy_r1 * mm2local)); - bu_vls_strcat(str, buf); + if (!verbose) + return 0; - sprintf(buf, "\tB=%g\n", INTCLAMP(xip->ehy_r2 * mm2local)); - bu_vls_strcat(str, buf); + sprintf(buf, "\tA=%g\n", INTCLAMP(xip->ehy_r1 * mm2local)); + bu_vls_strcat(str, buf); + + sprintf(buf, "\tB=%g\n", INTCLAMP(xip->ehy_r2 * mm2local)); + bu_vls_strcat(str, buf); - sprintf(buf, "\tc=%g\n", INTCLAMP(xip->ehy_c * mm2local)); - bu_vls_strcat(str, buf); - } + sprintf(buf, "\tc=%g\n", INTCLAMP(xip->ehy_c * mm2local)); + bu_vls_strcat(str, buf); - return(0); + return 0; } @@ -1669,7 +1669,7 @@ void rt_ehy_ifree(struct rt_db_internal *ip) { - register struct rt_ehy_internal *xip; + struct rt_ehy_internal *xip; RT_CK_DB_INTERNAL(ip); Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -201,7 +201,7 @@ rt_epa_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { struct rt_epa_internal *xip; - register struct epa_specific *epa; + struct epa_specific *epa; #ifndef NO_MAGIC_CHECKING const struct bn_tol *tol = &rtip->rti_tol; #endif @@ -299,9 +299,9 @@ * R T _ E P A _ P R I N T */ void -rt_epa_print(register const struct soltab *stp) +rt_epa_print(const struct soltab *stp) { - register const struct epa_specific *epa = + const struct epa_specific *epa = (struct epa_specific *)stp->st_specific; VPRINT("V", epa->epa_V); @@ -329,16 +329,16 @@ * >0 HIT */ int -rt_epa_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_epa_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct epa_specific *epa = + struct epa_specific *epa = (struct epa_specific *)stp->st_specific; vect_t dprime; /* D' */ vect_t pprime; /* P' */ fastf_t k1, k2; /* distance constants of solution */ vect_t xlated; /* translated vector */ struct hit hits[3]; /* 2 potential hit points */ - register struct hit *hitp; /* pointer to hit point */ + struct hit *hitp; /* pointer to hit point */ hitp = &hits[0]; @@ -421,7 +421,7 @@ if (hits[0].hit_dist < hits[1].hit_dist) { /* entry is [0], exit is [1] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -430,7 +430,7 @@ BU_LIST_INSERT(&(seghead->l), &(segp->l)); } else { /* entry is [1], exit is [0] */ - register struct seg *segp; + struct seg *segp; RT_GET_SEG(segp, ap->a_resource); segp->seg_stp = stp; @@ -448,11 +448,11 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_epa_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_epa_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { fastf_t scale; vect_t can_normal; /* normal to canonical epa */ - register struct epa_specific *epa = + struct epa_specific *epa = (struct epa_specific *)stp->st_specific; VJOIN1(hitp->hit_point, rp->r_pt, hitp->hit_dist, rp->r_dir); @@ -485,11 +485,11 @@ * Return the curvature of the epa. */ void -rt_epa_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_epa_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { fastf_t a, b, c, scale; mat_t M1, M2; - register struct epa_specific *epa = + struct epa_specific *epa = (struct epa_specific *)stp->st_specific; vect_t u, v; /* basis vectors (with normal) */ vect_t vec1, vec2; /* eigen vectors */ @@ -542,9 +542,9 @@ * v = elevation */ void -rt_epa_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_epa_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { - register struct epa_specific *epa = + struct epa_specific *epa = (struct epa_specific *)stp->st_specific; vect_t work; @@ -591,9 +591,9 @@ * R T _ E P A _ F R E E */ void -rt_epa_free(register struct soltab *stp) +rt_epa_free(struct soltab *stp) { - register struct epa_specific *epa = + struct epa_specific *epa = (struct epa_specific *)stp->st_specific; @@ -885,7 +885,7 @@ #define ELLOUT(n) ov+(n-1)*3 void -rt_ell_norms(register fastf_t *ov, fastf_t *A, fastf_t *B, fastf_t *h_vec, fastf_t t, int sides) +rt_ell_norms(fastf_t *ov, fastf_t *A, fastf_t *B, fastf_t *h_vec, fastf_t t, int sides) { fastf_t ang, theta, x, y, sqrt_1mt; int n; @@ -915,7 +915,7 @@ * Generate an ellipsoid with the specified number of sides approximating it. */ void -rt_ell(register fastf_t *ov, register const fastf_t *V, const fastf_t *A, const fastf_t *B, int sides) +rt_ell(fastf_t *ov, const fastf_t *V, const fastf_t *A, const fastf_t *B, int sides) { fastf_t ang, theta, x, y; int n; @@ -1439,7 +1439,7 @@ * Apply modeling transformations as well. */ int -rt_epa_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_epa_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_epa_internal *xip; union record *rp; @@ -1550,7 +1550,7 @@ * Apply modeling transformations as well. */ int -rt_epa_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_epa_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_epa_internal *xip; fastf_t vec[11]; @@ -1662,8 +1662,7 @@ int rt_epa_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_epa_internal *xip = - (struct rt_epa_internal *)ip->idb_ptr; + struct rt_epa_internal *xip = (struct rt_epa_internal *)ip->idb_ptr; char buf[256]; RT_EPA_CK_MAGIC(xip); @@ -1682,15 +1681,16 @@ INTCLAMP(MAGNITUDE(xip->epa_H) * mm2local)); bu_vls_strcat(str, buf); - if (verbose) { - sprintf(buf, "\tA=%g\n", INTCLAMP(xip->epa_r1 * mm2local)); - bu_vls_strcat(str, buf); + if (!verbose) + return 0; - sprintf(buf, "\tB=%g\n", INTCLAMP(xip->epa_r2 * mm2local)); - bu_vls_strcat(str, buf); - } + sprintf(buf, "\tA=%g\n", INTCLAMP(xip->epa_r1 * mm2local)); + bu_vls_strcat(str, buf); - return(0); + sprintf(buf, "\tB=%g\n", INTCLAMP(xip->epa_r2 * mm2local)); + bu_vls_strcat(str, buf); + + return 0; } @@ -1703,7 +1703,7 @@ void rt_epa_ifree(struct rt_db_internal *ip) { - register struct rt_epa_internal *xip; + struct rt_epa_internal *xip; RT_CK_DB_INTERNAL(ip); Modified: brlcad/trunk/src/librt/primitives/eto/eto.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/eto/eto.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -166,7 +166,7 @@ int rt_eto_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { - register struct eto_specific *eto; + struct eto_specific *eto; vect_t P, w1; /* for RPP calculation */ vect_t Au, Bu, Cu, Nu; @@ -272,9 +272,9 @@ * R T _ E T O _ P R I N T */ void -rt_eto_print(register const struct soltab *stp) +rt_eto_print(const struct soltab *stp) { - register const struct eto_specific *eto = + const struct eto_specific *eto = (struct eto_specific *)stp->st_specific; VPRINT("V", eto->eto_V); @@ -321,18 +321,18 @@ * >0 HIT */ int -rt_eto_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_eto_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct eto_specific *eto = + struct eto_specific *eto = (struct eto_specific *)stp->st_specific; - register struct seg *segp; + struct seg *segp; vect_t dprime; /* D' */ vect_t pprime; /* P' */ vect_t work; /* temporary vector */ bn_poly_t C; /* The final equation */ bn_complex_t val[4]; /* The complex roots */ double k[4]; /* The real roots */ - register int i; + int i; int j; vect_t cor_pprime; /* new ray origin */ fastf_t cor_proj; @@ -489,8 +489,8 @@ } break; case 4: { - register short n; - register short lim; + short n; + short lim; /* Inline rt_pt_sort(). Sorts k[] into descending order. */ for (lim = i-1; lim > 0; lim--) { @@ -560,9 +560,9 @@ * (df/dx, df/dy, df/dz) */ void -rt_eto_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_eto_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { - register struct eto_specific *eto = + struct eto_specific *eto = (struct eto_specific *)stp->st_specific; fastf_t sqrt_x2y2, efact, ffact, xcomp, ycomp, zcomp; vect_t normp; @@ -596,11 +596,11 @@ * Return the curvature of the eto. */ void -rt_eto_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_eto_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { fastf_t a, b, ch, cv, dh, dv, k_circ, k_ell, phi, rad, xp, yp1, yp2, work; - register struct eto_specific *eto = + struct eto_specific *eto = (struct eto_specific *)stp->st_specific; vect_t Cp, Dp, Hit_Ell, Nu, Radius, Ru; @@ -662,12 +662,12 @@ * R T _ E T O _ U V */ void -rt_eto_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_eto_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { fastf_t horz, theta_u, theta_v, vert; vect_t Hit_Ell, Nu, Radius, Ru; - register struct eto_specific *eto = + struct eto_specific *eto = (struct eto_specific *)stp->st_specific; if (ap) RT_CK_APPLICATION(ap); @@ -709,7 +709,7 @@ void rt_eto_free(struct soltab *stp) { - register struct eto_specific *eto = + struct eto_specific *eto = (struct eto_specific *)stp->st_specific; bu_free((char *)eto, "eto_specific"); @@ -1192,7 +1192,7 @@ * Apply modeling transformations at the same time. */ int -rt_eto_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_eto_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_eto_internal *tip; union record *rp; @@ -1289,7 +1289,7 @@ * Apply modeling transformations at the same time. */ int -rt_eto_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_eto_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_eto_internal *tip; fastf_t vec[11]; @@ -1387,7 +1387,7 @@ int rt_eto_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_eto_internal *tip = + struct rt_eto_internal *tip = (struct rt_eto_internal *)ip->idb_ptr; char buf[256]; @@ -1413,15 +1413,16 @@ INTCLAMP(MAGNITUDE(tip->eto_C) * mm2local)); bu_vls_strcat(str, buf); - if (verbose) { - sprintf(buf, "\tr=%g\n", INTCLAMP(tip->eto_r * mm2local)); - bu_vls_strcat(str, buf); + if (!verbose) + return 0; - sprintf(buf, "\td=%g\n", INTCLAMP(tip->eto_rd * mm2local)); - bu_vls_strcat(str, buf); - } + sprintf(buf, "\tr=%g\n", INTCLAMP(tip->eto_r * mm2local)); + bu_vls_strcat(str, buf); - return(0); + sprintf(buf, "\td=%g\n", INTCLAMP(tip->eto_rd * mm2local)); + bu_vls_strcat(str, buf); + + return 0; } @@ -1433,7 +1434,7 @@ void rt_eto_ifree(struct rt_db_internal *ip) { - register struct rt_eto_internal *tip; + struct rt_eto_internal *tip; RT_CK_DB_INTERNAL(ip); Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -2274,13 +2274,14 @@ int rt_extrude_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - struct rt_extrude_internal *extrude_ip = - (struct rt_extrude_internal *)ip->idb_ptr; + struct rt_extrude_internal *extrude_ip; char buf[256]; point_t V; vect_t h, u, v; + extrude_ip = (struct rt_extrude_internal *)ip->idb_ptr; RT_EXTRUDE_CK_MAGIC(extrude_ip); + bu_vls_strcat(str, "2D extrude (EXTRUDE)\n"); VSCALE(V, extrude_ip->V, mm2local); VSCALE(h, extrude_ip->h, mm2local); @@ -2293,12 +2294,13 @@ V3INTCLAMPARGS(v)); bu_vls_strcat(str, buf); - if (verbose) { - snprintf(buf, 256, "\tsketch name: %s\n", extrude_ip->sketch_name); - bu_vls_strcat(str, buf); - } + if (!verbose) + return 0; - return(0); + snprintf(buf, 256, "\tsketch name: %s\n", extrude_ip->sketch_name); + bu_vls_strcat(str, buf); + + return 0; } Modified: brlcad/trunk/src/librt/primitives/grip/grip.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/grip/grip.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -462,16 +462,17 @@ bu_vls_strcat(str, buf); - if (verbose) { - sprintf(buf, "\tC (%g %g %g) mag=%g\n", - INTCLAMP(gip->center[0]*mm2local), - INTCLAMP(gip->center[1]*mm2local), - INTCLAMP(gip->center[2]*mm2local), - INTCLAMP(gip->mag*mm2local)); - bu_vls_strcat(str, buf); - } + if (!verbose) + return 0; - return(0); + sprintf(buf, "\tC (%g %g %g) mag=%g\n", + INTCLAMP(gip->center[0]*mm2local), + INTCLAMP(gip->center[1]*mm2local), + INTCLAMP(gip->center[2]*mm2local), + INTCLAMP(gip->mag*mm2local)); + bu_vls_strcat(str, buf); + + return 0; } Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/half/half.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -743,21 +743,22 @@ int rt_hlf_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_half_internal *hip = - (struct rt_half_internal *)ip->idb_ptr; + struct rt_half_internal *hip; char buf[256]; + hip = (struct rt_half_internal *)ip->idb_ptr; RT_HALF_CK_MAGIC(hip); bu_vls_strcat(str, "halfspace\n"); - if (verbose) { - sprintf(buf, "\tN (%g, %g, %g) d=%g\n", - V3INTCLAMPARGS(hip->eqn), /* should have unit length */ - INTCLAMP(hip->eqn[W] * mm2local)); - bu_vls_strcat(str, buf); - } + if (!verbose) + return 0; - return(0); + sprintf(buf, "\tN (%g, %g, %g) d=%g\n", + V3INTCLAMPARGS(hip->eqn), /* should have unit length */ + INTCLAMP(hip->eqn[W] * mm2local)); + bu_vls_strcat(str, buf); + + return 0; } Modified: brlcad/trunk/src/librt/primitives/hf/hf.c =================================================================== --- brlcad/trunk/src/librt/primitives/hf/hf.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/hf/hf.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -211,7 +211,7 @@ rt_hf_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { struct rt_hf_internal *hip; - register struct hf_specific *hf; + struct hf_specific *hf; const struct bn_tol *tol = &rtip->rti_tol; double dot; vect_t height, work; @@ -350,9 +350,9 @@ * R T _ H F _ P R I N T */ void -rt_hf_print(register const struct soltab *stp) +rt_hf_print(const struct soltab *stp) { - register const struct hf_specific *hf = + const struct hf_specific *hf = (struct hf_specific *)stp->st_specific; VPRINT("V", hf->hf_V); VPRINT("X", hf->hf_X); @@ -366,7 +366,7 @@ static int hf_cell_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct hit *hitp, int xCell, int yCell) { - register struct hf_specific *hfp = + struct hf_specific *hfp = (struct hf_specific *)stp->st_specific; fastf_t dn, abs_dn, k1st=0, k2nd=0, alpha, beta; @@ -392,7 +392,7 @@ VSCALE(yvect, hfp->hf_Y, scale); } if (hfp->hf_shorts) { - register unsigned short *sp; + unsigned short *sp; sp = (unsigned short *)hfp->hf_mp->apbuf + yCell * hfp->hf_w + xCell; @@ -715,9 +715,9 @@ * >0 HIT */ int -rt_hf_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_hf_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct hf_specific *hf = + struct hf_specific *hf = (struct hf_specific *)stp->st_specific; struct hit hits[MAXHITS]; @@ -1026,7 +1026,7 @@ * correctly. */ if (hf->hf_shorts) { - register unsigned short *sp; + unsigned short *sp; sp = (unsigned short *)hf->hf_mp->apbuf + yCell * hf->hf_w + xCell; /* 0, 0 */ @@ -1098,7 +1098,7 @@ continue; } if (hf->hf_shorts) { - register unsigned short *sp; + unsigned short *sp; sp = (unsigned short *)hf->hf_mp->apbuf + yCell * hf->hf_w + xCell; /* 0, 0 */ @@ -1266,7 +1266,7 @@ } if (hf->hf_shorts) { - register unsigned short *sp; + unsigned short *sp; sp = (unsigned short *)hf->hf_mp->apbuf + yCell * hf->hf_w + xCell; /* 0, 0 */ @@ -1339,7 +1339,7 @@ continue; } if (hf->hf_shorts) { - register unsigned short *sp; + unsigned short *sp; sp = (unsigned short *)hf->hf_mp->apbuf + yCell * hf->hf_w + xCell; /* 0, 0 */ @@ -1452,9 +1452,9 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_hf_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_hf_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { - register struct hf_specific *hf = + struct hf_specific *hf = (struct hf_specific *)stp->st_specific; int j; @@ -1550,9 +1550,9 @@ * R T _ H F _ F R E E */ void -rt_hf_free(register struct soltab *stp) +rt_hf_free(struct soltab *stp) { - register struct hf_specific *hf = + struct hf_specific *hf = (struct hf_specific *)stp->st_specific; if (hf->hf_mp) { @@ -2104,19 +2104,21 @@ int rt_hf_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_hf_internal *xip = - (struct rt_hf_internal *)ip->idb_ptr; + struct rt_hf_internal *xip; BU_CK_VLS(str); + + xip = (struct rt_hf_internal *)ip->idb_ptr; RT_HF_CK_MAGIC(xip); bu_vls_printf(str, "Height Field (HF) mm2local=%g\n", mm2local); - if (verbose) { - bu_vls_struct_print(str, rt_hf_parse, ip->idb_ptr); - bu_vls_strcat(str, "\n"); - } + if (!verbose) + return 0; - return(0); + bu_vls_struct_print(str, rt_hf_parse, ip->idb_ptr); + bu_vls_strcat(str, "\n"); + + return 0; } @@ -2129,7 +2131,7 @@ void rt_hf_ifree(struct rt_db_internal *ip) { - register struct rt_hf_internal *xip; + struct rt_hf_internal *xip; RT_CK_DB_INTERNAL(ip); xip = (struct rt_hf_internal *)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -1262,13 +1262,16 @@ int rt_hyp_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - struct rt_hyp_internal *hyp_ip = - (struct rt_hyp_internal *)ip->idb_ptr; + struct rt_hyp_internal *hyp_ip; char buf[256]; + hyp_ip = (struct rt_hyp_internal *)ip->idb_ptr; RT_HYP_CK_MAGIC(hyp_ip); bu_vls_strcat(str, "truncated general hyp (HYP)\n"); + if (!verbose) + return 0; + sprintf(buf, "\tV (%g, %g, %g)\n", INTCLAMP(hyp_ip->hyp_Vi[X] * mm2local), INTCLAMP(hyp_ip->hyp_Vi[Y] * mm2local), @@ -1288,15 +1291,13 @@ INTCLAMP(hyp_ip->hyp_A[Z] * mm2local)); bu_vls_strcat(str, buf); - if (verbose) { - sprintf(buf, "\tMag B=%g\n", INTCLAMP(hyp_ip->hyp_b * mm2local)); - bu_vls_strcat(str, buf); + sprintf(buf, "\tMag B=%g\n", INTCLAMP(hyp_ip->hyp_b * mm2local)); + bu_vls_strcat(str, buf); - sprintf(buf, "\tNeck to Base Ratio=%g\n", INTCLAMP(hyp_ip->hyp_bnr * mm2local)); - bu_vls_strcat(str, buf); - } + sprintf(buf, "\tNeck to Base Ratio=%g\n", INTCLAMP(hyp_ip->hyp_bnr * mm2local)); + bu_vls_strcat(str, buf); - return(0); + return 0; } Modified: brlcad/trunk/src/librt/primitives/part/part.c =================================================================== --- brlcad/trunk/src/librt/primitives/part/part.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/part/part.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -1710,55 +1710,57 @@ switch (pip->part_type) { case RT_PARTICLE_TYPE_SPHERE: bu_vls_strcat(str, "spherical particle\n"); - if (verbose) { - sprintf(buf, "\tV (%g, %g, %g)\n", - INTCLAMP(pip->part_V[X] * mm2local), - INTCLAMP(pip->part_V[Y] * mm2local), - INTCLAMP(pip->part_V[Z] * mm2local)); - bu_vls_strcat(str, buf); - sprintf(buf, "\tradius = %g\n", - INTCLAMP(pip->part_vrad * mm2local)); - bu_vls_strcat(str, buf); - } + if (!verbose) + return 0; + sprintf(buf, "\tV (%g, %g, %g)\n", + INTCLAMP(pip->part_V[X] * mm2local), + INTCLAMP(pip->part_V[Y] * mm2local), + INTCLAMP(pip->part_V[Z] * mm2local)); + bu_vls_strcat(str, buf); + sprintf(buf, "\tradius = %g\n", + INTCLAMP(pip->part_vrad * mm2local)); + bu_vls_strcat(str, buf); + break; case RT_PARTICLE_TYPE_CYLINDER: bu_vls_strcat(str, "cylindrical particle (lozenge)\n"); - if (verbose) { - sprintf(buf, "\tV (%g, %g, %g)\n", - INTCLAMP(pip->part_V[X] * mm2local), - INTCLAMP(pip->part_V[Y] * mm2local), - INTCLAMP(pip->part_V[Z] * mm2local)); - bu_vls_strcat(str, buf); - sprintf(buf, "\tH (%g, %g, %g)\n", - INTCLAMP(pip->part_H[X] * mm2local), - INTCLAMP(pip->part_H[Y] * mm2local), - INTCLAMP(pip->part_H[Z] * mm2local)); - bu_vls_strcat(str, buf); - sprintf(buf, "\tradius = %g\n", - INTCLAMP(pip->part_vrad * mm2local)); - bu_vls_strcat(str, buf); - } + if (!verbose) + return 0; + sprintf(buf, "\tV (%g, %g, %g)\n", + INTCLAMP(pip->part_V[X] * mm2local), + INTCLAMP(pip->part_V[Y] * mm2local), + INTCLAMP(pip->part_V[Z] * mm2local)); + bu_vls_strcat(str, buf); + sprintf(buf, "\tH (%g, %g, %g)\n", + INTCLAMP(pip->part_H[X] * mm2local), + INTCLAMP(pip->part_H[Y] * mm2local), + INTCLAMP(pip->part_H[Z] * mm2local)); + bu_vls_strcat(str, buf); + sprintf(buf, "\tradius = %g\n", + INTCLAMP(pip->part_vrad * mm2local)); + bu_vls_strcat(str, buf); + break; case RT_PARTICLE_TYPE_CONE: bu_vls_strcat(str, "conical particle\n"); - if (verbose) { - sprintf(buf, "\tV (%g, %g, %g)\n", - INTCLAMP(pip->part_V[X] * mm2local), - INTCLAMP(pip->part_V[Y] * mm2local), - INTCLAMP(pip->part_V[Z] * mm2local)); - bu_vls_strcat(str, buf); - sprintf(buf, "\tH (%g, %g, %g)\n", - INTCLAMP(pip->part_H[X] * mm2local), - INTCLAMP(pip->part_H[Y] * mm2local), - INTCLAMP(pip->part_H[Z] * mm2local)); - bu_vls_strcat(str, buf); - sprintf(buf, "\tv end radius = %g\n", - INTCLAMP(pip->part_vrad * mm2local)); - bu_vls_strcat(str, buf); - sprintf(buf, "\th end radius = %g\n", - INTCLAMP(pip->part_hrad * mm2local)); - bu_vls_strcat(str, buf); - } + if (!verbose) + return 0; + sprintf(buf, "\tV (%g, %g, %g)\n", + INTCLAMP(pip->part_V[X] * mm2local), + INTCLAMP(pip->part_V[Y] * mm2local), + INTCLAMP(pip->part_V[Z] * mm2local)); + bu_vls_strcat(str, buf); + sprintf(buf, "\tH (%g, %g, %g)\n", + INTCLAMP(pip->part_H[X] * mm2local), + INTCLAMP(pip->part_H[Y] * mm2local), + INTCLAMP(pip->part_H[Z] * mm2local)); + bu_vls_strcat(str, buf); + sprintf(buf, "\tv end radius = %g\n", + INTCLAMP(pip->part_vrad * mm2local)); + bu_vls_strcat(str, buf); + sprintf(buf, "\th end radius = %g\n", + INTCLAMP(pip->part_hrad * mm2local)); + bu_vls_strcat(str, buf); break; default: bu_vls_strcat(str, "Unknown particle type\n"); Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-01-02 14:23:03 UTC (rev 37100) @@ -1373,7 +1373,7 @@ bu_vls_strcat(str, "Right Parabolic Cylinder (RPC)\n"); if (!verbose) - return; + return 0; sprintf(buf, "\tV (%g, %g, %g)\n", INTCLAMP(xip->rpc_V[X] * mm2local), Modified: brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp 2010-01-02 14:10:55 UTC (rev 37099) +++ brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp 2010-01-02 14:23:03 UTC (rev 37100) @@ -34,7 +34,7 @@ * R T _ R P C _ B R E P */ extern "C" void -rt_rpc_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) +rt_rpc_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol __attribute__((unused))) { struct rt_rpc_internal *eip; @@ -47,14 +47,14 @@ ON_TextLog dump_to_stdout; ON_TextLog* dump = &dump_to_stdout; - point_t p1_origin, p2_origin; + point_t p1_origin; ON_3dPoint plane1_origin, plane2_origin; ON_3dVector plane_x_dir, plane_y_dir; // First, find plane in 3 space corresponding to the bottom face // of the RPC. - vect_t tmp, x_dir, y_dir; + vect_t x_dir, y_dir; VCROSS(x_dir, eip->rpc_H, eip->rpc_B); VUNITIZE(x_dir); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-01-02 14:36:17
|
Revision: 37101 http://brlcad.svn.sourceforge.net/brlcad/?rev=37101&view=rev Author: brlcad Date: 2010-01-02 14:36:07 +0000 (Sat, 02 Jan 2010) Log Message: ----------- more warnings Modified Paths: -------------- brlcad/trunk/src/librt/primitives/sketch/sketch.c brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp brlcad/trunk/src/librt/primitives/sph/sph.c brlcad/trunk/src/librt/primitives/submodel/submodel.c Modified: brlcad/trunk/src/librt/primitives/sketch/sketch.c =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch.c 2010-01-02 14:23:03 UTC (rev 37100) +++ brlcad/trunk/src/librt/primitives/sketch/sketch.c 2010-01-02 14:36:07 UTC (rev 37101) @@ -133,6 +133,12 @@ int rt_sketch_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { + if (!stp) + return -1; + RT_CK_SOLTAB(stp); + if (ip) RT_CK_DB_INTERNAL(ip); + if (rtip) RT_CK_RTI(rtip); + stp->st_specific = (genptr_t)NULL; return(0); } @@ -144,6 +150,7 @@ void rt_sketch_print(const struct soltab *stp) { + if (stp) RT_CK_SOLTAB(stp); } @@ -160,7 +167,7 @@ int rt_sketch_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - if (!stp || !rp || !ap) + if (!stp || !rp || !ap || !seghead) return 0; RT_CK_SOLTAB(stp); @@ -226,6 +233,11 @@ void rt_sketch_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { + if (ap) RT_CK_APPLICATION(ap); + if (stp) RT_CK_SOLTAB(stp); + if (hitp) RT_CK_HIT(hitp); + if (!uvp) + return; } @@ -235,6 +247,7 @@ void rt_sketch_free(struct soltab *stp) { + if (stp) RT_CK_SOLTAB(stp); } @@ -261,14 +274,12 @@ int rt_sketch_contains(struct rt_sketch_internal *sk, point2d_t pt) { - fastf_t nseg, radius; - int i, j, hits; + fastf_t nseg; + int i, hits; long *lng; struct line_seg *lsg; struct carc_seg *csg; - struct nurb_seg *nsg; - struct bezier_seg *bsg; point2d_t pt1, pt2, isec; vect2d_t one, two; @@ -366,7 +377,6 @@ rt_sketch_bounds(struct rt_sketch_internal *sk, fastf_t *bounds) { fastf_t nseg, radius; - fastf_t xmin, xmax, ymin, ymax; int i, j; long *lng; @@ -556,11 +566,11 @@ delta = tmp_delta; } if (ttol->norm > 0.0) { - fastf_t norm; + fastf_t normal; - norm = ttol->norm * M_PI / 180.0; - if (norm < delta) - delta = norm; + normal = ttol->norm * M_PI / 180.0; + if (normal < delta) + delta = normal; } if (csg->radius <= 0.0) { /* this is a full circle */ @@ -894,7 +904,7 @@ * R T _ S K E T C H _ P L O T */ int -rt_sketch_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_sketch_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol __attribute__((unused))) { struct rt_sketch_internal *sketch_ip; int ret; @@ -922,8 +932,12 @@ * 0 OK. *r points to nmgregion that holds this tessellation. */ int -rt_sketch_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_sketch_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol __attribute__((unused)), const struct bn_tol *tol __attribute__((unused))) { + if (r) NMG_CK_REGION(*r); + if (m) NMG_CK_MODEL(m); + if (ip) RT_CK_DB_INTERNAL(ip); + return(-1); } @@ -945,6 +959,8 @@ struct curve *crv; int i; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); rp = (union record *)ep->ext_buf; /* Check record type */ @@ -993,7 +1009,6 @@ struct carc_seg *csg; struct nurb_seg *nsg; struct bezier_seg *bsg; - int i; magic = bu_glong(ptr); ptr += 4; @@ -1099,6 +1114,8 @@ vect_t tmp_vec; unsigned char *ptr; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_SKETCH) return(-1); sketch_ip = (struct rt_sketch_internal *)ip->idb_ptr; @@ -1282,13 +1299,14 @@ struct curve *crv; int i; - BU_CK_EXTERNAL(ep); - if (bu_debug&BU_DEBUG_MEM_CHECK) { bu_log("Barrier check at start of sketch_import5():\n"); bu_mem_barriercheck(); } + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); + RT_CK_DB_INTERNAL(ip); ip->idb_major_type = DB5_MAJORTYPE_BRLCAD; ip->idb_type = ID_SKETCH; @@ -1328,7 +1346,6 @@ struct carc_seg *csg; struct nurb_seg *nsg; struct bezier_seg *bsg; - int i; magic = bu_glong(ptr); ptr += SIZEOF_NETWORK_LONG; @@ -1441,6 +1458,8 @@ bu_mem_barriercheck(); } + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_SKETCH) return(-1); sketch_ip = (struct rt_sketch_internal *)ip->idb_ptr; @@ -2399,8 +2418,11 @@ * */ int -rt_sketch_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_sketch_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } Modified: brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp 2010-01-02 14:23:03 UTC (rev 37100) +++ brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp 2010-01-02 14:36:07 UTC (rev 37101) @@ -30,9 +30,6 @@ #include "brep.h" void FindLoops(ON_Brep **b) { - ON_TextLog dump_to_stdout; - ON_TextLog* dump = &dump_to_stdout; - ON_3dPoint ptmatch, ptterminate, pstart, pend; int *curvearray; @@ -43,9 +40,6 @@ ON_SimpleArray<ON_Curve *> allsegments; ON_SimpleArray<ON_Curve *> loopsegments; int loop_complete; - int orientation; - int current_loop = 0; - int current_segment; for (int i = 0; i < (*b)->m_C3.Count(); i++) { allsegments.Append((*b)->m_C3[i]); } @@ -67,7 +61,6 @@ loop_complete = 0; while ((loop_complete != 1) && (allcurvesassigned != 1)) { curvearray[curvecount] = loopcount; - ON_Curve *currentcurve = allsegments[curvecount]; ptmatch = (*b)->m_C3[curvecount]->PointAtEnd(); ptterminate = (*b)->m_C3[curvecount]->PointAtStart(); for (int i = 0; i < allsegments.Count(); i++) { @@ -143,7 +136,7 @@ * R T _ S K E T C H _ B R E P */ extern "C" void -rt_sketch_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) +rt_sketch_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol __attribute__((unused))) { struct rt_sketch_internal *eip; @@ -153,9 +146,6 @@ *b = ON_Brep::New(); - ON_TextLog dump_to_stdout; - ON_TextLog* dump = &dump_to_stdout; - ON_3dPoint plane_origin; ON_3dVector plane_x_dir, plane_y_dir; @@ -171,7 +161,6 @@ // points for the vertices. for (int i = 0; i < eip->vert_count; i++) { (*b)->NewVertex(sketch_plane->PointAt(eip->verts[i][0], eip->verts[i][1]), 0.0); - int vertind = (*b)->m_V.Count() - 1; } // Create the brep elements corresponding to the sketch lines, curves @@ -206,16 +195,14 @@ } else { // need to calculated 3rd point on arc - look to sketch.c around line 581 for // logic - ON_Arc* c3darc = new ON_Arc(); - ON_Curve* c3d = new ON_ArcCurve(); } break; case CURVE_BEZIER_MAGIC: bsg = (struct bezier_seg *)lng; { ON_3dPointArray *bezpoints = new ON_3dPointArray(bsg->degree + 1); - for (int i = 0; i < bsg->degree + 1; i++) { - bezpoints->Append((*b)->m_V[bsg->ctl_points[i]].Point()); + for (int j = 0; j < bsg->degree + 1; j++) { + bezpoints->Append((*b)->m_V[bsg->ctl_points[j]].Point()); } ON_BezierCurve* bez3d = new ON_BezierCurve((const ON_3dPointArray)*bezpoints); ON_NurbsCurve* beznurb3d = ON_NurbsCurve::New(); Modified: brlcad/trunk/src/librt/primitives/sph/sph.c =================================================================== --- brlcad/trunk/src/librt/primitives/sph/sph.c 2010-01-02 14:23:03 UTC (rev 37100) +++ brlcad/trunk/src/librt/primitives/sph/sph.c 2010-01-02 14:36:07 UTC (rev 37101) @@ -285,6 +285,8 @@ fastf_t b; /* second term of quadratic eqn */ fastf_t root; /* root of radical */ + if (ap) RT_CK_APPLICATION(ap); + /* for each ray/sphere pair */ for (i = 0; i < n; i++) { if (stp[i] == 0) continue; /* stp[i] == 0 signals skip ray */ @@ -427,8 +429,11 @@ * */ int -rt_sph_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_sph_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } Modified: brlcad/trunk/src/librt/primitives/submodel/submodel.c =================================================================== --- brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-01-02 14:23:03 UTC (rev 37100) +++ brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-01-02 14:36:07 UTC (rev 37101) @@ -281,6 +281,8 @@ int rt_submodel_a_miss(struct application *ap) { + if (ap) RT_CK_APPLICATION(ap); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-01-02 17:37:07
|
Revision: 37102 http://brlcad.svn.sourceforge.net/brlcad/?rev=37102&view=rev Author: brlcad Date: 2010-01-02 17:36:59 +0000 (Sat, 02 Jan 2010) Log Message: ----------- quelling unused params, added checks, removed register keyword. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/submodel/submodel.c brlcad/trunk/src/librt/primitives/superell/superell.c Modified: brlcad/trunk/src/librt/primitives/submodel/submodel.c =================================================================== --- brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-01-02 14:36:07 UTC (rev 37101) +++ brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-01-02 17:36:59 UTC (rev 37102) @@ -135,7 +135,7 @@ * rtip's are registered there by db_clone_dbi(). */ for (BU_PTBL_FOR(rtipp, (struct rt_i **), &sub_dbip->dbi_clients)) { - register char *ttp; + char *ttp; RT_CK_RTI(*rtipp); ttp = (*rtipp)->rti_treetop; if (ttp && strcmp(ttp, bu_vls_addr(&sip->treetop)) == 0) { @@ -254,9 +254,9 @@ * R T _ S U B M O D E L _ P R I N T */ void -rt_submodel_print(register const struct soltab *stp) +rt_submodel_print(const struct soltab *stp) { - register const struct submodel_specific *submodel = + const struct submodel_specific *submodel = (struct submodel_specific *)stp->st_specific; RT_CK_SUBMODEL_SPECIFIC(submodel); @@ -299,9 +299,9 @@ * R T _ S U B M O D E L _ A _ H I T */ int -rt_submodel_a_hit(struct application *ap, struct partition *PartHeadp, struct seg *segHeadp) +rt_submodel_a_hit(struct application *ap, struct partition *PartHeadp, struct seg *segHeadp __attribute__((unused))) { - register struct partition *pp; + struct partition *pp; struct application *up_ap; struct soltab *up_stp; struct region *up_reg; @@ -456,9 +456,9 @@ * >0 HIT */ int -rt_submodel_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_submodel_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { - register struct submodel_specific *submodel = + struct submodel_specific *submodel = (struct submodel_specific *)stp->st_specific; struct application sub_ap; struct submodel_gobetween gb; @@ -535,7 +535,7 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_submodel_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_submodel_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { RT_CK_HIT(hitp); @@ -560,8 +560,13 @@ * Return the curvature of the submodel. */ void -rt_submodel_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_submodel_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { + if (!cvp || !hitp) + return; + RT_CK_HIT(hitp); + if (stp) RT_CK_SOLTAB(stp); + cvp->crv_c1 = cvp->crv_c2 = 0; /* any tangent direction */ @@ -581,8 +586,12 @@ * v = elevation */ void -rt_submodel_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_submodel_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { + if (ap) RT_CK_APPLICATION(ap); + if (stp) RT_CK_SOLTAB(stp); + if (!hitp || !uvp) + return; RT_CK_HIT(hitp); uvp->uv_u = hitp->hit_vpriv[X]; @@ -595,9 +604,9 @@ * R T _ S U B M O D E L _ F R E E */ void -rt_submodel_free(register struct soltab *stp) +rt_submodel_free(struct soltab *stp) { - register struct submodel_specific *submodel = + struct submodel_specific *submodel = (struct submodel_specific *)stp->st_specific; struct resource **rpp; struct rt_i *rtip; @@ -630,7 +639,7 @@ * R T _ S U B M O D E L _ C L A S S */ int -rt_submodel_class(const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) +rt_submodel_class() { return RT_CLASSIFY_UNIMPLEMENTED; } @@ -648,7 +657,8 @@ * This routine must be prepared to run in parallel. * This routine should be generally exported for other uses. */ -HIDDEN union tree *rt_submodel_wireframe_leaf(struct db_tree_state *tsp, struct db_full_path *pathp, struct rt_db_internal *ip, genptr_t client_data) +HIDDEN union tree * +rt_submodel_wireframe_leaf(struct db_tree_state *tsp, struct db_full_path *pathp, struct rt_db_internal *ip, genptr_t client_data __attribute__((unused))) { union tree *curtree; struct goodies *gp; @@ -660,7 +670,7 @@ RT_CK_RESOURCE(tsp->ts_resp); gp = (struct goodies *)tsp->ts_m; /* hack */ - RT_CK_DBI(gp->dbip); + if (gp) RT_CK_DBI(gp->dbip); /* NON-PARALLEL access to vlist pointed to by vheadp is not semaphored */ if (bu_is_parallel()) bu_bomb("rt_submodel_wireframe_leaf() non-parallel code\n"); @@ -773,11 +783,14 @@ * 0 OK. *r points to nmgregion that holds this tessellation. */ int -rt_submodel_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_submodel_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol __attribute__((unused)), const struct bn_tol *tol __attribute__((unused))) { struct rt_submodel_internal *sip; + if (r) NMG_CK_REGION(*r); + if (m) NMG_CK_MODEL(m); RT_CK_DB_INTERNAL(ip); + sip = (struct rt_submodel_internal *)ip->idb_ptr; RT_SUBMODEL_CK_MAGIC(sip); @@ -792,7 +805,7 @@ * Apply modeling transformations as well. */ int -rt_submodel_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_submodel_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_submodel_internal *sip; union record *rp; @@ -861,6 +874,8 @@ union record *rec; struct bu_vls str; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_SUBMODEL) return(-1); sip = (struct rt_submodel_internal *)ip->idb_ptr; @@ -870,7 +885,7 @@ #endif /* Ignores scale factor */ - BU_ASSERT(local2mm == 1.0); + BU_ASSERT(NEAR_ZERO(local2mm - 1.0, SMALL_FASTF)); BU_CK_EXTERNAL(ep); ep->ext_nbytes = sizeof(union record)*DB_SS_NGRAN; @@ -899,11 +914,13 @@ * Apply modeling transformations as well. */ int -rt_submodel_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_submodel_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_submodel_internal *sip; struct bu_vls str; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); RT_CK_DBI(dbip); @@ -959,6 +976,8 @@ struct rt_submodel_internal *sip; struct bu_vls str; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_SUBMODEL) return(-1); sip = (struct rt_submodel_internal *)ip->idb_ptr; @@ -968,7 +987,7 @@ #endif /* Ignores scale factor */ - BU_ASSERT(local2mm == 1.0); + BU_ASSERT(NEAR_ZERO(local2mm - 1.0, SMALL_FASTF)); BU_CK_EXTERNAL(ep); bu_vls_init(&str); @@ -995,20 +1014,22 @@ * Additional lines are indented one tab, and give parameter values. */ int -rt_submodel_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) +rt_submodel_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local __attribute__((unused))) { - register struct rt_submodel_internal *sip = - (struct rt_submodel_internal *)ip->idb_ptr; + struct rt_submodel_internal *sip = (struct rt_submodel_internal *)ip->idb_ptr; RT_SUBMODEL_CK_MAGIC(sip); bu_vls_strcat(str, "instanced submodel (SUBMODEL)\n"); + if (!verbose) + return 0; + bu_vls_printf(str, "\tfile='%s', treetop='%s', meth=%d\n", bu_vls_addr(&sip->file), bu_vls_addr(&sip->treetop), sip->meth); - return(0); + return 0; } @@ -1020,7 +1041,7 @@ void rt_submodel_ifree(struct rt_db_internal *ip) { - register struct rt_submodel_internal *sip; + struct rt_submodel_internal *sip; RT_CK_DB_INTERNAL(ip); @@ -1038,8 +1059,11 @@ * */ int -rt_submodel_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_submodel_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2010-01-02 14:36:07 UTC (rev 37101) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2010-01-02 17:36:59 UTC (rev 37102) @@ -187,7 +187,7 @@ rt_superell_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip) { - register struct superell_specific *superell; + struct superell_specific *superell; struct rt_superell_internal *eip; fastf_t magsq_a, magsq_b, magsq_c; mat_t R, TEMP; @@ -333,9 +333,9 @@ * R T _ S U P E R E L L _ P R I N T */ void -rt_superell_print(register const struct soltab *stp) +rt_superell_print(const struct soltab *stp) { - register struct superell_specific *superell = + struct superell_specific *superell = (struct superell_specific *)stp->st_specific; VPRINT("V", superell->superell_V); @@ -359,11 +359,11 @@ * >0 HIT */ int -rt_superell_shot(struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead) +rt_superell_shot(struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead) { static int counter=10; - register struct superell_specific *superell = (struct superell_specific *)stp->st_specific; + struct superell_specific *superell = (struct superell_specific *)stp->st_specific; bn_poly_t equation; /* equation of superell to be solved */ vect_t translated; /* translated shot vector */ vect_t newShotPoint; /* P' */ @@ -371,8 +371,8 @@ vect_t normalizedShotPoint; /* P' with normalized dist from superell */ bn_complex_t complexRoot[4]; /* roots returned from poly solver */ double realRoot[4]; /* real ray distance values */ - register int i, j; - register struct seg *segp; + int i, j; + struct seg *segp; /* translate ray point */ /* VSUB2(translated, rp->r_pt, superell->superell_V); */ @@ -469,8 +469,8 @@ break; case 4: { - register short n; - register short lim; + short n; + short lim; /* Inline rt_pt_sort(). Sorts realRoot[] into descending order. */ for (lim = i-1; lim > 0; lim--) { @@ -522,14 +522,6 @@ return(4); /* HIT */ /* XXX END CUT */ - /* Is there any possibility of hitting another segment? Only when there - * is a concave curvature (<n, e> > <2.0, 2.0>). - */ - if ((superell->superell_n > 2.0) || (superell->superell_e > 2.0)) { - - } - - return 1; } @@ -539,9 +531,9 @@ * Given ONE ray distance, return the normal and entry/exit point. */ void -rt_superell_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +rt_superell_norm(struct hit *hitp, struct soltab *stp, struct xray *rp) { - register struct superell_specific *superell = + struct superell_specific *superell = (struct superell_specific *)stp->st_specific; vect_t xlated; @@ -563,8 +555,13 @@ * Return the curvature of the superellipsoid. */ void -rt_superell_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) +rt_superell_curve(struct curvature *cvp, struct hit *hitp, struct soltab *stp) { + if (!cvp || !hitp || !stp) + return; + RT_CK_HIT(hitp); + RT_CK_SOLTAB(stp); + bu_log("called rt_superell_curve!\n"); return; } @@ -579,8 +576,14 @@ * v = elevation */ void -rt_superell_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_superell_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { + if (ap) RT_CK_APPLICATION(ap); + if (!stp || !hitp || !uvp) + return; + RT_CK_SOLTAB(stp); + RT_CK_HIT(hitp); + bu_log("called rt_superell_uv!\n"); return; } @@ -590,9 +593,9 @@ * R T _ S U P E R E L L _ F R E E */ void -rt_superell_free(register struct soltab *stp) +rt_superell_free(struct soltab *stp) { - register struct superell_specific *superell = + struct superell_specific *superell = (struct superell_specific *)stp->st_specific; bu_free((char *)superell, "superell_specific"); @@ -613,8 +616,8 @@ */ #define SUPERELLOUT(n) ov+(n-1)*3 void -rt_superell_16pts(register fastf_t *ov, - register fastf_t *V, +rt_superell_16pts(fastf_t *ov, + fastf_t *V, fastf_t *A, fastf_t *B) { @@ -655,9 +658,9 @@ * R T _ S U P E R E L L _ P L O T */ int -rt_superell_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_superell_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol __attribute__((unused)), const struct bn_tol *tol __attribute__((unused))) { - register int i; + int i; struct rt_superell_internal *eip; fastf_t top[16*3]; fastf_t middle[16*3]; @@ -740,8 +743,12 @@ * 0 OK. *r points to nmgregion that holds this tesssuperellation. */ int -rt_superell_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_superell_tess(struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol __attribute__((unused)), const struct bn_tol *tol __attribute__((unused))) { + if (r) NMG_CK_REGION(*r); + if (m) NMG_CK_MODEL(m); + if (ip) RT_CK_DB_INTERNAL(ip); + bu_log("rt_superell_tess called!\n"); return -1; } @@ -754,12 +761,14 @@ * internal structure. Apply modeling transformations as wsuperell. */ int -rt_superell_import4(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_superell_import4(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_superell_internal *eip; union record *rp; fastf_t vec[3*4 + 2]; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); rp = (union record *)ep->ext_buf; /* Check record type */ @@ -801,6 +810,8 @@ struct rt_superell_internal *tip; union record *rec; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_SUPERELL) return(-1); tip = (struct rt_superell_internal *)ip->idb_ptr; @@ -836,11 +847,13 @@ * internal structure. Apply modeling transformations as wsuperell. */ int -rt_superell_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip) +rt_superell_import5(struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip) { struct rt_superell_internal *eip; fastf_t vec[ELEMENTS_PER_VECT*4 + 2]; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); BU_CK_EXTERNAL(ep); @@ -885,6 +898,8 @@ struct rt_superell_internal *eip; fastf_t vec[ELEMENTS_PER_VECT*4 + 2]; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_SUPERELL) return(-1); eip = (struct rt_superell_internal *)ip->idb_ptr; @@ -920,7 +935,7 @@ int rt_superell_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_superell_internal *tip = + struct rt_superell_internal *tip = (struct rt_superell_internal *)ip->idb_ptr; fastf_t mag_a, mag_b, mag_c; char buf[256]; @@ -1015,8 +1030,11 @@ * */ int -rt_superell_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_superell_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-01-02 18:24:12
|
Revision: 37106 http://brlcad.svn.sourceforge.net/brlcad/?rev=37106&view=rev Author: brlcad Date: 2010-01-02 18:24:03 +0000 (Sat, 02 Jan 2010) Log Message: ----------- !woo hoo! the last of the primitives, now all free of verbose warnings. added usual unused parameter checks and dequelled a couple exact floating point comparisons Modified Paths: -------------- brlcad/trunk/src/librt/primitives/tor/tor.c brlcad/trunk/src/librt/primitives/vol/vol.c Modified: brlcad/trunk/src/librt/primitives/tor/tor.c =================================================================== --- brlcad/trunk/src/librt/primitives/tor/tor.c 2010-01-02 18:11:54 UTC (rev 37105) +++ brlcad/trunk/src/librt/primitives/tor/tor.c 2010-01-02 18:24:03 UTC (rev 37106) @@ -833,7 +833,7 @@ register struct tor_specific *tor = (struct tor_specific *)stp->st_specific; vect_t w4, w5; - fastf_t nx, ny, nz, x1, y1, z1; + fastf_t nx, ny, nz, x_1, y_1, z_1; fastf_t d; nx = tor->tor_N[X]; @@ -844,26 +844,26 @@ VSUB2(w4, hitp->hit_point, tor->tor_V); if (!NEAR_ZERO(nz, 0.00001)) { - z1 = w4[Z]*nx*nx + w4[Z]*ny*ny - w4[X]*nx*nz - w4[Y]*ny*nz; - x1 = (nx*(z1-w4[Z])/nz) + w4[X]; - y1 = (ny*(z1-w4[Z])/nz) + w4[Y]; + z_1 = w4[Z]*nx*nx + w4[Z]*ny*ny - w4[X]*nx*nz - w4[Y]*ny*nz; + x_1 = (nx*(z_1-w4[Z])/nz) + w4[X]; + y_1 = (ny*(z_1-w4[Z])/nz) + w4[Y]; } else if (!NEAR_ZERO(ny, 0.00001)) { - y1 = w4[Y]*nx*nx + w4[Y]*nz*nz - w4[X]*nx*ny - w4[Z]*ny*nz; - x1 = (nx*(y1-w4[Y])/ny) + w4[X]; - z1 = (nz*(y1-w4[Y])/ny) + w4[Z]; + y_1 = w4[Y]*nx*nx + w4[Y]*nz*nz - w4[X]*nx*ny - w4[Z]*ny*nz; + x_1 = (nx*(y_1-w4[Y])/ny) + w4[X]; + z_1 = (nz*(y_1-w4[Y])/ny) + w4[Z]; } else { - x1 = w4[X]*ny*ny + w4[X]*nz*nz - w4[Y]*nx*ny - w4[Z]*nz*nx; - y1 = (ny*(x1-w4[X])/nx) + w4[Y]; - z1 = (nz*(x1-w4[X])/nx) + w4[Z]; + x_1 = w4[X]*ny*ny + w4[X]*nz*nz - w4[Y]*nx*ny - w4[Z]*nz*nx; + y_1 = (ny*(x_1-w4[X])/nx) + w4[Y]; + z_1 = (nz*(x_1-w4[X])/nx) + w4[Z]; } - d = sqrt(x1*x1 + y1*y1 + z1*z1); + d = sqrt(x_1*x_1 + y_1*y_1 + z_1*z_1); cvp->crv_c1 = (tor->tor_r1 - d) / (d * tor->tor_r2); cvp->crv_c2 = -1.0 / tor->tor_r2; - w4[X] = x1 / d; - w4[Y] = y1 / d; - w4[Z] = z1 / d; + w4[X] = x_1 / d; + w4[Y] = y_1 / d; + w4[Z] = z_1 / d; VCROSS(w5, tor->tor_N, w4); VCROSS(cvp->crv_pdir, w5, hitp->hit_normal); VUNITIZE(cvp->crv_pdir); @@ -874,15 +874,20 @@ * R T _ T O R _ U V */ void -rt_tor_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) +rt_tor_uv(struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp) { - register struct tor_specific *tor = - (struct tor_specific *) stp -> st_specific; + struct tor_specific *tor = (struct tor_specific *) stp -> st_specific; vect_t work; vect_t pprime; vect_t pprime2; fastf_t costheta; + if (ap) RT_CK_APPLICATION(ap); + if (stp) RT_CK_SOLTAB(stp); + if (!hitp || !uvp) + return; + RT_CK_HIT(hitp); + VSUB2(work, hitp -> hit_point, tor -> tor_V); MAT4X3VEC(pprime, tor -> tor_SoR, work); /* @@ -990,7 +995,7 @@ * ti.a, ti.b perpindicular, to CENTER of torus (for top, bottom) */ int -rt_tor_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_tor_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol __attribute__((unused))) { fastf_t alpha; fastf_t beta; @@ -1293,6 +1298,8 @@ vect_t axb; register fastf_t f; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); rp = (union record *)ep->ext_buf; /* Check record type */ @@ -1351,6 +1358,8 @@ double vec[2*3+2]; struct rt_tor_internal *tip; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_TOR) return -1; tip = (struct rt_tor_internal *)ip->idb_ptr; @@ -1389,6 +1398,8 @@ fastf_t r3, r4; double m2; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_TOR) return(-1); tip = (struct rt_tor_internal *)ip->idb_ptr; @@ -1484,6 +1495,8 @@ double rh; /* r2 */ } rec; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); BU_ASSERT_LONG(ep->ext_nbytes, ==, SIZEOF_NETWORK_DOUBLE * (2*3+2)); @@ -1608,8 +1621,11 @@ * */ int -rt_tor_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_tor_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } Modified: brlcad/trunk/src/librt/primitives/vol/vol.c =================================================================== --- brlcad/trunk/src/librt/primitives/vol/vol.c 2010-01-02 18:11:54 UTC (rev 37105) +++ brlcad/trunk/src/librt/primitives/vol/vol.c 2010-01-02 18:24:03 UTC (rev 37106) @@ -200,7 +200,7 @@ if (RT_G_DEBUG&DEBUG_VOL)bu_log("igrid=(%d, %d, %d)\n", igrid[X], igrid[Y], igrid[Z]); /* X setup */ - if (rp->r_dir[X] == 0.0) { + if (NEAR_ZERO(rp->r_dir[X], SMALL_FASTF)) { t[X] = INFINITY; delta[X] = 0; } else { @@ -211,7 +211,7 @@ delta[X] = volp->vol_i.cellsize[X] * fabs(invdir[X]); } /* Y setup */ - if (rp->r_dir[Y] == 0.0) { + if (NEAR_ZERO(rp->r_dir[Y], SMALL_FASTF)) { t[Y] = INFINITY; delta[Y] = 0; } else { @@ -222,7 +222,7 @@ delta[Y] = volp->vol_i.cellsize[Y] * fabs(invdir[Y]); } /* Z setup */ - if (rp->r_dir[Z] == 0.0) { + if (NEAR_ZERO(rp->r_dir[Z], SMALL_FASTF)) { t[Z] = INFINITY; delta[Z] = 0; } else { @@ -416,6 +416,8 @@ mat_t tmat; int ret; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); rp = (union record *)ep->ext_buf; if (rp->u_id != DBID_STRSOL) { @@ -511,6 +513,8 @@ union record *rec; struct bu_vls str; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_VOL) return(-1); vip = (struct rt_vol_internal *)ip->idb_ptr; @@ -556,6 +560,8 @@ mat_t tmat; int ret; + if (dbip) RT_CK_DBI(dbip); + BU_CK_EXTERNAL(ep); RT_CK_DB_INTERNAL(ip); @@ -645,6 +651,8 @@ struct rt_vol_internal vol; /* scaled version */ struct bu_vls str; + if (dbip) RT_CK_DBI(dbip); + RT_CK_DB_INTERNAL(ip); if (ip->idb_type != ID_VOL) return(-1); vip = (struct rt_vol_internal *)ip->idb_ptr; @@ -678,17 +686,19 @@ int rt_vol_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local) { - register struct rt_vol_internal *vip = - (struct rt_vol_internal *)ip->idb_ptr; + struct rt_vol_internal *vip = (struct rt_vol_internal *)ip->idb_ptr; register int i; struct bu_vls substr; vect_t local; RT_VOL_CK_MAGIC(vip); - VSCALE(local, vip->cellsize, mm2local) - bu_vls_strcat(str, "thresholded volumetric solid (VOL)\n\t"); + VSCALE(local, vip->cellsize, mm2local); + bu_vls_strcat(str, "thresholded volumetric solid (VOL)\n\t"); + if (!verbose) + return 0; + /* bu_vls_struct_print(str, rt_vol_parse, (char *)vip); bu_vls_strcat(str, "\n"); */ @@ -708,7 +718,7 @@ bu_vls_free(&substr); - return(0); + return 0; } @@ -757,6 +767,9 @@ vect_t diam; vect_t small1; + RT_CK_SOLTAB(stp); + RT_CK_DB_INTERNAL(ip); + if (rtip) RT_CK_RTI(rtip); vip = (struct rt_vol_internal *)ip->idb_ptr; RT_VOL_CK_MAGIC(vip); @@ -871,8 +884,10 @@ void rt_vol_curve(register struct curvature *cvp, register struct hit *hitp, struct soltab *stp) { -/* register struct rt_vol_specific *volp = - (struct rt_vol_specific *)stp->st_specific; */ + if (!cvp || !hitp) + return; + RT_CK_HIT(hitp); + if (stp) RT_CK_SOLTAB(stp); bn_vec_ortho(cvp->crv_pdir, hitp->hit_normal); cvp->crv_c1 = cvp->crv_c2 = 0; @@ -888,8 +903,11 @@ void rt_vol_uv(struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp) { -/* register struct rt_vol_specific *volp = - (struct rt_vol_specific *)stp->st_specific;*/ + if (ap) RT_CK_APPLICATION(ap); + if (stp) RT_CK_SOLTAB(stp); + if (hitp) RT_CK_SOLTAB(stp); + if (!uvp) + return; /* XXX uv should be xy in ideal space */ } @@ -920,7 +938,7 @@ * R T _ V O L _ P L O T */ int -rt_vol_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol) +rt_vol_plot(struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol __attribute__((unused)), const struct bn_tol *tol __attribute__((unused))) { register struct rt_vol_internal *vip; register short x, y, z; @@ -1295,8 +1313,11 @@ * */ int -rt_vol_params(struct pc_pc_set * ps, const struct rt_db_internal *ip) +rt_vol_params(struct pc_pc_set *ps, const struct rt_db_internal *ip) { + ps = ps; /* quellage */ + if (ip) RT_CK_DB_INTERNAL(ip); + return(0); /* OK */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eri...@us...> - 2010-01-05 19:45:18
|
Revision: 37131 http://brlcad.svn.sourceforge.net/brlcad/?rev=37131&view=rev Author: erikgreenwald Date: 2010-01-05 19:44:53 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Quell some "unitialized variable" warnings. (now let's see what breaks at runtime!) Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/arbn/arbn.c brlcad/trunk/src/librt/primitives/ars/ars.c brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_class.c brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c brlcad/trunk/src/librt/primitives/nmg/nmg_info.c brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c brlcad/trunk/src/librt/primitives/pipe/pipe.c brlcad/trunk/src/librt/primitives/revolve/revolve.c brlcad/trunk/src/librt/primitives/sketch/sketch.c brlcad/trunk/src/librt/primitives/tgc/tgc.c Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -1926,7 +1926,7 @@ plane_t planes[6], const struct bn_tol *tol) { - int pt1, pt2, bp1, bp2, newp, p1, p2, p3; + int pt1 = 0, pt2 = 0, bp1, bp2, newp, p1, p2, p3; short *edptr; /* pointer to arb edit array */ short *final; /* location of points to redo */ int i; Modified: brlcad/trunk/src/librt/primitives/arbn/arbn.c =================================================================== --- brlcad/trunk/src/librt/primitives/arbn/arbn.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/arbn/arbn.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -365,6 +365,9 @@ point_t a, b; /* start and end points */ vect_t dist; + VSETALL(a, 0); + VSETALL(b, 0); + /* If normals are parallel, no intersection */ dot = VDOT(aip->eqn[i], aip->eqn[j]); if (BN_VECT_ARE_PARALLEL(dot, tol)) continue; Modified: brlcad/trunk/src/librt/primitives/ars/ars.c =================================================================== --- brlcad/trunk/src/librt/primitives/ars/ars.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/ars/ars.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -152,6 +152,8 @@ vect_t base_vect; int currec; + VSETALL(base_vect, 0); + if (dbip) RT_CK_DBI(dbip); BU_CK_EXTERNAL(ep); Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -1778,8 +1778,8 @@ bu_ptbl_init(&loops, 5, "loops"); for (i=0; i<crv->seg_count; i++) { genptr_t cur_seg; - int loop_start, loop_end; - int seg_start, seg_end; + int loop_start = 0, loop_end = 0; + int seg_start = 0, seg_end = 0; if (used_seg[i]) continue; Modified: brlcad/trunk/src/librt/primitives/hf/hf.c =================================================================== --- brlcad/trunk/src/librt/primitives/hf/hf.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/hf/hf.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -734,6 +734,8 @@ fastf_t in, out; vect_t aray, curloc; + VSETALL(peqn, 0); + memset(hits, 0, sizeof(hits)); in = -INFINITY; Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -696,6 +696,9 @@ struct rt_pt_node *rt_ptalloc(void); fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); + MAT_ZERO(invRoS); + MAT_ZERO(SoR); + RT_CK_DB_INTERNAL(ip); iip = (struct rt_hyp_internal *)ip->idb_ptr; RT_HYP_CK_MAGIC(iip); @@ -1118,7 +1121,6 @@ NMG_CK_VERTEX_G(vg); VSUB2(tmp_pt, vg->coord, xip->hyp_V); - /* Fix me. SoR and invRoS have not been initialized before using */ MAT4X3VEC(pt_prime, SoR, tmp_pt); VSET(tmp_vect, pt_prime[X]*(2*cprime+1), pt_prime[Y]*(2*cprime+1), -(pt_prime[Z]+cprime+1)); MAT4X3VEC(norm, invRoS, tmp_vect); Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -133,7 +133,7 @@ /* and add all the contribution */ for (BU_LIST_FOR(mbpt2, wdb_metaballpt, points)) if (mbpt2 != mbpt) { - fastf_t additive; + fastf_t additive = 0.0; VSUB2(d, mbpt2->coord, mbpt->coord); mag = MAGNITUDE(d) + dist; Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -67,11 +67,13 @@ * decimated, perhaps? */ /* convert intersect to vertices */ + p = p; if ((fu=nmg_cmface(s, corners, 3)) == (struct faceuse *)NULL) { bu_log("rt_metaball_tess() nmg_cmface() failed\n"); return -1; } + return -1; } /** @@ -130,8 +132,6 @@ for (k = min[Z]; k<max[Z]; k+=mtol) { point_t p[8]; int pv = 0; - int pvbc; /* bit count */ - struct faceuse *fu; #define MEH(c,di,dj,dk) VSET(p[c], i+di, j+dj, k+dk); pv |= rt_metaball_point_inside((const point_t *)&p[c], mb) << c; MEH(0, 0, 0, 0); @@ -144,7 +144,10 @@ MEH(7, mtol, mtol, mtol); #undef MET if ( pv != 0 && pv != 255 ) - rt_metaball_realize_cube(s, mb, finalstep, pv, (point_t **)&p, mtol); + if(rt_metaball_realize_cube(s, mb, finalstep, pv, (point_t **)&p, mtol) == -1) { + bu_log("Error attempting to realize a cube O.o\n"); + return -1; + } } rt_get_timer(×, NULL); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_class.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_class.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_class.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -628,7 +628,7 @@ long *faces_seen = NULL; vect_t region_diagonal; fastf_t region_diameter; - int class; + int class = 0; vect_t projection_dir; int try=0; struct xray rp; Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -568,6 +568,8 @@ int ret; register int i; + VSETALL(heading, 0); + NMG_CK_EDGEUSE(eu); NMG_CK_RAYSTATE(rs); BN_CK_TOL(rs->tol); @@ -2738,7 +2740,7 @@ int prior_end; int next_start, next_end; int i; - int index1, index2; + int index1 = 0, index2 = 0; while (rs->vu[prior_start]->v_p == prev_v) prior_start++; Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_info.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_info.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_info.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -1354,6 +1354,8 @@ vect_t other_edge; int other_edge_is_parallel=1; + VSETALL(other_edge, 0); + bu_log("WARNING: eu x%x (%f %f %f) parallel to normal (%f %f %f)\n", eu, V3ARGS(edgevect), V3ARGS(Norm)); eu_next = eu; Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -6441,6 +6441,8 @@ vect_t i_dir, j_dir; fastf_t dist[2]; + VSETALLN(pl, 0, 4); + BN_CK_TOL(tol); if (i_fus->fu[1]) @@ -7190,6 +7192,8 @@ int count; long *flags; + VSETALL(e_dir, 0); + if (rt_g.NMG_debug & DEBUG_BASIC) bu_log("nmg_move_edge_thru_pt(mv_eu=x%x, pt=(%f %f %f))\n", mv_eu, V3ARGS(pt)); @@ -9088,6 +9092,9 @@ int ncoords = 0; int i; + VSETALL(v1, 0); + VSETALL(v2, 0); + BN_CK_TOL(tol); VMOVE(start, i_start) @@ -9824,6 +9831,8 @@ plane_t base_pl; vect_t plv_1, plv_2; + VSETALL(base_pl, 0); + NMG_CK_MODEL(m); BN_CK_TOL(tol); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -357,6 +357,8 @@ double distA, distB; int code, status; + VSETALL(pca_to_pole_vect, 0); + /* find the points of closest approach * There are six distinct return values from bn_dist_pt3_lseg3(): * @@ -1838,6 +1840,8 @@ point_t hit; fastf_t dist; + VSETALL(hit, 0); + srf = BU_LIST_FIRST(face_g_snurb, &bezier); BU_LIST_DEQUEUE(&srf->l); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -2478,6 +2478,8 @@ char db_name[32]; + VSETALL(N, 0); + BN_CK_TOL(tol); NMG_CK_FACEUSE(fu); Modified: brlcad/trunk/src/librt/primitives/pipe/pipe.c =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/pipe/pipe.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -609,7 +609,7 @@ fastf_t or2_sq; /* outside radius squared (from adjacent seg) */ fastf_t ir2_sq; /* inside radius squared (from adjacent seg) */ int parallel; /* set to one when ray is parallel to plane of bend */ - fastf_t dist; /* distance between ray and plane of bend */ + fastf_t dist = 0; /* distance between ray and plane of bend */ fastf_t tmp; struct id_pipe *prev; struct id_pipe *next; Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -710,7 +710,7 @@ bn_poly_t answer; /* {f(y) + g(y)/(2cx)}^2 - g(y) */ bn_complex_t roots[4]; - fastf_t cx, cy, crsq; /* carc's (x, y) coords and radius^2 */ + fastf_t cx, cy, crsq = 0; /* carc's (x, y) coords and radius^2 */ point2d_t center, radius; /* calculate circle parameters */ Modified: brlcad/trunk/src/librt/primitives/sketch/sketch.c =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/sketch/sketch.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -504,6 +504,10 @@ fastf_t radius; vect_t norm; + VSETALL(semi_a, 0); + VSETALL(semi_b, 0); + VSETALL(center, 0); + lng = (long *)seg; switch (*lng) { case CURVE_LSEG_MAGIC: Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c =================================================================== --- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2010-01-05 18:41:18 UTC (rev 37130) +++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2010-01-05 19:44:53 UTC (rev 37131) @@ -921,6 +921,9 @@ bn_poly_t Xsqr, Ysqr; bn_poly_t R, Rsqr; + VSETALLN(k, 0, 4); + VSETALLN(pt, 0, 2); + if (ap) RT_CK_APPLICATION(ap); /* Allocate space for polys and roots */ @@ -1953,6 +1956,11 @@ int i; + VSETALL(unit_a, 0); + VSETALL(unit_b, 0); + VSETALL(unit_c, 0); + VSETALL(unit_d, 0); + RT_CK_DB_INTERNAL(ip); tip = (struct rt_tgc_internal *)ip->idb_ptr; RT_TGC_CK_MAGIC(tip); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eri...@us...> - 2010-01-13 22:21:25
|
Revision: 37248 http://brlcad.svn.sourceforge.net/brlcad/?rev=37248&view=rev Author: erikgreenwald Date: 2010-01-13 22:21:18 +0000 (Wed, 13 Jan 2010) Log Message: ----------- migrate cube+edgeset into nmg_tri_mc.c, tweak function signature Modified Paths: -------------- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-01-13 21:44:53 UTC (rev 37247) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-01-13 22:21:18 UTC (rev 37248) @@ -44,37 +44,11 @@ #include "metaball.h" -static int bitcount(unsigned char w) { return (w==0) ? 0 : bitcount(w>>1) + (w|1); } +extern int mc_edges[256]; -static int -rt_metaball_realize_cube(struct shell *s, struct rt_metaball_internal *mb, fastf_t finalstep, int pv, point_t **p, fastf_t mtol) -{ - int pvbc; - struct vertex **corners[3]; - struct faceuse *fu; +/* TODO: make a real header entry once the signature is good... */ +int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t **p, fastf_t *edges); - pvbc = bitcount(pv); - if (pvbc==1) { - point_t a, b, mid; - rt_metaball_find_intersection(&mid, mb, (const point_t *)&a, (const point_t *)&*b, mtol, finalstep); - bu_log("Intersect between %f, %f, %f and %f, %f, %f is at %f, %f, %f\n", V3ARGS(a), V3ARGS(b), V3ARGS(mid)); - } - /* should the actual surface intersection be searched for, or - * just say the mid point is good enough? */ - - /* needs to be stitched into a triangle style NMG. Then - * decimated, perhaps? */ - - /* convert intersect to vertices */ - p = p; - - if ((fu=nmg_cmface(s, corners, 3)) == (struct faceuse *)NULL) { - bu_log("rt_metaball_tess() nmg_cmface() failed\n"); - return -1; - } - return -1; -} - /** * R T _ M E T A B A L L _ T E S S * @@ -130,6 +104,7 @@ for (j = min[Y]; j<max[Y]; j+=mtol) for (k = min[Z]; k<max[Z]; k+=mtol) { point_t p[8]; + fastf_t edge[12]; int pv = 0; #define MEH(c,di,dj,dk) VSET(p[c], i+di, j+dj, k+dk); pv |= rt_metaball_point_inside((const point_t *)&p[c], mb) << c; @@ -142,11 +117,18 @@ MEH(6, mtol, mtol, 0); MEH(7, mtol, mtol, mtol); #undef MET - if ( pv != 0 && pv != 255 ) - if(rt_metaball_realize_cube(s, mb, finalstep, pv, (point_t **)&p, mtol) == -1) { + if ( pv != 0 && pv != 255 ) { /* entire cube is either inside or outside */ + int r; + fastf_t edges[12]; + bu_log("%x\n", mc_edges[pv]); + /* + rt_metaball_find_intersection(&mid, mb, (const point_t *)&a, (const point_t *)&*b, mtol, finalstep); + */ + if(rt_nmg_mc_realize_cube(s, pv, (point_t **)&p, edges) == -1) { bu_log("Error attempting to realize a cube O.o\n"); return -1; } + } } rt_get_timer(×, NULL); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-01-13 21:44:53 UTC (rev 37247) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-01-13 22:21:18 UTC (rev 37248) @@ -72,7 +72,7 @@ * Grid definition matches SIGGRAPH 1987 p 164 (original presentation of technique) */ -static int mc_edges[256]={ +int mc_edges[256]={ 0x000,0x109,0x203,0x30a,0x406,0x50f,0x605,0x70c, 0x80c,0x905,0xa0f,0xb06,0xc0a,0xd03,0xe09,0xf00, 0x190,0x099,0x393,0x29a,0x596,0x49f,0x795,0x69c, @@ -106,7 +106,7 @@ 0xf00,0xe09,0xd03,0xc0a,0xb06,0xa0f,0x905,0x80c, 0x70c,0x605,0x50f,0x406,0x30a,0x203,0x109,0x000}; -static int mc_tris[256][16] = +int mc_tris[256][16] = {{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, @@ -358,7 +358,36 @@ +static int bitcount(unsigned char w) { return (w==0) ? 0 : bitcount(w>>1) + (w|1); } +int +rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t **p, fastf_t *edges) +{ + int pvbc; + struct vertex **corners[3]; + struct faceuse *fu; + + pvbc = bitcount(pv); + if (pvbc==1) { + /* + point_t a, b, mid; + bu_log("Intersect between %f, %f, %f and %f, %f, %f is at %f, %f, %f\n", V3ARGS(a), V3ARGS(b), V3ARGS(mid)); + */ + } + + /* needs to be stitched into a triangle style NMG. Then + * decimated, perhaps? */ + + /* convert intersect to vertices */ + p = p; + + if ((fu=nmg_cmface(s, corners, 3)) == (struct faceuse *)NULL) { + bu_log("rt_metaball_tess() nmg_cmface() failed\n"); + return -1; + } + return -1; +} + void nmg_triangulate_model_mc(struct model *m, const struct bn_tol *tol) { @@ -369,7 +398,6 @@ if (rt_g.NMG_debug & DEBUG_TRI) bu_log("Triangulating NMG\n"); - if (rt_g.NMG_debug & DEBUG_TRI) bu_log("Triangulation completed\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eri...@us...> - 2010-01-14 16:17:10
|
Revision: 37250 http://brlcad.svn.sourceforge.net/brlcad/?rev=37250&view=rev Author: erikgreenwald Date: 2010-01-14 16:16:43 +0000 (Thu, 14 Jan 2010) Log Message: ----------- some (untested) edge solving for marching cubes Modified Paths: -------------- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-01-14 14:32:27 UTC (rev 37249) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-01-14 16:16:43 UTC (rev 37250) @@ -47,7 +47,7 @@ extern int mc_edges[256]; /* TODO: make a real header entry once the signature is good... */ -int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t **p, fastf_t *edges); +int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges); /** * R T _ M E T A B A L L _ T E S S @@ -95,6 +95,7 @@ *r = nmg_mrsv(m); /* new empty nmg */ s = BU_LIST_FIRST(shell, &(*r)->s_hd); + bu_log("Booyeah!\n"); /* the incredibly na\xEFve approach. Time could be cut in half by simply * caching 4 point values, more by actually marching or doing active @@ -104,9 +105,9 @@ for (j = min[Y]; j<max[Y]; j+=mtol) for (k = min[Z]; k<max[Z]; k+=mtol) { point_t p[8]; - fastf_t edge[12]; int pv = 0; + /* generate the vertex values */ #define MEH(c,di,dj,dk) VSET(p[c], i+di, j+dj, k+dk); pv |= rt_metaball_point_inside((const point_t *)&p[c], mb) << c; MEH(0, 0, 0, 0); MEH(1, 0, 0, mtol); @@ -116,15 +117,28 @@ MEH(5, mtol, 0, mtol); MEH(6, mtol, mtol, 0); MEH(7, mtol, mtol, mtol); -#undef MET +#undef MEH + if ( pv != 0 && pv != 255 ) { /* entire cube is either inside or outside */ - int r; - fastf_t edges[12]; - bu_log("%x\n", mc_edges[pv]); - /* - rt_metaball_find_intersection(&mid, mb, (const point_t *)&a, (const point_t *)&*b, mtol, finalstep); - */ - if(rt_nmg_mc_realize_cube(s, pv, (point_t **)&p, edges) == -1) { + point_t edges[12]; + + /* compute the edge values (if needed) */ +#define MEH(a,b,c) if(!(pv&(1<<b)&&pv&(1<<c))) rt_metaball_find_intersection(edges+a, mb, (const point_t *)(p+b), (const point_t *)(p+c), mtol, finalstep); + MEH(0 ,0,1); + MEH(1 ,1,2); + MEH(2 ,2,3); + MEH(3 ,0,3); + MEH(4 ,4,5); + MEH(5 ,5,6); + MEH(6 ,6,7); + MEH(7 ,4,7); + MEH(8 ,0,4); + MEH(9 ,1,5); + MEH(10,2,6); + MEH(11,3,7); +#undef MEH + + if(rt_nmg_mc_realize_cube(s, pv, (point_t *)p, (point_t *)edges) == -1) { bu_log("Error attempting to realize a cube O.o\n"); return -1; } @@ -141,8 +155,6 @@ return -1; } - - /* * Local Variables: * mode: C Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-01-14 14:32:27 UTC (rev 37249) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-01-14 16:16:43 UTC (rev 37250) @@ -33,7 +33,7 @@ * [X] asc-g * [X] g-asc * [ ] regression shtuff (on hold; regress/ has issues) - * [ ] edge solve cubes + * [X] edge solve cubes * [X] write compiled table shtuff (use existing table, the hex/index one?) * [ ] produce NMG mesh * ============================================================ @@ -361,7 +361,7 @@ static int bitcount(unsigned char w) { return (w==0) ? 0 : bitcount(w>>1) + (w|1); } int -rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t **p, fastf_t *edges) +rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges) { int pvbc; struct vertex **corners[3]; @@ -369,6 +369,7 @@ pvbc = bitcount(pv); if (pvbc==1) { + bu_log("Huh, pvbc = 1\n"); /* point_t a, b, mid; bu_log("Intersect between %f, %f, %f and %f, %f, %f is at %f, %f, %f\n", V3ARGS(a), V3ARGS(b), V3ARGS(mid)); @@ -380,6 +381,7 @@ /* convert intersect to vertices */ p = p; + return 0; if ((fu=nmg_cmface(s, corners, 3)) == (struct faceuse *)NULL) { bu_log("rt_metaball_tess() nmg_cmface() failed\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-01-20 04:35:16
|
Revision: 37333 http://brlcad.svn.sourceforge.net/brlcad/?rev=37333&view=rev Author: brlcad Date: 2010-01-20 04:35:08 +0000 (Wed, 20 Jan 2010) Log Message: ----------- add a slew of validation checks on the vhead parameter (independent of the checks done by the macro when adding to the list) Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/arbn/arbn.c brlcad/trunk/src/librt/primitives/ars/ars.c brlcad/trunk/src/librt/primitives/bot/bot.c brlcad/trunk/src/librt/primitives/brep/brep.cpp brlcad/trunk/src/librt/primitives/bspline/bspline.cpp brlcad/trunk/src/librt/primitives/cline/cline.c brlcad/trunk/src/librt/primitives/dsp/dsp.c brlcad/trunk/src/librt/primitives/ebm/ebm.c brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/ell/ell.c brlcad/trunk/src/librt/primitives/epa/epa.c brlcad/trunk/src/librt/primitives/eto/eto.c brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/nmg/nmg.c brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c brlcad/trunk/src/librt/primitives/part/part.c brlcad/trunk/src/librt/primitives/pipe/pipe.c brlcad/trunk/src/librt/primitives/pnts/pnts.c brlcad/trunk/src/librt/primitives/poly/poly.c brlcad/trunk/src/librt/primitives/revolve/revolve.c brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/sketch/sketch.c brlcad/trunk/src/librt/primitives/submodel/submodel.c brlcad/trunk/src/librt/primitives/superell/superell.c brlcad/trunk/src/librt/primitives/tgc/tgc.c brlcad/trunk/src/librt/primitives/tor/tor.c brlcad/trunk/src/librt/primitives/vol/vol.c brlcad/trunk/src/librt/primitives/xxx/xxx.c Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1111,6 +1111,7 @@ { struct rt_arb_internal *aip; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); aip = (struct rt_arb_internal *)ip->idb_ptr; RT_ARB_CK_MAGIC(aip); Modified: brlcad/trunk/src/librt/primitives/arbn/arbn.c =================================================================== --- brlcad/trunk/src/librt/primitives/arbn/arbn.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/arbn/arbn.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -354,6 +354,7 @@ int j; int k; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); aip = (struct rt_arbn_internal *)ip->idb_ptr; RT_ARBN_CK_MAGIC(aip); Modified: brlcad/trunk/src/librt/primitives/ars/ars.c =================================================================== --- brlcad/trunk/src/librt/primitives/ars/ars.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/ars/ars.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1158,6 +1158,7 @@ register int j; struct rt_ars_internal *arip; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); arip = (struct rt_ars_internal *)ip->idb_ptr; RT_ARS_CK_MAGIC(arip); Modified: brlcad/trunk/src/librt/primitives/bot/bot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/bot/bot.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -452,6 +452,7 @@ struct rt_bot_internal *bot_ip; int i; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); bot_ip = (struct rt_bot_internal *)ip->idb_ptr; RT_BOT_CK_MAGIC(bot_ip); @@ -476,6 +477,7 @@ struct rt_bot_internal *bot_ip; int i; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); bot_ip = (struct rt_bot_internal *)ip->idb_ptr; RT_BOT_CK_MAGIC(bot_ip); Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/brep/brep.cpp 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/brep/brep.cpp 2010-01-20 04:35:08 UTC (rev 37333) @@ -2240,6 +2240,8 @@ void plot_bbnode(BBNode* node, struct bu_list* vhead, int depth, int start, int limit) { + BU_CK_LIST_HEAD(vhead); + ON_3dPoint min = node->m_node.m_min; ON_3dPoint max = node->m_node.m_max; point_t verts[] = {{min[0], min[1], min[2]}, @@ -2337,6 +2339,7 @@ struct rt_brep_internal* bi; int i; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); bi = (struct rt_brep_internal*)ip->idb_ptr; RT_BREP_CK_MAGIC(bi); Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2010-01-20 04:35:08 UTC (rev 37333) @@ -644,6 +644,7 @@ { struct rt_nurb_internal *sip; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); sip = (struct rt_nurb_internal *) ip->idb_ptr; RT_NURB_CK_MAGIC(sip); Modified: brlcad/trunk/src/librt/primitives/cline/cline.c =================================================================== --- brlcad/trunk/src/librt/primitives/cline/cline.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/cline/cline.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -452,6 +452,7 @@ fastf_t inner_radius; int i; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); cline_ip = (struct rt_cline_internal *)ip->idb_ptr; RT_CLINE_CK_MAGIC(cline_ip); Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -3113,6 +3113,7 @@ if (RT_G_DEBUG & DEBUG_HF) bu_log("rt_dsp_plot()\n"); + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); RT_DSP_CK_MAGIC(dsp_ip); Modified: brlcad/trunk/src/librt/primitives/ebm/ebm.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/ebm/ebm.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1104,6 +1104,7 @@ point_t s, p; point_t srot, prot; + BU_CK_LIST_HEAD(vhead); VSET(s, x_1, y_1, 0.0); MAT4X3PNT(srot, mat, s); RT_ADD_VLIST(vhead, srot, BN_VLIST_LINE_MOVE); @@ -1135,6 +1136,7 @@ register int following; register int base; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); eip = (struct rt_ebm_internal *)ip->idb_ptr; RT_EBM_CK_MAGIC(eip); Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -647,6 +647,7 @@ struct rt_pt_node *rt_ptalloc(void); fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); xip = (struct rt_ehy_internal *)ip->idb_ptr; RT_EHY_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/ell/ell.c =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/ell/ell.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -633,6 +633,7 @@ fastf_t middle[16*3]; fastf_t bottom[16*3]; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); eip = (struct rt_ell_internal *)ip->idb_ptr; RT_ELL_CK_MAGIC(eip); Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -631,10 +631,8 @@ struct rt_pt_node *rt_ptalloc(void); fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); -#ifndef NO_MAGIC_CHECKING + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); -#endif - xip = (struct rt_epa_internal *)ip->idb_ptr; RT_EPA_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/eto/eto.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/eto/eto.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -747,6 +747,7 @@ struct rt_eto_internal *tip; vect_t Au, Bu, Nu, Cp, Dp, Xu; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); tip = (struct rt_eto_internal *)ip->idb_ptr; RT_ETO_CK_MAGIC(tip); Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1119,6 +1119,7 @@ int i1, i2, nused1, nused2; struct bn_vlist *vp1, *vp2, *vp2_start; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); extrude_ip = (struct rt_extrude_internal *)ip->idb_ptr; RT_EXTRUDE_CK_MAGIC(extrude_ip); Modified: brlcad/trunk/src/librt/primitives/grip/grip.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/grip/grip.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -232,6 +232,7 @@ vect_t y_1, y_2; vect_t tip; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); gip = (struct rt_grip_internal *)ip->idb_ptr; RT_GRIP_CK_MAGIC(gip); Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/half/half.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -439,6 +439,7 @@ vect_t y_1, y_2; vect_t tip; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); hip = (struct rt_half_internal *)ip->idb_ptr; RT_HALF_CK_MAGIC(hip); Modified: brlcad/trunk/src/librt/primitives/hf/hf.c =================================================================== --- brlcad/trunk/src/librt/primitives/hf/hf.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/hf/hf.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1596,6 +1596,7 @@ int half_step; int goal; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); xip = (struct rt_hf_internal *)ip->idb_ptr; RT_HF_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -581,6 +581,7 @@ fastf_t cos22_5 = 0.9238795325112867385; fastf_t cos67_5 = 0.3826834323650898373; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(incoming); hyp_in = (struct rt_hyp_internal *)incoming->idb_ptr; RT_HYP_CK_MAGIC(hyp_in); Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -533,6 +533,8 @@ point_t a, b, c; int i; + BU_CK_LIST_HEAD(vhead); + VSET(a, radius, 0, 0); VSET(b, 0, radius, 0); VSET(c, 0, 0, radius); @@ -560,6 +562,7 @@ point_t bsc; fastf_t rad; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); mb = (struct rt_metaball_internal *)ip->idb_ptr; RT_METABALL_CK_MAGIC(mb); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/nmg/nmg.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -324,6 +324,7 @@ { struct model *m; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); m = (struct model *)ip->idb_ptr; NMG_CK_MODEL(m); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -77,6 +77,7 @@ struct vertex *v; register struct vertex_g *vg; + BU_CK_LIST_HEAD(vhead); NMG_CK_VERTEXUSE(vu); v = vu->v_p; NMG_CK_VERTEX(v); @@ -105,6 +106,8 @@ register struct vertex_g *vg; register struct vertex_g *vgmate; + BU_CK_LIST_HEAD(vhead); + /* Consider all the edges in the wire edge list */ for (BU_LIST_FOR(eu, edgeuse, eu_hd)) { /* This wire edge runs from vertex to mate's vertex */ @@ -359,6 +362,7 @@ register struct loopuse *lu; vect_t normal; + BU_CK_LIST_HEAD(vhead); NMG_CK_SHELL(s); /* faces */ @@ -415,6 +419,7 @@ { register struct shell *s; + BU_CK_LIST_HEAD(vhead); NMG_CK_REGION(r); for (BU_LIST_FOR(s, shell, &r->s_hd)) { nmg_s_to_vlist(vhead, s, poly_markers); @@ -430,6 +435,7 @@ { register struct nmgregion *r; + BU_CK_LIST_HEAD(vhead); NMG_CK_MODEL(m); for (BU_LIST_FOR(r, nmgregion, &m->r_hd)) { NMG_CK_REGION(r); Modified: brlcad/trunk/src/librt/primitives/part/part.c =================================================================== --- brlcad/trunk/src/librt/primitives/part/part.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/part/part.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -948,6 +948,7 @@ vect_t Hunit; register int i; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); pip = (struct rt_part_internal *)ip->idb_ptr; RT_PART_CK_MAGIC(pip); Modified: brlcad/trunk/src/librt/primitives/pipe/pipe.c =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/pipe/pipe.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1550,6 +1550,8 @@ point_t pt; int i; + BU_CK_LIST_HEAD(vhead); + if (!full_circle) { VSUB2(to_end, end, center); arc_angle = atan2(VDOT(to_end, v2), VDOT(to_end, v1)); @@ -1581,6 +1583,8 @@ { point_t pt; + BU_CK_LIST_HEAD(vhead); + VJOIN1(pt, p1, or1, v1); RT_ADD_VLIST(vhead, pt, BN_VLIST_LINE_MOVE); VJOIN1(pt, p2, or2, v1); @@ -1631,6 +1635,8 @@ mat_t mat; vect_t tmp_norm; + BU_CK_LIST_HEAD(vhead); + VREVERSE(tmp_norm, norm); bn_mat_arb_rot(mat, center, tmp_norm, angle); MAT4X3VEC(tmp_vec, mat, f1); @@ -1716,6 +1722,7 @@ point_t current_point; vect_t f1, f2, f3; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); pip = (struct rt_pipe_internal *)ip->idb_ptr; RT_PIPE_CK_MAGIC(pip); Modified: brlcad/trunk/src/librt/primitives/pnts/pnts.c =================================================================== --- brlcad/trunk/src/librt/primitives/pnts/pnts.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/pnts/pnts.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -690,6 +690,7 @@ double scale; point_t a, b; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(internal); pnts = (struct rt_pnts_internal *)internal->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/poly/poly.c =================================================================== --- brlcad/trunk/src/librt/primitives/poly/poly.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/poly/poly.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -485,6 +485,7 @@ int p; /* current polygon number */ struct rt_pg_internal *pgp; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); pgp = (struct rt_pg_internal *)ip->idb_ptr; RT_PG_CK_MAGIC(pgp); @@ -516,6 +517,7 @@ int p; /* current polygon number */ struct rt_pg_internal *pgp; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); pgp = (struct rt_pg_internal *)ip->idb_ptr; RT_PG_CK_MAGIC(pgp); Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1095,11 +1095,12 @@ struct curve *crv; vect_t ell[16], cir[16], ucir[16], height, xdir, ydir, ux, uy, uz, rEnd, xEnd, yEnd; - fastf_t cos22_5 = 0.9238795325112867385, - cos67_5 = 0.3826834323650898373; + fastf_t cos22_5 = 0.9238795325112867385; + fastf_t cos67_5 = 0.3826834323650898373; int *endcount; point_t add, add2, add3; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); rip = (struct rt_revolve_internal *)ip->idb_ptr; RT_REVOLVE_CK_MAGIC(rip); Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -678,6 +678,7 @@ struct rt_rhc_internal *xip; struct rt_pt_node *old, *pos, *pts, *rt_ptalloc(void); + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); xip = (struct rt_rhc_internal *)ip->idb_ptr; RT_RHC_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -643,6 +643,7 @@ struct rt_pt_node *old, *pos, *pts; vect_t Bu, Hu, Ru; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); xip = (struct rt_rpc_internal *)ip->idb_ptr; RT_RPC_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/sketch/sketch.c =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/sketch/sketch.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -504,6 +504,8 @@ fastf_t radius; vect_t norm; + BU_CK_LIST_HEAD(vhead); + VSETALL(semi_a, 0); VSETALL(semi_b, 0); VSETALL(center, 0); @@ -886,6 +888,8 @@ int seg_no; int ret=0; + BU_CK_LIST_HEAD(vhead); + if (bu_debug&BU_DEBUG_MEM_CHECK) { bu_log("Barrier check at start of curve_to_vlist():\n"); bu_mem_barriercheck(); @@ -914,6 +918,7 @@ int ret; int myret=0; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); sketch_ip = (struct rt_sketch_internal *)ip->idb_ptr; RT_SKETCH_CK_MAGIC(sketch_ip); Modified: brlcad/trunk/src/librt/primitives/submodel/submodel.c =================================================================== --- brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -718,6 +718,7 @@ char *argv[2]; struct goodies good; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); sip = (struct rt_submodel_internal *)ip->idb_ptr; RT_SUBMODEL_CK_MAGIC(sip); Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -666,6 +666,7 @@ fastf_t middle[16*3]; fastf_t bottom[16*3]; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); eip = (struct rt_superell_internal *)ip->idb_ptr; RT_SUPERELL_CK_MAGIC(eip); Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c =================================================================== --- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1799,6 +1799,7 @@ fastf_t bottom[16*3]; vect_t work; /* Vec addition work area */ + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); tip = (struct rt_tgc_internal *)ip->idb_ptr; RT_TGC_CK_MAGIC(tip); Modified: brlcad/trunk/src/librt/primitives/tor/tor.c =================================================================== --- brlcad/trunk/src/librt/primitives/tor/tor.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/tor/tor.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -1013,6 +1013,7 @@ vect_t edge; fastf_t rel; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); tip = (struct rt_tor_internal *)ip->idb_ptr; RT_TOR_CK_MAGIC(tip); Modified: brlcad/trunk/src/librt/primitives/vol/vol.c =================================================================== --- brlcad/trunk/src/librt/primitives/vol/vol.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/vol/vol.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -945,6 +945,7 @@ register short v1, v2; point_t a, b, c, d; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); vip = (struct rt_vol_internal *)ip->idb_ptr; RT_VOL_CK_MAGIC(vip); @@ -1040,6 +1041,8 @@ point_t s; /* scaled original point */ point_t arot, prot; + BU_CK_LIST_HEAD(vhead); + VELMUL(s, vip->cellsize, a); MAT4X3PNT(arot, mat, s); RT_ADD_VLIST(vhead, arot, BN_VLIST_LINE_MOVE); Modified: brlcad/trunk/src/librt/primitives/xxx/xxx.c =================================================================== --- brlcad/trunk/src/librt/primitives/xxx/xxx.c 2010-01-20 03:06:51 UTC (rev 37332) +++ brlcad/trunk/src/librt/primitives/xxx/xxx.c 2010-01-20 04:35:08 UTC (rev 37333) @@ -251,7 +251,7 @@ { struct rt_xxx_internal *xxx_ip; - if (!vhead) return -1; + BU_CK_LIST_HEAD(vhead); RT_CK_DB_INTERNAL(ip); xxx_ip = (struct rt_xxx_internal *)ip->idb_ptr; RT_XXX_CK_MAGIC(xxx_ip); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2010-02-02 20:08:54
|
Revision: 37526 http://brlcad.svn.sourceforge.net/brlcad/?rev=37526&view=rev Author: bob1961 Date: 2010-02-02 20:08:38 +0000 (Tue, 02 Feb 2010) Log Message: ----------- The cast to long is now part of the bu_offsetof definition. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/dsp/dsp.c brlcad/trunk/src/librt/primitives/ebm/ebm.c brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/ell/ell.c brlcad/trunk/src/librt/primitives/epa/epa.c brlcad/trunk/src/librt/primitives/eto/eto.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/part/part.c brlcad/trunk/src/librt/primitives/revolve/revolve.h brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/superell/superell.c brlcad/trunk/src/librt/primitives/tgc/tgc.c brlcad/trunk/src/librt/primitives/tor/tor.c brlcad/trunk/src/librt/primitives/vol/vol.c Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -128,14 +128,14 @@ const struct bu_structparse rt_arb_parse[] = { - { "%f", 3, "V1", (long)bu_offsetof(struct rt_arb_internal, pt[0][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V2", (long)bu_offsetof(struct rt_arb_internal, pt[1][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V3", (long)bu_offsetof(struct rt_arb_internal, pt[2][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V4", (long)bu_offsetof(struct rt_arb_internal, pt[3][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V5", (long)bu_offsetof(struct rt_arb_internal, pt[4][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V6", (long)bu_offsetof(struct rt_arb_internal, pt[5][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V7", (long)bu_offsetof(struct rt_arb_internal, pt[6][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "V8", (long)bu_offsetof(struct rt_arb_internal, pt[7][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V1", bu_offsetof(struct rt_arb_internal, pt[0][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V2", bu_offsetof(struct rt_arb_internal, pt[1][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V3", bu_offsetof(struct rt_arb_internal, pt[2][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V4", bu_offsetof(struct rt_arb_internal, pt[3][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V5", bu_offsetof(struct rt_arb_internal, pt[4][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V6", bu_offsetof(struct rt_arb_internal, pt[5][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V7", bu_offsetof(struct rt_arb_internal, pt[6][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V8", bu_offsetof(struct rt_arb_internal, pt[7][X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -271,7 +271,7 @@ {"%i", 1, "sm", DSP_O(dsp_smooth), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "w", DSP_O(dsp_xcnt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "n", DSP_O(dsp_ycnt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 16, "stom", (long)DSP_AO(dsp_stom), hook_mtos_from_stom, NULL, NULL }, + {"%f", 16, "stom", DSP_AO(dsp_stom), hook_mtos_from_stom, NULL, NULL }, {"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; @@ -282,7 +282,7 @@ {"%i", 1, "sm", DSP_O(dsp_smooth), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "w", DSP_O(dsp_xcnt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "n", DSP_O(dsp_ycnt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 16, "stom", (long)DSP_AO(dsp_stom), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", 16, "stom", DSP_AO(dsp_stom), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; @@ -4638,7 +4638,7 @@ {"%d", 1, "n", DSP_O(dsp_ycnt), hook_verify, NULL, NULL }, {"%i", 1, "sm", DSP_O(dsp_smooth), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%c", 1, "cut", DSP_O(dsp_cuttype), hook_verify, NULL, NULL }, - {"%f", 16, "stom", (long)DSP_AO(dsp_stom), hook_verify, NULL, NULL }, + {"%f", 16, "stom", DSP_AO(dsp_stom), hook_verify, NULL, NULL }, {"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/ebm/ebm.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/ebm/ebm.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -63,11 +63,11 @@ #define RT_EBM_O(m) bu_offsetof(struct rt_ebm_internal, m) const struct bu_structparse rt_ebm_parse[] = { - {"%s", RT_EBM_NAME_LEN, "file", (long)bu_offsetofarray(struct rt_ebm_internal, file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%s", RT_EBM_NAME_LEN, "file", bu_offsetofarray(struct rt_ebm_internal, file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "w", RT_EBM_O(xdim), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "n", RT_EBM_O(ydim), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%f", 1, "d", RT_EBM_O(tallness), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 16, "mat", (long)bu_offsetofarray(struct rt_ebm_internal, mat), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", 16, "mat", bu_offsetofarray(struct rt_ebm_internal, mat), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -174,9 +174,9 @@ const struct bu_structparse rt_ehy_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_ehy_internal, ehy_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_ehy_internal, ehy_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "A", (long)bu_offsetof(struct rt_ehy_internal, ehy_Au[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_ehy_internal, ehy_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_ehy_internal, ehy_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "A", bu_offsetof(struct rt_ehy_internal, ehy_Au[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_1", bu_offsetof(struct rt_ehy_internal, ehy_r1), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_2", bu_offsetof(struct rt_ehy_internal, ehy_r2), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "c", bu_offsetof(struct rt_ehy_internal, ehy_c), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, Modified: brlcad/trunk/src/librt/primitives/ell/ell.c =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/ell/ell.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -45,10 +45,10 @@ struct rt_i *rtip)); const struct bu_structparse rt_ell_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_ell_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "A", (long)bu_offsetof(struct rt_ell_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "B", (long)bu_offsetof(struct rt_ell_internal, b[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "C", (long)bu_offsetof(struct rt_ell_internal, c[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_ell_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "A", bu_offsetof(struct rt_ell_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "B", bu_offsetof(struct rt_ell_internal, b[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "C", bu_offsetof(struct rt_ell_internal, c[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -173,9 +173,9 @@ const struct bu_structparse rt_epa_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_epa_internal, epa_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_epa_internal, epa_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "A", (long)bu_offsetof(struct rt_epa_internal, epa_Au[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_epa_internal, epa_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_epa_internal, epa_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "A", bu_offsetof(struct rt_epa_internal, epa_Au[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_1", bu_offsetof(struct rt_epa_internal, epa_r1), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_2", bu_offsetof(struct rt_epa_internal, epa_r2), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/eto/eto.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/eto/eto.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -139,9 +139,9 @@ const struct bu_structparse rt_eto_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_eto_internal, eto_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "N", (long)bu_offsetof(struct rt_eto_internal, eto_N[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "C", (long)bu_offsetof(struct rt_eto_internal, eto_C[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_eto_internal, eto_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "N", bu_offsetof(struct rt_eto_internal, eto_N[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "C", bu_offsetof(struct rt_eto_internal, eto_C[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r", bu_offsetof(struct rt_eto_internal, eto_r), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_d", bu_offsetof(struct rt_eto_internal, eto_rd), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/grip/grip.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/grip/grip.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -56,8 +56,8 @@ #define GRIP_NULL ((struct grip_specific *)0) const struct bu_structparse rt_grp_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_grip_internal, center[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "N", (long)bu_offsetof(struct rt_grip_internal, normal[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_grip_internal, center[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "N", bu_offsetof(struct rt_grip_internal, normal[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "L", bu_offsetof(struct rt_grip_internal, mag), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/half/half.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -59,8 +59,8 @@ #define HALF_NULL ((struct half_specific *)0) const struct bu_structparse rt_hlf_parse[] = { - { "%f", 3, "N", (long)bu_offsetof(struct rt_half_internal, eqn[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 1, "d", (long)bu_offsetof(struct rt_half_internal, eqn[W]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "N", bu_offsetof(struct rt_half_internal, eqn[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 1, "d", bu_offsetof(struct rt_half_internal, eqn[W]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/hf/hf.c =================================================================== --- brlcad/trunk/src/librt/primitives/hf/hf.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/hf/hf.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -64,16 +64,16 @@ /* All fields valid in string solid */ const struct bu_structparse rt_hf_parse[] = { - {"%s", 128, "cfile", (long)bu_offsetofarray(struct rt_hf_internal, cfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, - {"%s", 128, "dfile", (long)bu_offsetofarray(struct rt_hf_internal, dfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, - {"%s", 8, "fmt", (long)bu_offsetofarray(struct rt_hf_internal, fmt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%s", 128, "cfile", bu_offsetofarray(struct rt_hf_internal, cfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%s", 128, "dfile", bu_offsetofarray(struct rt_hf_internal, dfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%s", 8, "fmt", bu_offsetofarray(struct rt_hf_internal, fmt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, {"%d", 1, "w", HF_O(w), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "n", HF_O(n), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "shorts", HF_O(shorts), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%f", 1, "file2mm", HF_O(file2mm), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 3, "v", (long)HF_O(v[0]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 3, "x", (long)HF_O(x[0]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 3, "y", (long)HF_O(y[0]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", 3, "v", HF_O(v[0]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", 3, "x", HF_O(x[0]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", 3, "y", HF_O(y[0]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%f", 1, "xlen", HF_O(xlen), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%f", 1, "ylen", HF_O(ylen), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%f", 1, "zscale", HF_O(zscale), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, @@ -81,8 +81,8 @@ }; /* Subset of fields found in cfile */ const struct bu_structparse rt_hf_cparse[] = { - {"%s", 128, "dfile", (long)bu_offsetofarray(struct rt_hf_internal, dfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, - {"%s", 8, "fmt", (long)bu_offsetofarray(struct rt_hf_internal, fmt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%s", 128, "dfile", bu_offsetofarray(struct rt_hf_internal, dfile), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%s", 8, "fmt", bu_offsetofarray(struct rt_hf_internal, fmt), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, {"%d", 1, "w", HF_O(w), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "n", HF_O(n), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "shorts", HF_O(shorts), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -103,9 +103,9 @@ const struct bu_structparse rt_hyp_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_hyp_internal, hyp_Vi[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_hyp_internal, hyp_Hi[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "A", (long)bu_offsetof(struct rt_hyp_internal, hyp_A[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_hyp_internal, hyp_Vi[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_hyp_internal, hyp_Hi[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "A", bu_offsetof(struct rt_hyp_internal, hyp_A[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "b", bu_offsetof(struct rt_hyp_internal, hyp_b), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "bnr", bu_offsetof(struct rt_hyp_internal, hyp_bnr), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/part/part.c =================================================================== --- brlcad/trunk/src/librt/primitives/part/part.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/part/part.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -212,8 +212,8 @@ #define RT_PARTICLE_SURF_HSPHERE 3 const struct bu_structparse rt_part_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_part_internal, part_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_part_internal, part_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_part_internal, part_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_part_internal, part_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_v", bu_offsetof(struct rt_part_internal, part_vrad), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r_h", bu_offsetof(struct rt_part_internal, part_hrad), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.h =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve.h 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/revolve/revolve.h 2010-02-02 20:08:38 UTC (rev 37526) @@ -25,9 +25,9 @@ const struct bu_structparse rt_revolve_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_revolve_internal, v3d[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "axis", (long)bu_offsetof(struct rt_revolve_internal, axis3d[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "R", (long)bu_offsetof(struct rt_revolve_internal, r[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_revolve_internal, v3d[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "axis", bu_offsetof(struct rt_revolve_internal, axis3d[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "R", bu_offsetof(struct rt_revolve_internal, r[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "ang", bu_offsetof(struct rt_revolve_internal, ang), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%V", 1, "sk_name", bu_offsetof(struct rt_revolve_internal, sketch_name), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -189,9 +189,9 @@ const struct bu_structparse rt_rhc_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_rhc_internal, rhc_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_rhc_internal, rhc_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "B", (long)bu_offsetof(struct rt_rhc_internal, rhc_B[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_rhc_internal, rhc_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_rhc_internal, rhc_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "B", bu_offsetof(struct rt_rhc_internal, rhc_B[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r", bu_offsetof(struct rt_rhc_internal, rhc_r), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "c", bu_offsetof(struct rt_rhc_internal, rhc_c), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -185,9 +185,9 @@ const struct bu_structparse rt_rpc_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_rpc_internal, rpc_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_rpc_internal, rpc_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "B", (long)bu_offsetof(struct rt_rpc_internal, rpc_B[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_rpc_internal, rpc_V[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_rpc_internal, rpc_H[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "B", bu_offsetof(struct rt_rpc_internal, rpc_B[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "r", bu_offsetof(struct rt_rpc_internal, rpc_r), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -47,10 +47,10 @@ const struct bu_structparse rt_superell_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_superell_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "A", (long)bu_offsetof(struct rt_superell_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "B", (long)bu_offsetof(struct rt_superell_internal, b[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "C", (long)bu_offsetof(struct rt_superell_internal, c[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_superell_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "A", bu_offsetof(struct rt_superell_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "B", bu_offsetof(struct rt_superell_internal, b[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "C", bu_offsetof(struct rt_superell_internal, c[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "n", bu_offsetof(struct rt_superell_internal, n), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 1, "e", bu_offsetof(struct rt_superell_internal, e), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c =================================================================== --- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -76,12 +76,12 @@ #define ALPHA(x, y, c, d) ((x)*(x)*(c) + (y)*(y)*(d)) const struct bu_structparse rt_tgc_parse[] = { - { "%f", 3, "V", (long)bu_offsetof(struct rt_tgc_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "H", (long)bu_offsetof(struct rt_tgc_internal, h[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "A", (long)bu_offsetof(struct rt_tgc_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "B", (long)bu_offsetof(struct rt_tgc_internal, b[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "C", (long)bu_offsetof(struct rt_tgc_internal, c[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - { "%f", 3, "D", (long)bu_offsetof(struct rt_tgc_internal, d[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "V", bu_offsetof(struct rt_tgc_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "H", bu_offsetof(struct rt_tgc_internal, h[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "A", bu_offsetof(struct rt_tgc_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "B", bu_offsetof(struct rt_tgc_internal, b[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "C", bu_offsetof(struct rt_tgc_internal, c[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + { "%f", 3, "D", bu_offsetof(struct rt_tgc_internal, d[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { {'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; Modified: brlcad/trunk/src/librt/primitives/tor/tor.c =================================================================== --- brlcad/trunk/src/librt/primitives/tor/tor.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/tor/tor.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -134,8 +134,8 @@ */ const struct bu_structparse rt_tor_parse[] = { - {"%f", 3, "V", (long)bu_offsetof(struct rt_tor_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, - {"%f", 3, "H", (long)bu_offsetof(struct rt_tor_internal, h[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%f", 3, "V", bu_offsetof(struct rt_tor_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, + {"%f", 3, "H", bu_offsetof(struct rt_tor_internal, h[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, {"%f", 1, "r_a", bu_offsetof(struct rt_tor_internal, r_a), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, {"%f", 1, "r_h", bu_offsetof(struct rt_tor_internal, r_h), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL}, {{'\0', '\0', '\0', '\0'}, 0, (char *)NULL, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL} Modified: brlcad/trunk/src/librt/primitives/vol/vol.c =================================================================== --- brlcad/trunk/src/librt/primitives/vol/vol.c 2010-02-02 18:14:00 UTC (rev 37525) +++ brlcad/trunk/src/librt/primitives/vol/vol.c 2010-02-02 20:08:38 UTC (rev 37526) @@ -65,14 +65,14 @@ #define VOL_O(m) bu_offsetof(struct rt_vol_internal, m) const struct bu_structparse rt_vol_parse[] = { - {"%s", RT_VOL_NAME_LEN, "file", (long)bu_offsetofarray(struct rt_vol_internal, file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%s", RT_VOL_NAME_LEN, "file", bu_offsetofarray(struct rt_vol_internal, file), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "w", VOL_O(xdim), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "n", VOL_O(ydim), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "d", VOL_O(zdim), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "lo", VOL_O(lo), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"%d", 1, "hi", VOL_O(hi), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", ELEMENTS_PER_VECT, "size", (long)bu_offsetofarray(struct rt_vol_internal, cellsize), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, - {"%f", 16, "mat", (long)bu_offsetofarray(struct rt_vol_internal, mat), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", ELEMENTS_PER_VECT, "size", bu_offsetofarray(struct rt_vol_internal, cellsize), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, + {"%f", 16, "mat", bu_offsetofarray(struct rt_vol_internal, mat), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, {"", 0, (char *)0, 0, BU_STRUCTPARSE_FUNC_NULL, NULL, NULL } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eri...@us...> - 2010-02-08 20:55:02
|
Revision: 37602 http://brlcad.svn.sourceforge.net/brlcad/?rev=37602&view=rev Author: erikgreenwald Date: 2010-02-08 20:54:34 +0000 (Mon, 08 Feb 2010) Log Message: ----------- solve normals for edge hits and pass them to the cube realizer Modified Paths: -------------- brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/metaball/metaball.h brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-02-08 20:23:18 UTC (rev 37601) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-02-08 20:54:34 UTC (rev 37602) @@ -422,44 +422,47 @@ return retval; } - -/** - * R T _ M E T A B A L L _ N O R M - * - * Given ONE ray distance, return the normal and entry/exit point. - */ -void -rt_metaball_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +inline void +rt_metaball_norm_internal(vect_t *n, point_t *p, struct rt_metaball_internal *mb) { - struct rt_metaball_internal *mb = stp->st_specific; struct wdb_metaballpt *mbpt; vect_t v; fastf_t a; - if (rp) RT_CK_RAY(rp); + VSETALL(*n, 0.0); - VSETALL(hitp->hit_normal, 0.0); - switch (mb->method) { case METABALL_METABALL: bu_log("Sorry, strict metaballs are not yet implemented\n"); break; case METABALL_ISOPOTENTIAL: for (BU_LIST_FOR(mbpt, wdb_metaballpt, &mb->metaball_ctrl_head)) { - VSUB2(v, hitp->hit_point, mbpt->coord); + VSUB2(v, *p, mbpt->coord); a = MAGSQ(v); - VJOIN1(hitp->hit_normal, hitp->hit_normal, fabs(mbpt->fldstr)*mbpt->fldstr / (SQ(a)), v); /* f/r^4 */ + VJOIN1(*n, *n, fabs(mbpt->fldstr)*mbpt->fldstr / (SQ(a)), v); /* f/r^4 */ } break; case METABALL_BLOB: for (BU_LIST_FOR(mbpt, wdb_metaballpt, &mb->metaball_ctrl_head)) { - VSUB2(v, hitp->hit_point, mbpt->coord); + VSUB2(v, *p, mbpt->coord); a = MAGSQ(v); - VJOIN1(hitp->hit_normal, hitp->hit_normal, 2.0*mbpt->sweat/SQ(mbpt->fldstr)*exp(mbpt->sweat*(1-(a/SQ(mbpt->fldstr)))) , v); + VJOIN1(*n, *n, 2.0*mbpt->sweat/SQ(mbpt->fldstr)*exp(mbpt->sweat*(1-(a/SQ(mbpt->fldstr)))) , v); } break; default: bu_log("unknown metaball method\n"); break; } - VUNITIZE(hitp->hit_normal); + VUNITIZE(*n); +} + +/** + * R T _ M E T A B A L L _ N O R M + * + * Given ONE ray distance, return the normal and entry/exit point. + */ +void +rt_metaball_norm(register struct hit *hitp, struct soltab *stp, register struct xray *rp) +{ + if (rp) RT_CK_RAY(rp); /* unused. */ + rt_metaball_norm_internal(&(hitp->hit_normal), &(hitp->hit_point), (struct rt_metaball_internal *)(stp->st_specific)); return; } Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.h =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.h 2010-02-08 20:23:18 UTC (rev 37601) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.h 2010-02-08 20:54:34 UTC (rev 37602) @@ -21,6 +21,7 @@ void rt_metaball_set_bbox(point_t center, fastf_t radius, point_t *min, point_t *max); fastf_t rt_metaball_get_bounding_sphere(point_t *center, fastf_t threshold, struct rt_metaball_internal *mb); int rt_metaball_find_intersection(point_t *intersect, const struct rt_metaball_internal *mb, const point_t *a, const point_t *b, fastf_t step, const fastf_t finalstep); +void rt_metaball_norm_internal(vect_t *n, point_t *p, struct rt_metaball_internal *mb); /* * Local Variables: Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-02-08 20:23:18 UTC (rev 37601) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-02-08 20:54:34 UTC (rev 37602) @@ -65,7 +65,7 @@ extern int mc_edges[256]; /* TODO: make a real header entry once the signature is good... */ -int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, const struct bn_tol *tol); +int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, vect_t *normals, const struct bn_tol *tol); /** * R T _ M E T A B A L L _ T E S S @@ -139,10 +139,13 @@ if ( pv != 0 && pv != 255 ) { /* entire cube is either inside or outside */ point_t edges[12]; + vect_t n[12]; int rval; /* compute the edge values (if needed) */ -#define MEH(a,b,c) if(!(pv&(1<<b)&&pv&(1<<c))) rt_metaball_find_intersection(edges+a, mb, (const point_t *)(p+b), (const point_t *)(p+c), mtol, finalstep); +#define MEH(a,b,c) if(!(pv&(1<<b)&&pv&(1<<c))) { \ + rt_metaball_find_intersection(edges+a, mb, (const point_t *)(p+b), (const point_t *)(p+c), mtol, finalstep); \ + rt_metaball_norm_internal(n+a, p+a, mb); } /* magic numbers! an edge, then the two attached vertices. * For edge/vertex mapping, refer to the awesome ascii art * at the beginning of this file. */ @@ -160,7 +163,7 @@ MEH(11,3,7); #undef MEH - rval = rt_nmg_mc_realize_cube(s, pv, (point_t *)p, (point_t *)edges, tol); + rval = rt_nmg_mc_realize_cube(s, pv, (point_t *)p, (point_t *)edges, (vect_t *)n, tol); numtri += rval; if(rval < 0) { bu_log("Error attempting to realize a cube O.o\n"); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-02-08 20:23:18 UTC (rev 37601) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-02-08 20:54:34 UTC (rev 37602) @@ -372,7 +372,7 @@ /* returns the number of triangles added or -1 on failure */ int -rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, const struct bn_tol *tol) +rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, vect_t *normals, const struct bn_tol *tol) { int *vi, fo; struct faceuse *fu; @@ -408,6 +408,7 @@ fu = nmg_cmface(s, f_vertl, 3); + normals = normals; nmg_vertex_gv(vertl[0], edges[vi[0]]); nmg_vertex_gv(vertl[1], edges[vi[1]]); nmg_vertex_gv(vertl[2], edges[vi[2]]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eri...@us...> - 2010-02-25 01:22:31
|
Revision: 37755 http://brlcad.svn.sourceforge.net/brlcad/?rev=37755&view=rev Author: erikgreenwald Date: 2010-02-25 00:48:31 +0000 (Thu, 25 Feb 2010) Log Message: ----------- don't try to push normals to NMG generation shtuff... Modified Paths: -------------- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-02-24 23:02:44 UTC (rev 37754) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-02-25 00:48:31 UTC (rev 37755) @@ -65,7 +65,7 @@ extern int mc_edges[256]; /* TODO: make a real header entry once the signature is good... */ -int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, vect_t *normals, const struct bn_tol *tol); +int rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, const struct bn_tol *tol); /** * R T _ M E T A B A L L _ T E S S @@ -139,13 +139,15 @@ if ( pv != 0 && pv != 255 ) { /* entire cube is either inside or outside */ point_t edges[12]; - vect_t n[12]; int rval; /* compute the edge values (if needed) */ #define MEH(a,b,c) if(!(pv&(1<<b)&&pv&(1<<c))) { \ rt_metaball_find_intersection(edges+a, mb, (const point_t *)(p+b), (const point_t *)(p+c), mtol, finalstep); \ +} +#if 0 rt_metaball_norm_internal(n+a, p+a, mb); } +#endif /* magic numbers! an edge, then the two attached vertices. * For edge/vertex mapping, refer to the awesome ascii art * at the beginning of this file. */ @@ -163,7 +165,7 @@ MEH(11,3,7); #undef MEH - rval = rt_nmg_mc_realize_cube(s, pv, (point_t *)p, (point_t *)edges, (vect_t *)n, tol); + rval = rt_nmg_mc_realize_cube(s, pv, (point_t *)p, (point_t *)edges, tol); numtri += rval; if(rval < 0) { bu_log("Error attempting to realize a cube O.o\n"); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-02-24 23:02:44 UTC (rev 37754) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-02-25 00:48:31 UTC (rev 37755) @@ -334,7 +334,7 @@ /* returns the number of triangles added or -1 on failure */ int -rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, vect_t *normals, const struct bn_tol *tol) +rt_nmg_mc_realize_cube(struct shell *s, int pv, point_t *p, point_t *edges, const struct bn_tol *tol) { int *vi, fo; struct faceuse *fu; @@ -370,7 +370,6 @@ fu = nmg_cmface(s, f_vertl, 3); - normals = normals; nmg_vertex_gv(vertl[0], edges[vi[0]]); nmg_vertex_gv(vertl[1], edges[vi[1]]); nmg_vertex_gv(vertl[2], edges[vi[2]]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eri...@us...> - 2010-04-15 17:15:24
|
Revision: 38582 http://brlcad.svn.sourceforge.net/brlcad/?rev=38582&view=rev Author: erikgreenwald Date: 2010-04-15 17:15:17 +0000 (Thu, 15 Apr 2010) Log Message: ----------- use correct vertex/edge graphic in comments. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-04-15 14:20:43 UTC (rev 38581) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2010-04-15 17:15:17 UTC (rev 38582) @@ -23,22 +23,19 @@ * * Tesselation/facetization routines for the metaball primitive. * - * - * - * * Here be magic. * * * 4 * 4-----------5 - * 7/| 5/| - * / | 6 / | - * 7-----------6 |9 - * | |8 | | - * | | 0 10| | - * 11| 0--------|--1 + * 8/| 9/| + * / | 0 / | + * 0-----------1 |5 + * | |7 | | + * | | 6 1| | + * 3| 7--------|--6 * | / | / - * |/3 |/1 + * |/11 |/10 * 3-----------2 * 2 */ Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-04-15 14:20:43 UTC (rev 38581) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2010-04-15 17:15:17 UTC (rev 38582) @@ -24,6 +24,21 @@ * Triangulate the faces of a polygonal NMG using the marching cubes * algorithm. * + * + * Vertex and edge indices (note that it seems rotated 90 degrees from the stuff + * you see on the sources. They used OpenGL coordinates, we use BRL-CAD.) + * 4 + * 4-----------5 + * 8/| 9/| + * / | 0 / | + * 0-----------1 |5 + * | |7 | | + * | | 6 1| | + * 3| 7--------|--6 + * | / | / + * |/11 |/10 + * 3-----------2 + * 2 */ /** @} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-05-18 03:53:03
|
Revision: 39272 http://brlcad.svn.sourceforge.net/brlcad/?rev=39272&view=rev Author: brlcad Date: 2010-05-18 03:52:57 +0000 (Tue, 18 May 2010) Log Message: ----------- fix edguse vs edgeuse typo Modified Paths: -------------- brlcad/trunk/src/librt/primitives/generic.c brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c Modified: brlcad/trunk/src/librt/primitives/generic.c =================================================================== --- brlcad/trunk/src/librt/primitives/generic.c 2010-05-18 03:48:38 UTC (rev 39271) +++ brlcad/trunk/src/librt/primitives/generic.c 2010-05-18 03:52:57 UTC (rev 39272) @@ -83,7 +83,7 @@ } break; case 5: - avs.magic = -1; + avs.magic = 0; if (rt_functab[id].ft_export5(&ext, ip, 1.0, dbip, resp) < 0) { bu_log("rt_generic_xform(): %s export failure\n", Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2010-05-18 03:48:38 UTC (rev 39271) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2010-05-18 03:52:57 UTC (rev 39272) @@ -2516,7 +2516,7 @@ } /* now eliminate loop from table */ - eu_used = (struct edgeuse **)bu_calloc(loop_size, sizeof(struct edguse *), "edges used list"); + eu_used = (struct edgeuse **)bu_calloc(loop_size, sizeof(struct edgeuse *), "edges used list"); for (i=0; i<loop_size; i++) eu_used[i] = (struct edgeuse *)BU_PTBL_GET(&eu_tbl, idx[i]); @@ -2598,7 +2598,7 @@ bu_ptbl_ins(&vert_tbl, (long *)&eu2->eumate_p->vu_p->v_p); /* save list of used edges to be removed later */ - eu_used = (struct edgeuse **)bu_calloc(edges_used, sizeof(struct edguse *), "edges used list"); + eu_used = (struct edgeuse **)bu_calloc(edges_used, sizeof(struct edgeuse *), "edges used list"); for (i=0; i<edges_used; i++) eu_used[i] = (struct edgeuse *)BU_PTBL_GET(&eu_tbl, idx[i]); @@ -4229,7 +4229,7 @@ if (fu->orientation != OT_SAME) bu_bomb("First face in shell has no OT_SAME uses!!!!\n"); - /* put all edguses of first faceuse on the stack */ + /* put all edgeuses of first faceuse on the stack */ for (BU_LIST_FOR (lu, loopuse, &fu->lu_hd)) { NMG_CK_LOOPUSE(lu); if (BU_LIST_FIRST_MAGIC(&lu->down_hd) != NMG_EDGEUSE_MAGIC) @@ -9449,7 +9449,7 @@ goto not_arb; - /* Make sure shell is convex by checking that edguses + /* Make sure shell is convex by checking that edgeuses * run in direction fu_norm X norm_radial */ NMG_GET_FU_NORMAL(norm_radial, fu_radial); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c 2010-05-18 03:48:38 UTC (rev 39271) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c 2010-05-18 03:52:57 UTC (rev 39272) @@ -1533,7 +1533,7 @@ if (BU_LIST_IS_EMPTY(&lu1->down_hd)) ret = 1; } else if (*eu1->up.magic_p == NMG_SHELL_MAGIC) { if (eu1->up.s_p != eu2->up.s_p) { - bu_bomb("nmg_keu() edguses don't share parent shell\n"); + bu_bomb("nmg_keu() edgeuses don't share parent shell\n"); } /* unlink edgeuses from the parent shell */ Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c 2010-05-18 03:48:38 UTC (rev 39271) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c 2010-05-18 03:52:57 UTC (rev 39272) @@ -1429,7 +1429,7 @@ for (BU_LIST_FOR(eu, edgeuse, &lu->down_hd)) { if (eu->e_p == e_p) { if (rt_g.NMG_debug & DEBUG_PT_FU) - bu_log("skipping edguse (%g %g %g) -> (%g %g %g) on \"except\" edge\n", + bu_log("skipping edgeuse (%g %g %g) -> (%g %g %g) on \"except\" edge\n", V3ARGS(eu->vu_p->v_p->vg_p->coord), V3ARGS(eu->eumate_p->vu_p->v_p->vg_p->coord)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-05-25 12:33:20
|
Revision: 39459 http://brlcad.svn.sourceforge.net/brlcad/?rev=39459&view=rev Author: brlcad Date: 2010-05-25 12:33:13 +0000 (Tue, 25 May 2010) Log Message: ----------- remove the usages of RT_CLASSIFY_* either replacing with the BN_CLASSIFY_* counterpart or removing outright. expand the rt_*_class() functions to the full prototype even though they're going to get ripped out. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/bot/bot.c brlcad/trunk/src/librt/primitives/brep/brep.cpp brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/submodel/submodel.c Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-05-25 12:31:10 UTC (rev 39458) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2010-05-25 12:33:13 UTC (rev 39459) @@ -1136,18 +1136,17 @@ if (arbp == (struct arb_specific *)0) { bu_log("arb(%s): no faces\n", stp->st_name); - return RT_CLASSIFY_UNIMPLEMENTED; + return BN_CLASSIFY_UNIMPLEMENTED; } for (i=0; i<arbp->arb_nmfaces; i++) { if (bn_hlf_class(arbp->arb_face[i].peqn, min, max, tol) == BN_CLASSIFY_OUTSIDE) - return RT_CLASSIFY_OUTSIDE; + return BN_CLASSIFY_OUTSIDE; } - /* We need to test for RT_CLASSIFY_INSIDE vs. RT_CLASSIFY_OVERLAPPING! - XXX Do this soon */ - return RT_CLASSIFY_UNIMPLEMENTED; /* let the caller assume the worst */ + /* FIXME: We need to test for BN_CLASSIFY_INSIDE vs. BN_CLASSIFY_OVERLAPPING! */ + return BN_CLASSIFY_UNIMPLEMENTED; /* let the caller assume the worst */ } Modified: brlcad/trunk/src/librt/primitives/bot/bot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot.c 2010-05-25 12:31:10 UTC (rev 39458) +++ brlcad/trunk/src/librt/primitives/bot/bot.c 2010-05-25 12:33:13 UTC (rev 39459) @@ -439,7 +439,7 @@ if (!min) return 0; if (!max) return 0; - return RT_CLASSIFY_UNIMPLEMENTED; + return 0; } Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/brep/brep.cpp 2010-05-25 12:31:10 UTC (rev 39458) +++ brlcad/trunk/src/librt/primitives/brep/brep.cpp 2010-05-25 12:33:13 UTC (rev 39459) @@ -2199,9 +2199,9 @@ * const struct bn_tol* tol) */ int -rt_brep_class() +rt_brep_class(const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) { - return RT_CLASSIFY_UNIMPLEMENTED; + return 0; } Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2010-05-25 12:31:10 UTC (rev 39458) +++ brlcad/trunk/src/librt/primitives/half/half.c 2010-05-25 12:33:13 UTC (rev 39459) @@ -399,23 +399,16 @@ * Classify this halfspace against a bounding RPP. Since this is an * infinite solid, it is very important that this function properly. * - * Returns - - * BN_CLASSIFY_INSIDE - * BN_CLASSIFY_OVERLAPPING - * BN_CLASSIFY_OUTSIDE */ int -rt_hlf_class(register const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) +rt_hlf_class(const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) { - register const struct half_specific *halfp = - (struct half_specific *)stp->st_specific; + if (stp) RT_CK_SOLTAB(stp); + if (tol) BN_CK_TOL(tol); + if (!min) return 0; + if (!max) return 0; - if (halfp == HALF_NULL) { - bu_log("half(%s): no data?\n", stp->st_name); - return 0; - } - - return bn_hlf_class(halfp->half_eqn, min, max, tol); + return 0; } Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-05-25 12:31:10 UTC (rev 39458) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2010-05-25 12:33:13 UTC (rev 39459) @@ -613,9 +613,14 @@ int -rt_metaball_class(void) +rt_metaball_class(const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) { - return RT_CLASSIFY_UNIMPLEMENTED; /* unused */ + if (stp) RT_CK_SOLTAB(stp); + if (tol) BN_CK_TOL(tol); + if (!min) return 0; + if (!max) return 0; + + return 0; } Modified: brlcad/trunk/src/librt/primitives/submodel/submodel.c =================================================================== --- brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-05-25 12:31:10 UTC (rev 39458) +++ brlcad/trunk/src/librt/primitives/submodel/submodel.c 2010-05-25 12:33:13 UTC (rev 39459) @@ -635,9 +635,14 @@ * R T _ S U B M O D E L _ C L A S S */ int -rt_submodel_class() +rt_submodel_class(const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol) { - return RT_CLASSIFY_UNIMPLEMENTED; + if (stp) RT_CK_SOLTAB(stp); + if (tol) BN_CK_TOL(tol); + if (!min) return 0; + if (!max) return 0; + + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sta...@us...> - 2011-01-04 16:57:13
|
Revision: 41931 http://brlcad.svn.sourceforge.net/brlcad/?rev=41931&view=rev Author: starseeker Date: 2011-01-04 16:57:07 +0000 (Tue, 04 Jan 2011) Log Message: ----------- Er yeah, also want the table updates that go with adding ft_brep... Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp brlcad/trunk/src/librt/primitives/table.c brlcad/trunk/src/librt/primitives/tor/tor_brep.cpp Modified: brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp 2011-01-04 16:55:29 UTC (rev 41930) +++ brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp 2011-01-04 16:57:07 UTC (rev 41931) @@ -40,7 +40,7 @@ * R T _ A R B 8 _ B R E P */ extern "C" void -rt_arb8_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) +rt_arb_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) { struct rt_db_internal *tmp_internal = (struct rt_db_internal *) bu_malloc(sizeof(struct rt_db_internal), "allocate structure"); RT_INIT_DB_INTERNAL(tmp_internal); Modified: brlcad/trunk/src/librt/primitives/table.c =================================================================== --- brlcad/trunk/src/librt/primitives/table.c 2011-01-04 16:55:29 UTC (rev 41930) +++ brlcad/trunk/src/librt/primitives/table.c 2011-01-04 16:57:07 UTC (rev 41931) @@ -56,6 +56,7 @@ BU_EXTERN(void rt_##name##_vshot, (struct soltab *stp[], struct xray *rp[], struct seg *segp, int n, struct application *ap)); \ BU_EXTERN(int rt_##name##_tess, (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)); \ BU_EXTERN(int rt_##name##_tnurb, (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct bn_tol *tol)); \ + BU_EXTERN(void rt_##name##_brep, (ON_Brep **b, struct rt_db_internal *ip, const struct bn_tol *tol)); \ BU_EXTERN(int rt_##name##_import5, (struct rt_db_internal *ip, const struct bu_external *ep, const mat_t mat, const struct db_i *dbip, struct resource *resp)); \ BU_EXTERN(int rt_##name##_export5, (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip, struct resource *resp)); \ BU_EXTERN(int rt_##name##_import4, (struct rt_db_internal *ip, const struct bu_external *ep, const mat_t mat, const struct db_i *dbip, struct resource *resp)); \ @@ -172,6 +173,7 @@ NULL, NULL, NULL, + NULL, 0, 0, NULL, @@ -199,6 +201,7 @@ rt_tor_vshot, rt_tor_tess, NULL, + rt_tor_brep, rt_tor_import5, rt_tor_export5, rt_tor_import4, @@ -234,6 +237,7 @@ rt_tgc_vshot, rt_tgc_tess, rt_tgc_tnurb, + rt_tgc_brep, rt_tgc_import5, rt_tgc_export5, rt_tgc_import4, @@ -269,6 +273,7 @@ rt_ell_vshot, rt_ell_tess, rt_ell_tnurb, + rt_ell_brep, rt_ell_import5, rt_ell_export5, rt_ell_import4, @@ -304,6 +309,7 @@ rt_arb_vshot, rt_arb_tess, rt_arb_tnurb, + rt_arb_brep, rt_arb_import5, rt_arb_export5, rt_arb_import4, @@ -339,6 +345,7 @@ NULL, rt_ars_tess, NULL, + NULL, rt_ars_import5, rt_ars_export5, rt_ars_import4, @@ -374,6 +381,7 @@ rt_hlf_vshot, rt_hlf_tess, NULL, + NULL, rt_hlf_import5, rt_hlf_export5, rt_hlf_import4, @@ -409,6 +417,7 @@ rt_rec_vshot, rt_tgc_tess, NULL, + rt_tgc_brep, rt_tgc_import5, rt_tgc_export5, rt_tgc_import4, @@ -446,6 +455,7 @@ NULL, NULL, NULL, + NULL, rt_pg_import4, rt_pg_export4, rt_pg_ifree, @@ -479,6 +489,7 @@ NULL, rt_nurb_tess, NULL, + NULL, rt_nurb_import5, rt_nurb_export5, rt_nurb_import4, @@ -514,6 +525,7 @@ rt_sph_vshot, rt_ell_tess, rt_ell_tnurb, + rt_ell_brep, rt_ell_import5, rt_ell_export5, rt_ell_import4, @@ -549,6 +561,7 @@ NULL, rt_nmg_tess, NULL, + rt_nmg_brep, rt_nmg_import5, rt_nmg_export5, rt_nmg_import4, @@ -584,6 +597,7 @@ NULL, rt_ebm_tess, NULL, + rt_ebm_brep, rt_ebm_import5, rt_ebm_export5, rt_ebm_import4, @@ -619,6 +633,7 @@ NULL, rt_vol_tess, NULL, + rt_vol_brep, rt_vol_import5, rt_vol_export5, rt_vol_import4, @@ -654,6 +669,7 @@ NULL, rt_arbn_tess, NULL, + rt_arbn_brep, rt_arbn_import5, rt_arbn_export5, rt_arbn_import4, @@ -689,6 +705,7 @@ NULL, rt_pipe_tess, NULL, + rt_pipe_brep, rt_pipe_import5, rt_pipe_export5, rt_pipe_import4, @@ -724,6 +741,7 @@ NULL, rt_part_tess, NULL, + NULL, rt_part_import5, rt_part_export5, rt_part_import4, @@ -759,6 +777,7 @@ NULL, rt_rpc_tess, NULL, + rt_rpc_brep, rt_rpc_import5, rt_rpc_export5, rt_rpc_import4, @@ -794,6 +813,7 @@ NULL, rt_rhc_tess, NULL, + rt_rhc_brep, rt_rhc_import5, rt_rhc_export5, rt_rhc_import4, @@ -829,6 +849,7 @@ NULL, rt_epa_tess, NULL, + rt_epa_brep, rt_epa_import5, rt_epa_export5, rt_epa_import4, @@ -864,6 +885,7 @@ NULL, rt_ehy_tess, NULL, + rt_ehy_brep, rt_ehy_import5, rt_ehy_export5, rt_ehy_import4, @@ -899,6 +921,7 @@ NULL, rt_eto_tess, NULL, + rt_eto_brep, rt_eto_import5, rt_eto_export5, rt_eto_import4, @@ -934,6 +957,7 @@ NULL, rt_grp_tess, NULL, + NULL, rt_grp_import5, rt_grp_export5, rt_grp_import4, @@ -977,6 +1001,7 @@ NULL, NULL, NULL, + NULL, 0, 0, NULL, @@ -1004,6 +1029,7 @@ NULL, rt_hf_tess, NULL, + NULL, rt_hf_import5, rt_hf_export5, rt_hf_import4, @@ -1039,6 +1065,7 @@ NULL, rt_dsp_tess, NULL, + rt_dsp_brep, rt_dsp_import5, rt_dsp_export5, rt_dsp_import4, @@ -1074,6 +1101,7 @@ NULL, NULL, NULL, + rt_sketch_brep, rt_sketch_import5, rt_sketch_export5, rt_sketch_import4, @@ -1109,6 +1137,7 @@ NULL, rt_extrude_tess, NULL, + rt_extrude_brep, rt_extrude_import5, rt_extrude_export5, rt_extrude_import4, @@ -1144,6 +1173,7 @@ NULL, rt_submodel_tess, NULL, + NULL, rt_submodel_import5, rt_submodel_export5, rt_submodel_import4, @@ -1179,6 +1209,7 @@ NULL, rt_cline_tess, NULL, + NULL, rt_cline_import5, rt_cline_export5, rt_cline_import4, @@ -1214,6 +1245,7 @@ NULL, rt_bot_tess, NULL, + rt_bot_brep, rt_bot_import5, rt_bot_export5, rt_bot_import4, @@ -1249,6 +1281,7 @@ NULL, NULL, NULL, + NULL, rt_comb_import5, rt_comb_export5, rt_comb_import4, @@ -1294,6 +1327,7 @@ NULL, NULL, NULL, + NULL, 0, 0, NULL, @@ -1322,6 +1356,7 @@ NULL, NULL, NULL, + NULL, rt_binunif_export5, NULL, NULL, @@ -1366,6 +1401,7 @@ NULL, NULL, NULL, + NULL, 0, 0, NULL, @@ -1393,6 +1429,7 @@ NULL, rt_superell_tess, NULL, + NULL, rt_superell_import5, rt_superell_export5, rt_superell_import4, @@ -1428,6 +1465,7 @@ NULL, rt_metaball_tess, NULL, + NULL, rt_metaball_import5, rt_metaball_export5, NULL, @@ -1464,6 +1502,7 @@ NULL, rt_brep_tess, NULL, + NULL, rt_brep_import5, rt_brep_export5, NULL, @@ -1507,6 +1546,7 @@ NULL, NULL, NULL, + NULL, 0, 0, NULL, @@ -1535,6 +1575,7 @@ NULL, rt_hyp_tess, NULL, + rt_hyp_brep, rt_hyp_import5, rt_hyp_export5, NULL, @@ -1570,6 +1611,7 @@ NULL, NULL, NULL, + NULL, rt_constraint_import5, rt_constraint_export5, NULL, @@ -1605,6 +1647,7 @@ NULL, rt_revolve_tess, NULL, + rt_revolve_brep, rt_revolve_import5, rt_revolve_export5, NULL, @@ -1640,6 +1683,7 @@ NULL, NULL, NULL, + NULL, rt_pnts_import5, rt_pnts_export5, NULL, @@ -1683,6 +1727,7 @@ NULL, NULL, NULL, + NULL, 0, 0, NULL, Modified: brlcad/trunk/src/librt/primitives/tor/tor_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/tor/tor_brep.cpp 2011-01-04 16:55:29 UTC (rev 41930) +++ brlcad/trunk/src/librt/primitives/tor/tor_brep.cpp 2011-01-04 16:57:07 UTC (rev 41931) @@ -31,7 +31,7 @@ extern "C" void -rt_tor_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *) +rt_tor_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol *tol) { struct rt_tor_internal *tip; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-07 08:53:05
|
Revision: 42003 http://brlcad.svn.sourceforge.net/brlcad/?rev=42003&view=rev Author: brlcad Date: 2011-01-07 08:52:59 +0000 (Fri, 07 Jan 2011) Log Message: ----------- use NEAR_ZERO instead of ON_NearZero. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp Modified: brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp 2011-01-07 08:51:30 UTC (rev 42002) +++ brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp 2011-01-07 08:52:59 UTC (rev 42003) @@ -72,11 +72,11 @@ for (int i = 0; i < allsegments.Count(); i++) { pstart = (*b)->m_C3[i]->PointAtStart(); pend = (*b)->m_C3[i]->PointAtEnd(); - if (ON_NearZero(ptmatch.DistanceTo(pstart), ON_ZERO_TOLERANCE) && (curvearray[i] == -1)) { + if (NEAR_ZERO(ptmatch.DistanceTo(pstart), ON_ZERO_TOLERANCE) && (curvearray[i] == -1)) { curvecount = i; ptmatch = pend; i = allsegments.Count(); - if (ON_NearZero(pend.DistanceTo(ptterminate), ON_ZERO_TOLERANCE)) { + if (NEAR_ZERO(pend.DistanceTo(ptterminate), ON_ZERO_TOLERANCE)) { loop_complete = 1; loopcount++; } Modified: brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp 2011-01-07 08:51:30 UTC (rev 42002) +++ brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp 2011-01-07 08:52:59 UTC (rev 42003) @@ -66,11 +66,11 @@ for (int i = 0; i < allsegments.Count(); i++) { pstart = (*b)->m_C3[i]->PointAtStart(); pend = (*b)->m_C3[i]->PointAtEnd(); - if (ON_NearZero(ptmatch.DistanceTo(pstart), ON_ZERO_TOLERANCE) && (curvearray[i] == -1)) { + if (NEAR_ZERO(ptmatch.DistanceTo(pstart), ON_ZERO_TOLERANCE) && (curvearray[i] == -1)) { curvecount = i; ptmatch = pend; i = allsegments.Count(); - if (ON_NearZero(pend.DistanceTo(ptterminate), ON_ZERO_TOLERANCE)) { + if (NEAR_ZERO(pend.DistanceTo(ptterminate), ON_ZERO_TOLERANCE)) { loop_complete = 1; loopcount++; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-11 08:18:58
|
Revision: 42069 http://brlcad.svn.sourceforge.net/brlcad/?rev=42069&view=rev Author: brlcad Date: 2011-01-11 08:18:51 +0000 (Tue, 11 Jan 2011) Log Message: ----------- size_t quellage Modified Paths: -------------- brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2011-01-11 07:52:43 UTC (rev 42068) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2011-01-11 08:18:51 UTC (rev 42069) @@ -1816,7 +1816,7 @@ bu_log("rt_extrude_tess: A loop is not closed in sketch %s\n", extrude_ip->sketch_name); bu_log("\ttessellation failed!!\n"); - for (j=0; j<BU_PTBL_END(&loops); j++) { + for (j=0; j<(size_t)BU_PTBL_END(&loops); j++) { aloop = (struct bu_ptbl *)BU_PTBL_GET(&loops, j); bu_ptbl_free(aloop); bu_free((char *)aloop, "aloop"); @@ -1833,16 +1833,16 @@ /* sort the loops to find inside/outside relationships */ containing_loops = (struct bu_ptbl **)bu_calloc(BU_PTBL_END(&loops), sizeof(struct bu_ptbl *), "containing_loops"); - for (i=0; i<BU_PTBL_END(&loops); i++) { + for (i=0; i<(size_t)BU_PTBL_END(&loops); i++) { containing_loops[i] = (struct bu_ptbl *)bu_calloc(1, sizeof(struct bu_ptbl), "containing_loops[i]"); bu_ptbl_init(containing_loops[i], BU_PTBL_END(&loops), "containing_loops[i]"); } - for (i=0; i<BU_PTBL_END(&loops); i++) { + for (i=0; i<(size_t)BU_PTBL_END(&loops); i++) { struct bu_ptbl *loopa; loopa = (struct bu_ptbl *)BU_PTBL_GET(&loops, i); - for (j=i+1; j<BU_PTBL_END(&loops); j++) { + for (j=i+1; j<(size_t)BU_PTBL_END(&loops); j++) { struct bu_ptbl *loopb; loopb = (struct bu_ptbl *)BU_PTBL_GET(&loops, j); @@ -1866,7 +1866,7 @@ /* find an outermost loop */ outer_loop = (struct bu_ptbl *)NULL; - for (i=0; i<BU_PTBL_END(&loops); i++) { + for (i=0; i<(size_t)BU_PTBL_END(&loops); i++) { if (BU_PTBL_END(containing_loops[i]) == 0) { outer_loop = (struct bu_ptbl *)BU_PTBL_GET(&loops, i); break; @@ -1876,7 +1876,7 @@ if (!outer_loop) { bu_log("No outer loop in sketch %s\n", extrude_ip->sketch_name); bu_log("\ttessellation failed\n"); - for (i=0; i<BU_PTBL_END(&loops); i++) { + for (i=0; i<(size_t)BU_PTBL_END(&loops); i++) { aloop = (struct bu_ptbl *)BU_PTBL_GET(&loops, i); bu_ptbl_free(aloop); bu_free((char *)aloop, "aloop"); @@ -1891,7 +1891,7 @@ if (BU_LIST_UNINITIALIZED(&rt_g.rtg_vlfree)) { BU_LIST_INIT(&rt_g.rtg_vlfree); } - for (i=0; i<BU_PTBL_END(outer_loop); i++) { + for (i=0; i<(size_t)BU_PTBL_END(outer_loop); i++) { genptr_t seg; seg = (genptr_t)BU_PTBL_GET(outer_loop, i); @@ -1942,7 +1942,7 @@ } /* add the rest of the loops */ - for (i=0; i<BU_PTBL_END(&loops); i++) { + for (i=0; i<(size_t)BU_PTBL_END(&loops); i++) { int fdir; vect_t cross; fastf_t pt_count=0.0; @@ -1959,7 +1959,7 @@ fdir = OT_SAME; } - for (j=0; j<BU_PTBL_END(aloop); j++) { + for (j=0; j<(size_t)BU_PTBL_END(aloop); j++) { genptr_t seg; seg = (genptr_t)BU_PTBL_GET(aloop, j); @@ -2029,7 +2029,7 @@ return 0; failed: - for (i=0; i<BU_PTBL_END(&loops); i++) { + for (i=0; i<(size_t)BU_PTBL_END(&loops); i++) { bu_ptbl_free(containing_loops[i]); bu_free((char *)containing_loops[i], "containing_loops[i]"); } Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2011-01-11 07:52:43 UTC (rev 42068) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2011-01-11 08:18:51 UTC (rev 42069) @@ -11133,7 +11133,7 @@ bot->num_faces = 0; /* count the number of triangles */ - for (i=0; i<BU_PTBL_LEN(&nmg_faces); i++) { + for (i=0; i<(size_t)BU_PTBL_LEN(&nmg_faces); i++) { struct face *f; struct faceuse *fu; struct loopuse *lu; @@ -11168,7 +11168,7 @@ bot->face_mode = (struct bu_bitv *)NULL; /* fill in the vertices */ - for (i=0; i<BU_PTBL_LEN(&nmg_vertices); i++) { + for (i=0; i<(size_t)BU_PTBL_LEN(&nmg_vertices); i++) { struct vertex_g *vg; v = (struct vertex *)BU_PTBL_GET(&nmg_vertices, i); @@ -11182,7 +11182,7 @@ /* fill in the faces */ face_no = 0; - for (i=0; i<BU_PTBL_LEN(&nmg_faces); i++) { + for (i=0; i<(size_t)BU_PTBL_LEN(&nmg_faces); i++) { struct face *f; struct faceuse *fu; struct loopuse *lu; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-02-04 07:02:39
|
Revision: 43009 http://brlcad.svn.sourceforge.net/brlcad/?rev=43009&view=rev Author: brlcad Date: 2011-02-04 07:02:33 +0000 (Fri, 04 Feb 2011) Log Message: ----------- didn't catch this until part-way through. private headers should be relative references (src/librt should not be on search path). Modified Paths: -------------- brlcad/trunk/src/librt/primitives/ars/ars.c brlcad/trunk/src/librt/primitives/bspline/bspline.cpp brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/epa/epa.c Modified: brlcad/trunk/src/librt/primitives/ars/ars.c =================================================================== --- brlcad/trunk/src/librt/primitives/ars/ars.c 2011-02-04 07:00:10 UTC (rev 43008) +++ brlcad/trunk/src/librt/primitives/ars/ars.c 2011-02-04 07:02:33 UTC (rev 43009) @@ -42,7 +42,7 @@ #include "raytrace.h" #include "bot.h" -#include "librt_private.h" +#include "../../librt_private.h" #define TRI_NULL ((struct tri_specific *)0) Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2011-02-04 07:00:10 UTC (rev 43008) +++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2011-02-04 07:02:33 UTC (rev 43009) @@ -54,7 +54,7 @@ # include "opennurbs.h" #endif /* CONVERT_TO_BREP */ -#include "librt_private.h" +#include "../../librt_private.h" #ifdef __cplusplus Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-02-04 07:00:10 UTC (rev 43008) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-02-04 07:02:33 UTC (rev 43009) @@ -161,7 +161,7 @@ #include "rtgeom.h" #include "raytrace.h" -#include "librt_private.h" +#include "../../librt_private.h" extern fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2011-02-04 07:00:10 UTC (rev 43008) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2011-02-04 07:02:33 UTC (rev 43009) @@ -158,7 +158,7 @@ #include "rtgeom.h" #include "raytrace.h" -#include "librt_private.h" +#include "../../librt_private.h" extern fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-02-24 04:43:27
|
Revision: 43433 http://brlcad.svn.sourceforge.net/brlcad/?rev=43433&view=rev Author: brlcad Date: 2011-02-24 04:43:19 +0000 (Thu, 24 Feb 2011) Log Message: ----------- call flip_fastf_float() instead of rt_fastf_float() so we can deprecate the old rt api routine. include private header as needed. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/ell/ell.c brlcad/trunk/src/librt/primitives/epa/epa.c brlcad/trunk/src/librt/primitives/eto/eto.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/poly/poly.c brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/superell/superell.c brlcad/trunk/src/librt/primitives/tgc/tgc.c brlcad/trunk/src/librt/primitives/tor/tor.c Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -62,7 +62,9 @@ #include "raytrace.h" #include "nurb.h" +#include "../../librt_private.h" + #define RT_SLOPPY_DOT_TOL 0.0087 /* inspired by RT_DOT_TOL, but less tight (.5 deg) */ /* Optionally, one of these for each face. (Lazy evaluation) */ @@ -1191,7 +1193,7 @@ aip->magic = RT_ARB_INTERNAL_MAGIC; /* Convert from database to internal format */ - rt_fastf_float(vec, rp->s.s_values, 8, dbip->dbi_version < 0 ? 1 : 0); + flip_fastf_float(vec, rp->s.s_values, 8, dbip->dbi_version < 0 ? 1 : 0); /* * Convert from vector notation (in database) to point notation. Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1428,9 +1428,9 @@ if (mat == NULL) mat = bn_mat_identity; if (dbip->dbi_version < 0) { - rt_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); - rt_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); - rt_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); + flip_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); + flip_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); + flip_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); } else { VMOVE(v1, &rp->s.s_values[0*3]); VMOVE(v2, &rp->s.s_values[1*3]); Modified: brlcad/trunk/src/librt/primitives/ell/ell.c =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/ell/ell.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -40,7 +40,9 @@ #include "raytrace.h" #include "nurb.h" +#include "../../librt_private.h" + BU_EXTERN(int rt_sph_prep, (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)); @@ -1120,7 +1122,7 @@ eip->magic = RT_ELL_INTERNAL_MAGIC; /* Convert from database to internal format */ - rt_fastf_float(vec, rp->s.s_values, 4, dbip->dbi_version < 0 ? 1 : 0); + flip_fastf_float(vec, rp->s.s_values, 4, dbip->dbi_version < 0 ? 1 : 0); /* Apply modeling transformations */ if (mat == NULL) mat = bn_mat_identity; Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1467,9 +1467,9 @@ if (mat == NULL) mat = bn_mat_identity; if (dbip->dbi_version < 0) { - rt_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); - rt_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); - rt_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); + flip_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); + flip_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); + flip_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); } else { VMOVE(v1, &rp->s.s_values[0*3]); VMOVE(v2, &rp->s.s_values[1*3]); Modified: brlcad/trunk/src/librt/primitives/eto/eto.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/eto/eto.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1219,9 +1219,9 @@ if (mat == NULL) mat = bn_mat_identity; if (dbip->dbi_version < 0) { - rt_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); - rt_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); - rt_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); + flip_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); + flip_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); + flip_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); } else { VMOVE(v1, &rp->s.s_values[0*3]); VMOVE(v2, &rp->s.s_values[1*3]); Modified: brlcad/trunk/src/librt/primitives/grip/grip.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/grip/grip.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -46,7 +46,9 @@ #include "nmg.h" #include "db.h" +#include "../../librt_private.h" + struct grip_specific { long grip_magic; vect_t grip_center; @@ -304,7 +306,7 @@ gip = (struct rt_grip_internal *)ip->idb_ptr; gip->magic = RT_GRIP_INTERNAL_MAGIC; - rt_fastf_float(orig_eqn, rp->s.s_values, 3, dbip->dbi_version < 0 ? 1 : 0); /* 2 floats to many */ + flip_fastf_float(orig_eqn, rp->s.s_values, 3, dbip->dbi_version < 0 ? 1 : 0); /* 2 floats to many */ /* Transform the point, and the normal */ if (mat == NULL) mat = bn_mat_identity; Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/half/half.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -50,7 +50,9 @@ #include "nmg.h" #include "db.h" +#include "../../librt_private.h" + struct half_specific { plane_t half_eqn; /* Plane equation, outward normal */ vect_t half_Xbase; /* "X" basis direction */ @@ -572,7 +574,7 @@ hip = (struct rt_half_internal *)ip->idb_ptr; hip->magic = RT_HALF_INTERNAL_MAGIC; - rt_fastf_float(orig_eqn, rp->s.s_values, 2, dbip->dbi_version < 0 ? 1 : 0); /* 2 floats too many */ + flip_fastf_float(orig_eqn, rp->s.s_values, 2, dbip->dbi_version < 0 ? 1 : 0); /* 2 floats too many */ /* Pick a point on the original halfspace */ VSCALE(orig_pt, orig_eqn, orig_eqn[1*ELEMENTS_PER_VECT]); Modified: brlcad/trunk/src/librt/primitives/poly/poly.c =================================================================== --- brlcad/trunk/src/librt/primitives/poly/poly.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/poly/poly.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -701,8 +701,8 @@ vect_t vec; if (dbip->dbi_version < 0) { - rt_fastf_float(pnt, rp[rno].q.q_verts[i], 1, 1); - rt_fastf_float(vec, rp[rno].q.q_norms[i], 1, 1); + flip_fastf_float(pnt, rp[rno].q.q_verts[i], 1, 1); + flip_fastf_float(vec, rp[rno].q.q_norms[i], 1, 1); } else { VMOVE(pnt, rp[rno].q.q_verts[i]); VMOVE(vec, rp[rno].q.q_norms[i]); Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1196,9 +1196,9 @@ if (mat == NULL) mat = bn_mat_identity; if (dbip->dbi_version < 0) { - rt_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); - rt_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); - rt_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); + flip_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); + flip_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); + flip_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); } else { VMOVE(v1, &rp->s.s_values[0*3]); VMOVE(v2, &rp->s.s_values[1*3]); Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1183,9 +1183,9 @@ if (mat == NULL) mat = bn_mat_identity; if (dbip->dbi_version < 0) { - rt_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); - rt_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); - rt_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); + flip_fastf_float(v1, &rp->s.s_values[0*3], 1, 1); + flip_fastf_float(v2, &rp->s.s_values[1*3], 1, 1); + flip_fastf_float(v3, &rp->s.s_values[2*3], 1, 1); } else { VMOVE(v1, &rp->s.s_values[0*3]); VMOVE(v2, &rp->s.s_values[1*3]); Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -788,7 +788,7 @@ eip->magic = RT_SUPERELL_INTERNAL_MAGIC; /* Convert from database to internal format */ - rt_fastf_float(vec, rp->s.s_values, 4, dbip->dbi_version < 0 ? 1 : 0); + flip_fastf_float(vec, rp->s.s_values, 4, dbip->dbi_version < 0 ? 1 : 0); /* Apply modeling transformations */ if (mat == NULL) mat = bn_mat_identity; Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c =================================================================== --- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1557,7 +1557,7 @@ tip->magic = RT_TGC_INTERNAL_MAGIC; /* Convert from database to internal format */ - rt_fastf_float(vec, rp->s.s_values, 6, dbip->dbi_version < 0 ? 1 : 0); + flip_fastf_float(vec, rp->s.s_values, 6, dbip->dbi_version < 0 ? 1 : 0); /* Apply modeling transformations */ if (mat == NULL) mat = bn_mat_identity; Modified: brlcad/trunk/src/librt/primitives/tor/tor.c =================================================================== --- brlcad/trunk/src/librt/primitives/tor/tor.c 2011-02-24 04:39:32 UTC (rev 43432) +++ brlcad/trunk/src/librt/primitives/tor/tor.c 2011-02-24 04:43:19 UTC (rev 43433) @@ -1318,7 +1318,7 @@ tip->magic = RT_TOR_INTERNAL_MAGIC; /* Convert from database to internal format */ - rt_fastf_float(vec, rp->s.s_values, 4, dbip->dbi_version < 0 ? 1 : 0); + flip_fastf_float(vec, rp->s.s_values, 4, dbip->dbi_version < 0 ? 1 : 0); /* Apply modeling transformations */ if (mat == NULL) mat = bn_mat_identity; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-02-24 04:55:52
|
Revision: 43436 http://brlcad.svn.sourceforge.net/brlcad/?rev=43436&view=rev Author: brlcad Date: 2011-02-24 04:55:45 +0000 (Thu, 24 Feb 2011) Log Message: ----------- more conversion from xdr routines to ntohl()/htonl() Modified Paths: -------------- brlcad/trunk/src/librt/primitives/dsp/dsp.c brlcad/trunk/src/librt/primitives/pipe/pipe.c brlcad/trunk/src/librt/primitives/pnts/pnts.c Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2011-02-24 04:53:02 UTC (rev 43435) +++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2011-02-24 04:55:45 UTC (rev 43436) @@ -4328,7 +4328,7 @@ /* get x, y counts */ cp = (unsigned char *)ep->ext_buf; - dsp_ip->dsp_xcnt = (unsigned) bu_glong(cp); + dsp_ip->dsp_xcnt = ntohl(*(uint32_t *)cp); cp += SIZEOF_NETWORK_LONG; if (dsp_ip->dsp_xcnt < 2) { bu_log("%s:%d DSP X dimension (%d) < 2 \n", @@ -4337,7 +4337,7 @@ } - dsp_ip->dsp_ycnt = (unsigned) bu_glong(cp); + dsp_ip->dsp_ycnt = ntohl(*(uint32_t *)cp); cp += SIZEOF_NETWORK_LONG; if (dsp_ip->dsp_ycnt < 2) { bu_log("%s:%d DSP X dimension (%d) < 2 \n", @@ -4351,7 +4351,7 @@ bn_mat_inv(dsp_ip->dsp_mtos, dsp_ip->dsp_stom); /* convert smooth flag */ - dsp_ip->dsp_smooth = bu_gshort(cp); + dsp_ip->dsp_smooth = ntohs(*(uint16_t *)cp); cp += SIZEOF_NETWORK_SHORT; dsp_ip->dsp_datasrc = *cp; @@ -4442,11 +4442,11 @@ * converted to Big-Endian IEEE */ - bu_plong(cp, (unsigned long)dsp_ip->dsp_xcnt); + *(uint32_t *)cp = htonl((uint32_t)dsp_ip->dsp_xcnt); cp += SIZEOF_NETWORK_LONG; rem -= SIZEOF_NETWORK_LONG; - bu_plong(cp, (unsigned long)dsp_ip->dsp_ycnt); + *(uint32_t *)cp = htonl((uint32_t)dsp_ip->dsp_ycnt); cp += SIZEOF_NETWORK_LONG; rem -= SIZEOF_NETWORK_LONG; @@ -4460,7 +4460,7 @@ cp += SIZEOF_NETWORK_DOUBLE * 16; rem -= SIZEOF_NETWORK_DOUBLE * 16; - bu_pshort(cp, (int)dsp_ip->dsp_smooth); + *(uint16_t *)cp = htons((uint16_t)dsp_ip->dsp_smooth); cp += SIZEOF_NETWORK_SHORT; rem -= SIZEOF_NETWORK_SHORT; Modified: brlcad/trunk/src/librt/primitives/pipe/pipe.c =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe.c 2011-02-24 04:53:02 UTC (rev 43435) +++ brlcad/trunk/src/librt/primitives/pipe/pipe.c 2011-02-24 04:55:45 UTC (rev 43436) @@ -3271,7 +3271,7 @@ ip->idb_ptr = bu_malloc(sizeof(struct rt_pipe_internal), "rt_pipe_internal"); pip = (struct rt_pipe_internal *)ip->idb_ptr; pip->pipe_magic = RT_PIPE_INTERNAL_MAGIC; - pip->pipe_count = bu_glong(rp->pwr.pwr_pt_count); + pip->pipe_count = ntohl(*(uint32_t *)rp->pwr.pwr_pt_count); /* * Walk the array of segments in reverse order, allocating a @@ -3346,8 +3346,8 @@ rec = (union record *)ep->ext_buf; rec->pwr.pwr_id = DBID_PIPE; - (void)bu_plong(rec->pwr.pwr_count, ngran-1); /* # EXTRA grans */ - (void)bu_plong(rec->pwr.pwr_pt_count, count); + *(uint32_t *)rec->pwr.pwr_count = htonl(ngran-1); /* # EXTRA grans */ + *(uint32_t *)rec->pwr.pwr_pt_count = htonl(count); /* Convert the pipe segments to external form */ epp = &rec->pwr.pwr_data[0]; @@ -3385,7 +3385,7 @@ if (dbip) RT_CK_DBI(dbip); BU_CK_EXTERNAL(ep); - pipe_count = bu_glong((unsigned char *)ep->ext_buf); + pipe_count = ntohl(*(uint32_t *)ep->ext_buf); double_count = pipe_count * 6; byte_count = double_count * SIZEOF_NETWORK_DOUBLE; total_count = 4 + byte_count; @@ -3472,7 +3472,7 @@ ep->ext_nbytes = total_count; ep->ext_buf = (genptr_t)bu_malloc(ep->ext_nbytes, "pipe external"); - (void)bu_plong((unsigned char *)ep->ext_buf, pipe_count); + *(uint32_t *)ep->ext_buf = htonl(pipe_count); /* Convert the pipe segments to external form */ for (BU_LIST_FOR(ppt, wdb_pipept, headp), i += 6) { Modified: brlcad/trunk/src/librt/primitives/pnts/pnts.c =================================================================== --- brlcad/trunk/src/librt/primitives/pnts/pnts.c 2011-02-24 04:53:02 UTC (rev 43435) +++ brlcad/trunk/src/librt/primitives/pnts/pnts.c 2011-02-24 04:55:45 UTC (rev 43436) @@ -83,8 +83,10 @@ htond(buf, (unsigned char *)&pnts->scale, 1); buf += SIZEOF_NETWORK_DOUBLE; - buf = bu_pshort(buf, (unsigned short)pnts->type); - buf = bu_plong(buf, pnts->count); + *(uint16_t *)buf = htons((unsigned short)pnts->type); + buf += SIZEOF_NETWORK_SHORT; + *(uint32_t *)buf = htonl(pnts->count); + buf += SIZEOF_NETWORK_LONG; if (pnts->count <= 0) { /* no points to stash, we're done */ @@ -319,9 +321,9 @@ /* unpack the header */ ntohd((unsigned char *)&pnts->scale, buf, 1); buf += SIZEOF_NETWORK_DOUBLE; - pnts->type = (unsigned short)bu_gshort(buf); + pnts->type = ntohs(*(uint16_t *)buf); buf += SIZEOF_NETWORK_SHORT; - pnts->count = (unsigned long)bu_glong(buf); + pnts->count = ntohl(*(uint32_t *)buf); buf += SIZEOF_NETWORK_LONG; if (pnts->count <= 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-06-09 12:34:28
|
Revision: 44869 http://brlcad.svn.sourceforge.net/brlcad/?rev=44869&view=rev Author: brlcad Date: 2011-06-09 12:34:21 +0000 (Thu, 09 Jun 2011) Log Message: ----------- no longer need the forward decls for rt_ell_ang() since it's in librt_private.h Modified Paths: -------------- brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/hyp/hyp.c Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-06-09 12:31:54 UTC (rev 44868) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-06-09 12:34:21 UTC (rev 44869) @@ -164,9 +164,6 @@ #include "../../librt_private.h" -extern fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); - - struct ehy_specific { point_t ehy_V; /* vector to ehy origin */ vect_t ehy_Hunit; /* unit H vector */ Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2011-06-09 12:31:54 UTC (rev 44868) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2011-06-09 12:34:21 UTC (rev 44869) @@ -44,10 +44,9 @@ #include "raytrace.h" #include "rtgeom.h" +#include "../../librt_private.h" -extern fastf_t rt_ell_ang(fastf_t *, fastf_t, fastf_t, fastf_t, fastf_t); - /* ray tracing form of solid, including precomputed terms */ struct hyp_specific { point_t hyp_V; /* scaled vector to hyp origin */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-06-22 13:05:07
|
Revision: 45198 http://brlcad.svn.sourceforge.net/brlcad/?rev=45198&view=rev Author: brlcad Date: 2011-06-22 13:04:55 +0000 (Wed, 22 Jun 2011) Log Message: ----------- include paths to remove ambiguity with same-named files in other directories Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/arb8/arb8_mirror.c brlcad/trunk/src/librt/primitives/arbn/arbn.c brlcad/trunk/src/librt/primitives/arbn/arbn_mirror.c brlcad/trunk/src/librt/primitives/ars/ars.c brlcad/trunk/src/librt/primitives/ars/ars_mirror.c brlcad/trunk/src/librt/primitives/bot/bot.c brlcad/trunk/src/librt/primitives/bot/bot_mirror.c brlcad/trunk/src/librt/primitives/bot/btg.c brlcad/trunk/src/librt/primitives/bot/btgf.c brlcad/trunk/src/librt/primitives/bot/g_bot_include.c brlcad/trunk/src/librt/primitives/bot/tie.c brlcad/trunk/src/librt/primitives/bot/tie_kdtree.c brlcad/trunk/src/librt/primitives/bspline/bspline_mirror.c brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c brlcad/trunk/src/librt/primitives/bspline/nurb_reverse.c brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c brlcad/trunk/src/librt/primitives/bspline/nurb_split.c brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c brlcad/trunk/src/librt/primitives/bspline/nurb_trim_util.c brlcad/trunk/src/librt/primitives/bspline/nurb_util.c brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c brlcad/trunk/src/librt/primitives/cline/cline.c brlcad/trunk/src/librt/primitives/dsp/dsp.c brlcad/trunk/src/librt/primitives/dsp/dsp_mirror.c brlcad/trunk/src/librt/primitives/ebm/ebm.c brlcad/trunk/src/librt/primitives/ebm/ebm_mirror.c brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/ell/ell.c brlcad/trunk/src/librt/primitives/ell/ell_mirror.c brlcad/trunk/src/librt/primitives/epa/epa.c brlcad/trunk/src/librt/primitives/epa/epa_mirror.c brlcad/trunk/src/librt/primitives/eto/eto.c brlcad/trunk/src/librt/primitives/eto/eto_mirror.c brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/generic.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/grip/grip_mirror.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/half/half_mirror.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/hyp/hyp_mirror.c brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c brlcad/trunk/src/librt/primitives/mirror.c brlcad/trunk/src/librt/primitives/nmg/nmg.c brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c brlcad/trunk/src/librt/primitives/nmg/nmg_ck.c brlcad/trunk/src/librt/primitives/nmg/nmg_class.c brlcad/trunk/src/librt/primitives/nmg/nmg_eval.c brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c brlcad/trunk/src/librt/primitives/nmg/nmg_index.c brlcad/trunk/src/librt/primitives/nmg/nmg_info.c brlcad/trunk/src/librt/primitives/nmg/nmg_inter.c brlcad/trunk/src/librt/primitives/nmg/nmg_junk.c brlcad/trunk/src/librt/primitives/nmg/nmg_manif.c brlcad/trunk/src/librt/primitives/nmg/nmg_mesh.c brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c brlcad/trunk/src/librt/primitives/nmg/nmg_mod.c brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c brlcad/trunk/src/librt/primitives/nmg/nmg_pr.c brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c brlcad/trunk/src/librt/primitives/nmg/nmg_rt_segs.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c brlcad/trunk/src/librt/primitives/nmg/nmg_visit.c brlcad/trunk/src/librt/primitives/part/part.c brlcad/trunk/src/librt/primitives/part/part_mirror.c brlcad/trunk/src/librt/primitives/pipe/pipe.c brlcad/trunk/src/librt/primitives/pipe/pipe_mirror.c brlcad/trunk/src/librt/primitives/pnts/pnts.c brlcad/trunk/src/librt/primitives/poly/poly.c brlcad/trunk/src/librt/primitives/poly/poly_mirror.c brlcad/trunk/src/librt/primitives/rec/rec.c brlcad/trunk/src/librt/primitives/revolve/revolve.c brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rhc/rhc_mirror.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/rpc/rpc_mirror.c brlcad/trunk/src/librt/primitives/sketch/sketch.c brlcad/trunk/src/librt/primitives/sph/sph.c brlcad/trunk/src/librt/primitives/submodel/submodel.c brlcad/trunk/src/librt/primitives/superell/superell.c brlcad/trunk/src/librt/primitives/superell/superell_mirror.c brlcad/trunk/src/librt/primitives/table.c brlcad/trunk/src/librt/primitives/tgc/tgc.c brlcad/trunk/src/librt/primitives/tgc/tgc_mirror.c brlcad/trunk/src/librt/primitives/tor/tor.c brlcad/trunk/src/librt/primitives/tor/tor_mirror.c brlcad/trunk/src/librt/primitives/vol/vol.c brlcad/trunk/src/librt/primitives/vol/vol_mirror.c brlcad/trunk/src/librt/primitives/xxx/xxx.c Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file arb8.c +/** @file primitives/arb8/arb8.c * * Intersect a ray with an Arbitrary Regular Polyhedron with as many * as 8 vertices. Modified: brlcad/trunk/src/librt/primitives/arb8/arb8_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/arb8/arb8_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file arb8_mirror.c +/** @file primitives/arb8/arb8_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/arbn/arbn.c =================================================================== --- brlcad/trunk/src/librt/primitives/arbn/arbn.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/arbn/arbn.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file arbn.c +/** @file primitives/arbn/arbn.c * * Intersect a ray with an Arbitrary Regular Polyhedron with an * arbitrary number of faces. Modified: brlcad/trunk/src/librt/primitives/arbn/arbn_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/arbn/arbn_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/arbn/arbn_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file arbn_mirror.c +/** @file primitives/arbn/arbn_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/ars/ars.c =================================================================== --- brlcad/trunk/src/librt/primitives/ars/ars.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ars/ars.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file ars.c +/** @file primitives/ars/ars.c * * Intersect a ray with an ARS (Arbitrary faceted solid). * Modified: brlcad/trunk/src/librt/primitives/ars/ars_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/ars/ars_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ars/ars_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file ars_mirror.c +/** @file primitives/ars/ars_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/bot/bot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/bot.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file bot.c +/** @file primitives/bot/bot.c * * Intersect a ray with a bag o' triangles. * Modified: brlcad/trunk/src/librt/primitives/bot/bot_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/bot_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file bot_mirror.c +/** @file primitives/bot/bot_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/bot/btg.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/btg.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/btg.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file btg.c +/** @file primitives/bot/btg.c * * the bot/tie glue. * Modified: brlcad/trunk/src/librt/primitives/bot/btgf.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/btgf.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/btgf.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file btgf.c +/** @file primitives/bot/btgf.c * * the bot/tie float glue. * Modified: brlcad/trunk/src/librt/primitives/bot/g_bot_include.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/g_bot_include.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/g_bot_include.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file g_bot_include.c +/** @file primitives/bot/g_bot_include.c * * This file contains all the routines for "g_bot.c" that contain * references to "tri_specific" structs. This file is included in Modified: brlcad/trunk/src/librt/primitives/bot/tie.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/tie.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/tie.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file tie.c +/** @file primitives/bot/tie.c * tie.c * */ Modified: brlcad/trunk/src/librt/primitives/bot/tie_kdtree.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/tie_kdtree.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bot/tie_kdtree.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file tie_kdtree.c +/** @file primitives/bot/tie_kdtree.c * tie_kdtree.c * */ Modified: brlcad/trunk/src/librt/primitives/bspline/bspline_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/bspline_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/bspline_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file bspline_mirror.c +/** @file primitives/bspline/bspline_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_basis.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_basis.c +/** @file primitives/bspline/nurb_basis.c * * Evaluate the B-Spline Basis Functions. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_bezier.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_bezier.c +/** @file primitives/bspline/nurb_bezier.c * * Convert a NURB surface or curve into Bezier form, with no internal * knots. Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_bound.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_bound.c +/** @file primitives/bspline/nurb_bound.c * * Find the bounding box for the a NURB surface. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_c2.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_c2.c +/** @file primitives/bspline/nurb_c2.c * * Given parametric u, v values, return the curvature of the surface. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_copy.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_copy.c +/** @file primitives/bspline/nurb_copy.c * * Duplicate the nurb surface. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_diff.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_diff.c +/** @file primitives/bspline/nurb_diff.c * * Differentiate a Non Uniform Rational B-Spline (NURB) Surface. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_eval.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_eval.c +/** @file primitives/bspline/nurb_eval.c * * Evaluate a Non Uniform Rational B-spline curve or at the given (u, * v) values. Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_flat.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_flat.c +/** @file primitives/bspline/nurb_flat.c * * Tests the NURB surface to see if its flat depending on the epsilon * passed. Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_interp.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_interp.c +/** @file primitives/bspline/nurb_interp.c * * Interpolatopn routines for fitting NURB curves and and surfaces to * existing data. Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_knot.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_knot.c +/** @file primitives/bspline/nurb_knot.c * * Various knot vector routines. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_norm.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_norm.c +/** @file primitives/bspline/nurb_norm.c * * Calulate and return the normal of a surface given the U, V * parametric values. Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_plot.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_plot.c +/** @file primitives/bspline/nurb_plot.c * * Utilities for spline debuging. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_poly.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_poly.c +/** @file primitives/bspline/nurb_poly.c * * Returns two polygons from a NURB surface. * Asumes that the surface is flat. Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_ray.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_ray.c +/** @file primitives/bspline/nurb_ray.c * * Functions which support the ray intersection for surfaces. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_refine.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_refine.c +/** @file primitives/bspline/nurb_refine.c * * Refines a surface by inserting knots with respect to the row or * columns of the control points resulting in the same surface with new Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_reverse.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_reverse.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_reverse.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_reverse.c +/** @file primitives/bspline/nurb_reverse.c * * Reverse the direction of a nurb surface by transposing the control * points Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_solve.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_solve.c +/** @file primitives/bspline/nurb_solve.c * * Decompose a matrix into its LU decomposition using pivoting. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_split.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_split.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_split.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_split.c +/** @file primitives/bspline/nurb_split.c * * Subdivide a nurb surface by inserting a multiple knot of of the * surface order in a given direction and return the resulting Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_tess.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_tess.c +/** @file primitives/bspline/nurb_tess.c * * Given Epsilon, compute the number of internal knots to add so that * every triangle generated in parametric space is within epsilon of Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_trim.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup */ /** @{ */ -/** @file nurb_trim.c +/** @file primitives/bspline/nurb_trim.c * * Trimming curve routines. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_trim_util.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_trim_util.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_trim_util.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_trim_util.c +/** @file primitives/bspline/nurb_trim_util.c * * Trimming curve Utilities. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_util.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_util.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_util.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_util.c +/** @file primitives/bspline/nurb_util.c * * Utilities for NURB curves and surfaces. * Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_xsplit.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nurb */ /** @{ */ -/** @file nurb_xsplit.c +/** @file primitives/bspline/nurb_xsplit.c * * Subdivide a nurb surface by inserting a multiple knot of of the * surface order in a given direction and return the resulting Modified: brlcad/trunk/src/librt/primitives/cline/cline.c =================================================================== --- brlcad/trunk/src/librt/primitives/cline/cline.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/cline/cline.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file cline.c +/** @file primitives/cline/cline.c * * Intersect a ray with a FASTGEN4 CLINE element. * Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file dsp.c +/** @file primitives/dsp/dsp.c * * Intersect a ray with a displacement map. * Modified: brlcad/trunk/src/librt/primitives/dsp/dsp_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/dsp/dsp_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file dsp_mirror.c +/** @file primitives/dsp/dsp_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/ebm/ebm.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ebm/ebm.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file ebm.c +/** @file primitives/ebm/ebm.c * * Intersect a ray with an Extruded Bitmap, where the bitmap is taken * from a bw(5) file. Modified: brlcad/trunk/src/librt/primitives/ebm/ebm_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ebm/ebm_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file ebm_mirror.c +/** @file primitives/ebm/ebm_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file ehy.c +/** @file primitives/ehy/ehy.c * * Intersect a ray with an Elliptical Hyperboloid. * Modified: brlcad/trunk/src/librt/primitives/ell/ell.c =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ell/ell.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file ell.c +/** @file primitives/ell/ell.c * * Intersect a ray with a Generalized Ellipsoid. * Modified: brlcad/trunk/src/librt/primitives/ell/ell_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/ell/ell_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file ell_mirror.c +/** @file primitives/ell/ell_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file epa.c +/** @file primitives/epa/epa.c * * Intersect a ray with an Elliptical Paraboloid. * Modified: brlcad/trunk/src/librt/primitives/epa/epa_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/epa/epa_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file epa_mirror.c +/** @file primitives/epa/epa_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/eto/eto.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/eto/eto.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file eto.c +/** @file primitives/eto/eto.c * * Intersect a ray with an Elliptical Torus. * Modified: brlcad/trunk/src/librt/primitives/eto/eto_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/eto/eto_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file eto_mirror.c +/** @file primitives/eto/eto_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file extrude.c +/** @file primitives/extrude/extrude.c * * Provide support for solids of extrusion. * Modified: brlcad/trunk/src/librt/primitives/generic.c =================================================================== --- brlcad/trunk/src/librt/primitives/generic.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/generic.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup g_ */ /** @{ */ -/** @file generic.c +/** @file primitives/generic.c * * Generic routines applicable across most primitives * Modified: brlcad/trunk/src/librt/primitives/grip/grip.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/grip/grip.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file grip.c +/** @file primitives/grip/grip.c * * Intersect a ray with a "grip" and return nothing. * Modified: brlcad/trunk/src/librt/primitives/grip/grip_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/grip/grip_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file grip_mirror.c +/** @file primitives/grip/grip_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/half/half.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file half.c +/** @file primitives/half/half.c * * Intersect a ray with a Halfspace. * Modified: brlcad/trunk/src/librt/primitives/half/half_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/half/half_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file half_mirror.c +/** @file primitives/half/half_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/hf/hf.c =================================================================== --- brlcad/trunk/src/librt/primitives/hf/hf.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/hf/hf.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file hf.c +/** @file primitives/hf/hf.c * * Intersect a ray with a height field, where the heights are imported * from an external data file, and where some (or all) of the Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file hyp.c +/** @file primitives/hyp/hyp.c * * Intersect a ray with an elliptical hyperboloid of one sheet. * Modified: brlcad/trunk/src/librt/primitives/hyp/hyp_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/hyp/hyp_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file hyp_mirror.c +/** @file primitives/hyp/hyp_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file metaball.c +/** @file primitives/metaball/metaball.c * * Intersect a ray with a metaball implicit surface. * Modified: brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/metaball/metaball_tri.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file metaball.c +/** @file primitives/metaball/metaball_tri.c * * Tesselation/facetization routines for the metaball primitive. * Modified: brlcad/trunk/src/librt/primitives/mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file mirror.c +/** @file primitives/mirror.c * * Routine(s) to mirror objects. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file nmg.c +/** @file primitives/nmg/nmg.c * * Intersect a ray with an NMG solid. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -20,7 +20,7 @@ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_bool.c +/** @file primitives/nmg/nmg_bool.c * * Support for boolean operations on NMG objects. Most of the * routines in here are static/local to this file. The interfaces Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_ck.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_ck.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_ck.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_ck.c +/** @file primitives/nmg/nmg_ck.c * * Validators and consistency checkers for NMG data structures. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_class.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_class.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_class.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_class.c +/** @file primitives/nmg/nmg_class.c * * Subroutines to classify one object with respect to another. * Possible classifications are AinB, AoutB, AinBshared, AinBanti. Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_eval.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_eval.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_eval.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_eval.c +/** @file primitives/nmg/nmg_eval.c * * Evaluate boolean operations on NMG objects. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_extrude.c +/** @file primitives/nmg/nmg_extrude.c * * Routines for extruding nmg's. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_fcut.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_fcut.c +/** @file primitives/nmg/nmg_fcut.c * * After two faces have been intersected, cut or join loops crossed * by the line of intersection. (Formerly nmg_comb.c) Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_fuse.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_fuse.c +/** @file primitives/nmg/nmg_fuse.c * * Routines to "fuse" entities together that are geometrically * identical (within tolerance) into entities that share underlying Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_index.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_index.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_index.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_index.c +/** @file primitives/nmg/nmg_index.c * * Handle counting and re-indexing of NMG data structures. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_info.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_info.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_info.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_info.c +/** @file primitives/nmg/nmg_info.c * * A companion module to nmg_mod.c which contains routines to * answer questions about n-Manifold Geometry data structures. Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_inter.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_inter.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_inter.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_inter.c +/** @file primitives/nmg/nmg_inter.c * * Routines to intersect two NMG regions. When complete, all loops in * each region have a single classification w.r.t. the other region, Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_junk.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_junk.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_junk.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_junk.c +/** @file primitives/nmg/nmg_junk.c * * This module is a resting place for unfinished subroutines that are * NOT a part of the current NMG library, but which were sufficiently Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_manif.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_manif.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_manif.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_manif.c +/** @file primitives/nmg/nmg_manif.c * * Routines for assessing the manifold dimension of an object. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mesh.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_mesh.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_mesh.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_mesh.c +/** @file primitives/nmg/nmg_mesh.c * * Meshing routines for n-Manifold Geometry. * This stuff is destined to be absorbed into nmg_fuse.c. Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file nmg_mirror.c +/** @file primitives/nmg/nmg_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_misc.c +/** @file primitives/nmg/nmg_misc.c * * As the name implies, these are miscellaneous routines that work with * the NMG structures. Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_mk.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_mk.c +/** @file primitives/nmg/nmg_mk.c * * Support routines for n-Manifold Geometry. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_mod.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_mod.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_mod.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_mod.c +/** @file primitives/nmg/nmg_mod.c * * Routines for modifying n-Manifold Geometry data structures. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_plot.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_plot.c +/** @file primitives/nmg/nmg_plot.c * * This file contains routines that create VLISTs and UNIX-plot files. * Some routines are essential to the MGED interface, some are more Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_pr.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_pr.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_pr.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_pr.c +/** @file primitives/nmg/nmg_pr.c * * Contains routines to print or describe NMG data structures. * These routines are always available (not conditionally compiled) Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_pt_fu.c +/** @file primitives/nmg/nmg_pt_fu.c * * Routines for classifying a point with respect to a faceuse. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_rt_isect.c +/** @file primitives/nmg/nmg_rt_isect.c * * Support routines for raytracing an NMG. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_rt_segs.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_rt_segs.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_rt_segs.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_rt_segs.c +/** @file primitives/nmg/nmg_rt_segs.c * * Support routines for raytracing an NMG. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_tri.c +/** @file primitives/nmg/nmg_tri.c * * Triangulate the faces of a polygonal NMG. * Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_tri_mc.c +/** @file primitives/nmg/nmg_tri_mc.c * * Triangulate the faces of a polygonal NMG using the marching cubes * algorithm. Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_visit.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_visit.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_visit.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup nmg */ /** @{ */ -/** @file nmg_visit.c +/** @file primitives/nmg/nmg_visit.c * * A generalized, object-oriented subroutine family to * visit all the data structures "below" a given structure. Modified: brlcad/trunk/src/librt/primitives/part/part.c =================================================================== --- brlcad/trunk/src/librt/primitives/part/part.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/part/part.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file part.c +/** @file primitives/part/part.c * * Intersect a ray with a "particle" solid, which can have three main * forms: sphere, hemisphere-tipped cylinder (lozenge), and Modified: brlcad/trunk/src/librt/primitives/part/part_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/part/part_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/part/part_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file part_mirror.c +/** @file primitives/part/part_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/pipe/pipe.c =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/pipe/pipe.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file pipe.c +/** @file primitives/pipe/pipe.c * * Intersect a ray with a pipe solid. * Modified: brlcad/trunk/src/librt/primitives/pipe/pipe_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/pipe/pipe_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file pipe_mirror.c +/** @file primitives/pipe/pipe_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/pnts/pnts.c =================================================================== --- brlcad/trunk/src/librt/primitives/pnts/pnts.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/pnts/pnts.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file pnts.c +/** @file primitives/pnts/pnts.c * * Collection of points. * Modified: brlcad/trunk/src/librt/primitives/poly/poly.c =================================================================== --- brlcad/trunk/src/librt/primitives/poly/poly.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/poly/poly.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file poly/poly.c +/** @file primitives/poly/poly.c * * Intersect a ray with a Polygonal Object that has no explicit * topology. It is assumed that the solid has no holes. Modified: brlcad/trunk/src/librt/primitives/poly/poly_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/poly/poly_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/poly/poly_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file poly_mirror.c +/** @file primitives/poly/poly_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/rec/rec.c =================================================================== --- brlcad/trunk/src/librt/primitives/rec/rec.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/rec/rec.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file rec.c +/** @file primitives/rec/rec.c * * Intersect a ray with a Right Eliptical Cylinder. This is a special * (but common) case of the TGC, which is handled separately. Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file revolve.c +/** @file primitives/revolve/revolve.c * * Intersect a ray with an 'revolve' primitive object. * Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file rhc.c +/** @file primitives/rhc/rhc.c * * Intersect a ray with a Right Hyperbolic Cylinder. * Modified: brlcad/trunk/src/librt/primitives/rhc/rhc_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/rhc/rhc_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file rhc_mirror.c +/** @file primitives/rhc/rhc_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file rpc.c +/** @file primitives/rpc/rpc.c * * Intersect a ray with a Right Parabolic Cylinder. * Modified: brlcad/trunk/src/librt/primitives/rpc/rpc_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/rpc/rpc_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file rpc_mirror.c +/** @file primitives/rpc/rpc_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/sketch/sketch.c =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/sketch/sketch.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file sketch.c +/** @file primitives/sketch/sketch.c * * Provide support for 2D sketches. * Modified: brlcad/trunk/src/librt/primitives/sph/sph.c =================================================================== --- brlcad/trunk/src/librt/primitives/sph/sph.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/sph/sph.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file sph.c +/** @file primitives/sph/sph.c * * Intersect a ray with a Sphere. * Special case of the Generalized Ellipsoid Modified: brlcad/trunk/src/librt/primitives/submodel/submodel.c =================================================================== --- brlcad/trunk/src/librt/primitives/submodel/submodel.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/submodel/submodel.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file submodel.c +/** @file primitives/submodel/submodel.c * * Intersect a ray with an entire subspace full of geometry, possibly * included from another .g file, with a subordinate instance of Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup primitives */ /** @{ */ -/** @file superell.c +/** @file primitives/superell/superell.c * * Intersect a ray with a Superquadratic Ellipsoid. * Modified: brlcad/trunk/src/librt/primitives/superell/superell_mirror.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell_mirror.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/superell/superell_mirror.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -17,7 +17,7 @@ * License along with this file; see the file named COPYING for more * information. */ -/** @file superell_mirror.c +/** @file primitives/superell/superell_mirror.c * * mirror support * Modified: brlcad/trunk/src/librt/primitives/table.c =================================================================== --- brlcad/trunk/src/librt/primitives/table.c 2011-06-22 12:14:26 UTC (rev 45197) +++ brlcad/trunk/src/librt/primitives/table.c 2011-06-22 13:04:55 UTC (rev 45198) @@ -19,7 +19,7 @@ */ /** @addtogroup g_ */ /** @{ */ -/** @file table.c +/** @file primitives/table.c * * Tables for the BRL-CAD Package ray-tracing library "librt". * Modifie... [truncated message content] |
From: <br...@us...> - 2011-07-28 05:34:42
|
Revision: 45680 http://brlcad.svn.sourceforge.net/brlcad/?rev=45680&view=rev Author: brlcad Date: 2011-07-28 05:34:35 +0000 (Thu, 28 Jul 2011) Log Message: ----------- remove unused var Modified Paths: -------------- brlcad/trunk/src/librt/primitives/bot/btgf.c brlcad/trunk/src/librt/primitives/dsp/dsp.c Modified: brlcad/trunk/src/librt/primitives/bot/btgf.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/btgf.c 2011-07-28 05:17:44 UTC (rev 45679) +++ brlcad/trunk/src/librt/primitives/bot/btgf.c 2011-07-28 05:34:35 UTC (rev 45680) @@ -50,8 +50,6 @@ void bottie_push_float(void *UNUSED(vtie), float **UNUSED(tri), unsigned int UNUSED(ntri), void *UNUSED(usr), unsigned int UNUSED(pstride)) { - struct tie_s *tie = (struct tie_s *)vtie; - tie = NULL; return; } Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2011-07-28 05:17:44 UTC (rev 45679) +++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2011-07-28 05:34:35 UTC (rev 45680) @@ -4978,8 +4978,6 @@ unsigned int x, y; int A[3], B[3], C[3], D[3]; - struct dsp_rpp dsp_rpp; - /* init points */ VSET(pt, 0, 0, 0); VSET(tri_pt, 0, 0, 0); @@ -5006,9 +5004,6 @@ if (RT_G_DEBUG & DEBUG_HF) bu_log("x:%d y:%d\n", x, y); - VSET(dsp_rpp.dsp_min, x, y, 0); - VSET(dsp_rpp.dsp_max, x+1, y+1, 0); - VSET(A, x, y, DSP(&dsp->dsp_i, x, y)); x += 1; VSET(B, x, y, DSP(&dsp->dsp_i, x, y)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-08-09 23:18:25
|
Revision: 45867 http://brlcad.svn.sourceforge.net/brlcad/?rev=45867&view=rev Author: brlcad Date: 2011-08-09 23:18:18 +0000 (Tue, 09 Aug 2011) Log Message: ----------- make the caller allocate an ON_Brep object, maybe they want to avoid dynamic memory allocation altogether. this plugs a leak in the csgbrep proc-db and begs changing the *_brep() param to a simple ON_Brep * instead of a double pointer. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp brlcad/trunk/src/librt/primitives/arbn/arbn_brep.cpp brlcad/trunk/src/librt/primitives/bot/bot_brep.cpp brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp brlcad/trunk/src/librt/primitives/dsp/dsp_brep.cpp brlcad/trunk/src/librt/primitives/ebm/ebm_brep.cpp brlcad/trunk/src/librt/primitives/ehy/ehy_brep.cpp brlcad/trunk/src/librt/primitives/ell/ell_brep.cpp brlcad/trunk/src/librt/primitives/epa/epa_brep.cpp brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp brlcad/trunk/src/librt/primitives/hyp/hyp_brep.cpp brlcad/trunk/src/librt/primitives/nmg/nmg_brep.cpp brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp brlcad/trunk/src/librt/primitives/poly/poly_brep.cpp brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp brlcad/trunk/src/librt/primitives/tgc/tgc_brep.cpp brlcad/trunk/src/librt/primitives/vol/vol_brep.cpp Modified: brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/arb8/arb8_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -50,9 +50,6 @@ ttmptol.norm = 0; const struct rt_tess_tol *ttol = &ttmptol; - *b = NULL; - *b = ON_Brep::New(); - struct model *arbm = nmg_mm(); struct nmgregion *arbr; tmp_internal->idb_ptr = (genptr_t)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/arbn/arbn_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/arbn/arbn_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/arbn/arbn_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -51,9 +51,6 @@ ttmptol.norm = 0; const struct rt_tess_tol *ttol = &ttmptol; - *b = NULL; - *b = ON_Brep::New(); - struct model *arbn_nmg = nmg_mm(); struct nmgregion *arbnmgr; tmp_internal->idb_ptr = (genptr_t)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/bot/bot_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/bot/bot_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -50,9 +50,6 @@ ttmptol.norm = 0; const struct rt_tess_tol *ttol = &ttmptol; - *b = NULL; - *b = ON_Brep::New(); - struct model *botm = nmg_mm(); struct nmgregion *botr; tmp_internal->idb_ptr = (genptr_t)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/bspline/nurb_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,7 +42,6 @@ RT_NURB_CK_MAGIC(nip); ON_TextLog log(stderr); - *b = ON_Brep::New(); for (i = 0; i < nip->nsrf; i++) { struct face_g_snurb *surface = nip->srfs[i]; Modified: brlcad/trunk/src/librt/primitives/dsp/dsp_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/dsp/dsp_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -48,8 +48,6 @@ dsp_ip = (struct rt_dsp_internal *)ip->idb_ptr; RT_DSP_CK_MAGIC(dsp_ip); - *b = ON_Brep::New(); - /* A DSP brep is broken down into faces as follows: * * 1. The bottom face, a simple planar surface Modified: brlcad/trunk/src/librt/primitives/ebm/ebm_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/ebm/ebm_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -50,9 +50,6 @@ ttmptol.norm = 0; const struct rt_tess_tol *ttol = &ttmptol; - *b = NULL; - *b = ON_Brep::New(); - struct model *ebmm = nmg_mm(); struct nmgregion *ebmr; tmp_internal->idb_ptr = (genptr_t)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/ehy/ehy_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/ehy/ehy_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,8 +42,6 @@ eip = (struct rt_ehy_internal *)ip->idb_ptr; RT_EHY_CK_MAGIC(eip); - *b = ON_Brep::New(); - ON_TextLog dump_to_stdout; ON_TextLog* dump = &dump_to_stdout; Modified: brlcad/trunk/src/librt/primitives/ell/ell_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/ell/ell_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -41,8 +41,6 @@ eip = (struct rt_ell_internal *)ip->idb_ptr; RT_ELL_CK_MAGIC(eip); - *b = ON_Brep::New(); - point_t origin; VSET(origin, 0, 0, 0); Modified: brlcad/trunk/src/librt/primitives/epa/epa_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/epa/epa_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,8 +42,6 @@ eip = (struct rt_epa_internal *)ip->idb_ptr; RT_EPA_CK_MAGIC(eip); - *b = ON_Brep::New(); - ON_TextLog dump_to_stdout; ON_TextLog* dump = &dump_to_stdout; Modified: brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/eto/eto_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -38,8 +38,6 @@ { struct rt_eto_internal *eip; - *b = NULL; - RT_CK_DB_INTERNAL(ip); eip = (struct rt_eto_internal *)ip->idb_ptr; RT_ETO_CK_MAGIC(eip); @@ -96,7 +94,6 @@ eto_surf->m_axis = revaxis; /* Create brep with one face*/ - *b = ON_Brep::New(); ON_BrepFace *newface = (*b)->NewFace(*eto_surf); (*b)->FlipFace(*newface); // (*b)->Standardize(); Modified: brlcad/trunk/src/librt/primitives/hyp/hyp_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/hyp/hyp_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,8 +42,6 @@ eip = (struct rt_hyp_internal *)ip->idb_ptr; RT_HYP_CK_MAGIC(eip); - *b = ON_Brep::New(); - point_t p1_origin, p2_origin; ON_3dPoint plane1_origin, plane2_origin; ON_3dVector plane_x_dir, plane_y_dir; Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/nmg/nmg_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -70,8 +70,6 @@ brepi = static_cast<long*>(bu_malloc(m->maxindex * sizeof(long), "rt_nmg_brep: brepi[]")); for (int i = 0; i < m->maxindex; i++) brepi[i] = -INT_MAX; - *b = ON_Brep::New(); - for (BU_LIST_FOR(r, nmgregion, &m->r_hd)) { for (BU_LIST_FOR(s, shell, &r->s_hd)) { for (BU_LIST_FOR(fu, faceuse, &s->fu_hd)) { Modified: brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/pipe/pipe_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -154,8 +154,6 @@ if (BU_LIST_IS_HEAD(&curp->l, &pip->pipe_segs_head)) return; VMOVE(current_point, prevp->pp_coord); - - *b = ON_Brep::New(); VSUB2(pipe_dir, prevp->pp_coord, curp->pp_coord); bn_vec_ortho(x_dir, pipe_dir); Modified: brlcad/trunk/src/librt/primitives/poly/poly_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/poly/poly_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/poly/poly_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -50,9 +50,6 @@ ttmptol.norm = 0; const struct rt_tess_tol *ttol = &ttmptol; - *b = NULL; - *b = ON_Brep::New(); - struct model *polym = nmg_mm(); struct nmgregion *polyr; tmp_internal->idb_ptr = (genptr_t)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/revolve/revolve_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -163,8 +163,6 @@ eip = rip->sk; RT_SKETCH_CK_MAGIC(eip); - *b = ON_Brep::New(); - ON_3dPoint plane_origin; ON_3dVector plane_x_dir, plane_y_dir; Modified: brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/rhc/rhc_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,8 +42,6 @@ eip = (struct rt_rhc_internal *)ip->idb_ptr; RT_RHC_CK_MAGIC(eip); - *b = ON_Brep::New(); - ON_TextLog dump_to_stdout; ON_TextLog* dump = &dump_to_stdout; Modified: brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/rpc/rpc_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,8 +42,6 @@ eip = (struct rt_rpc_internal *)ip->idb_ptr; RT_RPC_CK_MAGIC(eip); - *b = ON_Brep::New(); - ON_TextLog dump_to_stdout; ON_TextLog* dump = &dump_to_stdout; Modified: brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/sketch/sketch_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -144,8 +144,6 @@ eip = (struct rt_sketch_internal *)ip->idb_ptr; RT_SKETCH_CK_MAGIC(eip); - *b = ON_Brep::New(); - ON_3dPoint plane_origin; ON_3dVector plane_x_dir, plane_y_dir; Modified: brlcad/trunk/src/librt/primitives/tgc/tgc_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/tgc/tgc_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/tgc/tgc_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -42,8 +42,6 @@ eip = (struct rt_tgc_internal *)ip->idb_ptr; RT_TGC_CK_MAGIC(eip); - *b = ON_Brep::New(); - point_t p1_origin, p2_origin; ON_3dPoint plane1_origin, plane2_origin; ON_3dVector plane1_x_dir, plane1_y_dir, plane2_x_dir, plane2_y_dir; Modified: brlcad/trunk/src/librt/primitives/vol/vol_brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/vol/vol_brep.cpp 2011-08-09 23:16:41 UTC (rev 45866) +++ brlcad/trunk/src/librt/primitives/vol/vol_brep.cpp 2011-08-09 23:18:18 UTC (rev 45867) @@ -50,9 +50,6 @@ ttmptol.norm = 0; const struct rt_tess_tol *ttol = &ttmptol; - *b = NULL; - *b = ON_Brep::New(); - struct model *volm = nmg_mm(); struct nmgregion *volr; tmp_internal->idb_ptr = (genptr_t)ip->idb_ptr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |