Revision: 52517
http://brlcad.svn.sourceforge.net/brlcad/?rev=52517&view=rev
Author: Abhi2011
Date: 2012-09-23 15:17:37 +0000 (Sun, 23 Sep 2012)
Log Message:
-----------
More fixes. Scaled the mged supplied AABB bounds by 0.0001 to bring it into
meters before feeding into bullet.
Modified Paths:
--------------
brlcad/trunk/src/libged/simulate/simulate.c
Modified: brlcad/trunk/src/libged/simulate/simulate.c
===================================================================
--- brlcad/trunk/src/libged/simulate/simulate.c 2012-09-23 14:51:08 UTC (rev
52516)
+++ brlcad/trunk/src/libged/simulate/simulate.c 2012-09-23 15:17:37 UTC (rev
52517)
@@ -186,35 +186,39 @@
/* Free memory in rigid_body list */
for (current_node = sim_params->head_node; current_node != NULL;
current_node = current_node->next) {
- /* Get its BB */
- if (rt_bound_internal(gedp->ged_wdbp->dbip, current_node->dp, rpp_min,
rpp_max) == 0) {
- bu_log("get_bb: Got the BB for \"%s\" as \
+ /* Get its BB */
+ if (rt_bound_internal(gedp->ged_wdbp->dbip, current_node->dp,
rpp_min, rpp_max) == 0) {
+ bu_log("get_bb: Got the BB for \"%s\" as \
min {%f %f %f} max {%f %f %f}\n",
current_node->dp->d_namep,
- V3ARGS(rpp_min),
- V3ARGS(rpp_max));
- } else {
- bu_log("get_bb: ERROR Could not get the BB\n");
- return GED_ERROR;
- }
+ V3ARGS(rpp_min),
+ V3ARGS(rpp_max));
+ } else {
+ bu_log("get_bb: ERROR Could not get the BB\n");
+ return GED_ERROR;
+ }
- VMOVE(current_node->bb_min, rpp_min);
- VMOVE(current_node->bb_max, rpp_max);
+ //VMOVE(current_node->bb_min, rpp_min);
+ //VMOVE(current_node->bb_max, rpp_max);
- /* Get BB length, width, height */
- VSUB2(current_node->bb_dims, current_node->bb_max,
current_node->bb_min);
+ VSCALE(current_node->bb_min, rpp_min, 0.001);
+ VSCALE(current_node->bb_max, rpp_max, 0.001);
- bu_log("get_bb: Dimensions of this BB : %f %f %f\n",
V3ARGS(current_node->bb_dims));
- /* Get BB position in 3D space */
- VSCALE(current_node->bb_center, current_node->bb_dims, 0.5);
- VADD2(current_node->bb_center, current_node->bb_center,
current_node->bb_min)
+ /* Get BB length, width, height */
+ VSUB2(current_node->bb_dims, current_node->bb_max,
current_node->bb_min);
+ bu_log("get_bb: Dimensions of this BB : %f %f %f\n",
V3ARGS(current_node->bb_dims));
+
+ /* Get BB position in 3D space */
+ VSCALE(current_node->bb_center, current_node->bb_dims, 0.5);
+ VADD2(current_node->bb_center, current_node->bb_center,
current_node->bb_min)
+
MAT_IDN(current_node->m);
- current_node->m[12] = current_node->bb_center[0];
- current_node->m[13] = current_node->bb_center[1];
- current_node->m[14] = current_node->bb_center[2];
+ current_node->m[12] = current_node->bb_center[0];
+ current_node->m[13] = current_node->bb_center[1];
+ current_node->m[14] = current_node->bb_center[2];
- MAT_COPY(current_node->m_prev, current_node->m);
+ MAT_COPY(current_node->m_prev, current_node->m);
}
return GED_OK;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits