From 19df0046defe386bd5985cf983682d41da9319c3 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 22 Jun 2001 23:30:49 +0000 Subject: [PATCH] fix bug with set_coordinate_system not updating right away --- panda/src/egg/eggData.cxx | 4 ++++ panda/src/egg/eggNode.I | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index 8976127517..f0f0a28fe1 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -232,6 +232,10 @@ set_coordinate_system(CoordinateSystem new_coordsys) { r_transform(LMatrix4d::convert_mat(_coordsys, new_coordsys), LMatrix4d::convert_mat(new_coordsys, _coordsys), new_coordsys); + + // Now we have to update the under_flags to ensure that all the + // cached relative matrices are correct. + update_under(0); } _coordsys = new_coordsys; diff --git a/panda/src/egg/eggNode.I b/panda/src/egg/eggNode.I index 43487ea815..c161cad4a4 100644 --- a/panda/src/egg/eggNode.I +++ b/panda/src/egg/eggNode.I @@ -224,6 +224,10 @@ transform(const LMatrix4d &mat) { LMatrix4d inv = invert(mat); r_transform(mat, inv, CS_default); + + // Now we have to recompute the under_flags to ensure that all the + // cached relative matrices are correct. + update_under(0); } ////////////////////////////////////////////////////////////////////