Revision: 52791
          http://brlcad.svn.sourceforge.net/brlcad/?rev=52791&view=rev
Author:   r_weiss
Date:     2012-10-04 20:16:13 +0000 (Thu, 04 Oct 2012)
Log Message:
-----------
Fixed a bug in function "isect_ray_planar_face" in file "nmg_rt_isect.c". 
Points were not being detected in the negative direction from the plane which 
were more than distance tolerance away. Also added the "UNLIKELY" macro to 
improve performance.

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c

Modified: brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c        2012-10-04 
20:10:49 UTC (rev 52790)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg_rt_isect.c        2012-10-04 
20:16:13 UTC (rev 52791)
@@ -2082,13 +2082,13 @@
     VMOVE(plane_pt, rd->plane_pt);
     dist = rd->ray_dist_to_plane;
 
-    if (DIST_PT_PLANE(plane_pt, norm) > rd->tol->dist) {
+    if (UNLIKELY(fabs(DIST_PT_PLANE(plane_pt, norm)) > rd->tol->dist)) {
        bu_log("%s:%d plane_pt (%g %g %g) @ dist (%g)out of tolerance\n",
               __FILE__, __LINE__, V3ARGS(plane_pt), dist);
        bu_bomb("isect_ray_planar_face() dist out of tol\n");
     }
 
-    if (rt_g.NMG_debug & DEBUG_RT_ISECT) {
+    if (UNLIKELY(rt_g.NMG_debug & DEBUG_RT_ISECT)) {
        fastf_t new_dist;
        bu_log("\tray (%16.10e %16.10e %16.10e) (-> %16.10e %16.10e %16.10e)\n",
               rd->rp->r_pt[0],

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to