Revision: 47274
          http://brlcad.svn.sourceforge.net/brlcad/?rev=47274&view=rev
Author:   abhi2011
Date:     2011-10-17 00:17:16 +0000 (Mon, 17 Oct 2011)
Log Message:
-----------
More changes to help in debugging, disabled rayshooting for now, generating 
points only from the overlap region as I am debugging the case of a small box 
lying on a thin but larger box, so the overlap region can be used to generate 
correct contact pairs. Apparently the contact pairs are getting inserted but 
are not making it till the dynamics component of Bullet

Modified Paths:
--------------
    brlcad/trunk/src/libged/simulate/simcollisionalgo.cpp
    brlcad/trunk/src/libged/simulate/simrt.c

Modified: brlcad/trunk/src/libged/simulate/simcollisionalgo.cpp
===================================================================
--- brlcad/trunk/src/libged/simulate/simcollisionalgo.cpp       2011-10-16 
23:26:49 UTC (rev 47273)
+++ brlcad/trunk/src/libged/simulate/simcollisionalgo.cpp       2011-10-17 
00:17:16 UTC (rev 47274)
@@ -39,7 +39,9 @@
 
 #define USE_PERSISTENT_CONTACTS 1
 
+#define DEBUG_MF 1
 
+
 btRTCollisionAlgorithm::btRTCollisionAlgorithm(btPersistentManifold* mf,
                                               const 
btCollisionAlgorithmConstructionInfo& ci,
                                               btCollisionObject* obj0,
@@ -75,8 +77,10 @@
 
     btCollisionObject* col0 = body0;
     btCollisionObject* col1 = body1;
- /*   btBoxShape* box0 = (btBoxShape*)col0->getCollisionShape();
-    btBoxShape* box1 = (btBoxShape*)col1->getCollisionShape();*/
+#ifndef DEBUG_MF
+    btBoxShape* box0 = (btBoxShape*)col0->getCollisionShape();
+    btBoxShape* box1 = (btBoxShape*)col1->getCollisionShape();
+#endif //DEBUG_MF
 
     //quellage
     bu_log("%d", dispatchInfo.m_stepCount);
@@ -92,11 +96,12 @@
     input.m_transformA = body0->getWorldTransform();
     input.m_transformB = body1->getWorldTransform();
 
+#ifndef DEBUG_MF
     //This part will get replaced with a call to rt
-  //  btBoxBoxDetector detector(box0, box1);
-   // detector.getClosestPoints(input, *resultOut, dispatchInfo.m_debugDraw);
+    btBoxBoxDetector detector(box0, box1);
+    detector.getClosestPoints(input, *resultOut, dispatchInfo.m_debugDraw);
+#endif //DEBUG_MF
 
-
     //------------------- DEBUG ---------------------------
 
     int i;
@@ -164,7 +169,7 @@
 
 
            //Scan all RT manifolds of rbB looking for a rbA-rbB 
manifold----------------------
-
+#ifdef DEBUG_MF
                for (rt_mf = rbB->head_rt_manifold; rt_mf != NULL;
                         rt_mf = rt_mf->next) {
 
@@ -208,11 +213,11 @@
           }//end- for (rt_mf = rbB->head_rt_manifold...
 
     } //end-if
+#endif //DEBUG_MF
 
 
 
 
-
     //------------------------------------------------------
 
 #ifdef USE_PERSISTENT_CONTACTS

Modified: brlcad/trunk/src/libged/simulate/simrt.c
===================================================================
--- brlcad/trunk/src/libged/simulate/simrt.c    2011-10-16 23:26:49 UTC (rev 
47273)
+++ brlcad/trunk/src/libged/simulate/simrt.c    2011-10-17 00:17:16 UTC (rev 
47274)
@@ -726,7 +726,7 @@
                        add_to_comb(gedp, sim_params->sim_comb_name, 
bu_vls_addr(&overlap_name));
 
                        /* Initialize the rayshot results structure, has to be 
done for each manifold  */
-                       init_rayshot_results();
+                       /*init_rayshot_results();*/
 
                        /* Allocate memory for a new RT manifold */
                        rt_mf = (struct sim_manifold *)
@@ -740,7 +740,7 @@
                        if (rb->head_rt_manifold == NULL) {
                                rb->head_rt_manifold = rt_mf;
                        } else{
-                               //Go upto the last manifold, keeping a ptr 1 
node behind
+                               /* Go upto the last manifold, keeping a ptr 1 
node behind */
                                p1 = rb->head_bt_manifold;
                                while (p1 != NULL) {
                                        p2 = p1;
@@ -748,7 +748,6 @@
                                }
 
                                p2->next = rt_mf;
-                               //print_manifold_list(rb->head_manifold);
                        }
                        rb->num_rt_manifolds++;
 
@@ -756,7 +755,7 @@
                        /* Shoot rays right here as the pair of rigid_body ptrs 
are known,
                         * TODO: ignore volumes already shot
                         */
-                       shoot_x_rays(gedp, rt_mf, sim_params, rtip, 
overlap_min, overlap_max);
+                       /*shoot_x_rays(gedp, rt_mf, sim_params, rtip, 
overlap_min, overlap_max);*/
 
 
                        /* shoot_y_rays(); */

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


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to