[brlcad-commits] SF.net SVN: brlcad:[41840] brlcad/branches/bottie/src/librt/primitives/bot/ btg.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <eri...@us...> - 2010-12-29 20:23:47
|
Revision: 41840 http://brlcad.svn.sourceforge.net/brlcad/?rev=41840&view=rev Author: erikgreenwald Date: 2010-12-29 20:23:40 +0000 (Wed, 29 Dec 2010) Log Message: ----------- add tri_specific for segment normal info Modified Paths: -------------- brlcad/branches/bottie/src/librt/primitives/bot/btg.c Modified: brlcad/branches/bottie/src/librt/primitives/bot/btg.c =================================================================== --- brlcad/branches/bottie/src/librt/primitives/bot/btg.c 2010-12-29 16:08:10 UTC (rev 41839) +++ brlcad/branches/bottie/src/librt/primitives/bot/btg.c 2010-12-29 20:23:40 UTC (rev 41840) @@ -98,6 +98,7 @@ struct hitdata_s { int nhits; struct hit hits[MAXHITS]; + struct tri_specific ts[MAXHITS]; struct xray *rp; }; @@ -105,9 +106,11 @@ hitfunc(tie_ray_t *ray, tie_id_t *id, tie_tri_t *tri, void *ptr) { struct hitdata_s *h = (struct hitdata_s *)ptr; + struct tri_specific *tsp; struct hit *hp; hp = &h->hits[h->nhits]; + tsp = hp->hit_private = &h->ts[h->nhits]; h->nhits++; if(h->nhits > MAXHITS) { @@ -117,7 +120,7 @@ hp->hit_magic = RT_HIT_MAGIC; hp->hit_dist = id->dist; - hp->hit_private = tri->ptr; + VMOVE(tsp->tri_N, id->norm.v); /* add hitdist into array and add one to nhits */ return NULL; /* continue firing */ @@ -148,8 +151,6 @@ if(hitdata.nhits == 0) return 0; - bu_log("Bang!\n"); - /* this func is in ars, for some reason. All it needs is the dist. */ rt_hitsort(hitdata.hits, hitdata.nhits); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |