Revision: 41904
http://brlcad.svn.sourceforge.net/brlcad/?rev=41904&view=rev
Author: erikgreenwald
Date: 2011-01-03 18:40:30 +0000 (Mon, 03 Jan 2011)
Log Message:
-----------
remote hitsort (should already be sorted from tie). test for maxhits earlier.
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 2011-01-03
15:15:39 UTC (rev 41903)
+++ brlcad/branches/bottie/src/librt/primitives/bot/btg.c 2011-01-03
18:40:30 UTC (rev 41904)
@@ -109,14 +109,15 @@
struct tri_specific *tsp;
struct hit *hp;
+ if(h->nhits > (MAXHITS-1)) {
+ bu_log("Too many hits!\n");
+ return 1;
+ }
+
hp = &h->hits[h->nhits];
tsp = hp->hit_private = &h->ts[h->nhits];
h->nhits++;
- if(h->nhits > MAXHITS) {
- bu_log("Too many hits!\n");
- return 1;
- }
hp->hit_magic = RT_HIT_MAGIC;
hp->hit_dist = id->dist;
@@ -151,9 +152,6 @@
if(hitdata.nhits == 0)
return 0;
- /* this func is in ars, for some reason. All it needs is the dist. */
- rt_hitsort(hitdata.hits, hitdata.nhits);
-
return rt_bot_makesegs(hitdata.hits, hitdata.nhits, stp, rp, ap, seghead,
NULL);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits