Revision: 41496
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41496&view=rev
Author:   brlcad
Date:     2010-12-02 23:00:43 +0000 (Thu, 02 Dec 2010)

Log Message:
-----------
callers of bn_ck_mat() have better knowledge about the state that leads up to a 
bad matrix so don't print by default at this low level.  this fixes 
double-printing of matrices if you open a corrupt v4.

Modified Paths:
--------------
    brlcad/trunk/src/libbn/mat.c

Modified: brlcad/trunk/src/libbn/mat.c
===================================================================
--- brlcad/trunk/src/libbn/mat.c        2010-12-02 13:57:47 UTC (rev 41495)
+++ brlcad/trunk/src/libbn/mat.c        2010-12-02 23:00:43 UTC (rev 41496)
@@ -266,8 +266,11 @@
 bn_mat_inv(register mat_t output, const mat_t input)
 {
     if (bn_mat_inverse(output, input) == 0) {
-       bu_log("bn_mat_inv:  error!");
-       bn_mat_print("singular matrix", input);
+
+       if (bu_debug & BU_DEBUG_MATH) {
+           bu_log("bn_mat_inv:  error!");
+           bn_mat_print("singular matrix", input);
+       }
        bu_bomb("bn_mat_inv: singular matrix\n");
        /* NOTREACHED */
     }
@@ -1325,9 +1328,10 @@
        || !NEAR_ZERO(fz, 0.00001)
        || NEAR_ZERO(m[15], VDIVIDE_TOL))
     {
-       bu_log("bn_mat_ck(%s):  bad matrix, does not preserve axis 
perpendicularity.\n  X.Y=%g, Y.Z=%g, X.Z=%g, s=%g\n",
-              title, fx, fy, fz, m[15]);
-       bn_mat_print("bn_mat_ck() bad matrix", m);
+       if (bu_debug & BU_DEBUG_MATH) {
+           bu_log("bn_mat_ck(%s):  bad matrix, does not preserve axis 
perpendicularity.\n  X.Y=%g, Y.Z=%g, X.Z=%g, s=%g\n", title, fx, fy, fz, m[15]);
+           bn_mat_print("bn_mat_ck() bad matrix", m);
+       }
 
        if (bu_debug & (BU_DEBUG_MATH | BU_DEBUG_COREDUMP)) {
            bu_debug |= BU_DEBUG_COREDUMP;


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

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to