Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
bfee93ce44
2 changed files with 14 additions and 1 deletions
  1. 1 1
      panda/src/graph/matrixTransition.I
  2. 13 0
      panda/src/testbed/demo.cxx

+ 1 - 1
panda/src/graph/matrixTransition.I

@@ -183,7 +183,7 @@ internal_compare_to(const NodeTransition *other) const {
   // For now, we compare componentwise.  It makes paranoid_wrt more
   // sensible, and it doesn't seem to make a big different to
   // performance.
-  return _matrix.compare_to(ot->_matrix, 0.001);
+  return _matrix.compare_to(ot->_matrix, 0.00001);
 
   // Uncomment this line instead to compare matrices pointerwise.
   //  return this - other;

+ 13 - 0
panda/src/testbed/demo.cxx

@@ -333,6 +333,18 @@ event_fkey(CPT_Event event) {
   }
 }
 
+static void
+event_B(CPT_Event event) {
+  if (selected_node.has_arcs()) {
+    // List everything under the selected bounding volume and
+    // recompute the volume.
+    selected_node.ls();
+    selected_node.analyze();
+
+    selected_node.arc()->force_bound_stale();
+  }
+}
+
 static void
 enable_highlight() {
   if (highlight_render_node == NULL) {
@@ -552,6 +564,7 @@ void demo_keys(EventHandler&) {
   event_handler.add_hook("f7", event_fkey);
   event_handler.add_hook("f8", event_fkey);
   event_handler.add_hook("f9", event_fkey);
+  event_handler.add_hook("B", event_B);
 
   event_handler.add_hook("L", event_L);
   event_handler.add_hook("k", event_k);