Browse Source

standard order should reflect temp-hpr-fix

David Rose 22 years ago
parent
commit
2d221eadb2
3 changed files with 14 additions and 9 deletions
  1. 5 1
      panda/src/egg/eggXfmSAnim.I
  2. 5 5
      panda/src/egg/eggXfmSAnim.cxx
  3. 4 3
      panda/src/egg/eggXfmSAnim.h

+ 5 - 1
panda/src/egg/eggXfmSAnim.I

@@ -158,7 +158,11 @@ get_order() const {
 ////////////////////////////////////////////////////////////////////
 INLINE const string &EggXfmSAnim::
 get_standard_order() {
-  return _standard_order;
+  if (temp_hpr_fix) {
+    return _standard_order_hpr_fix;
+  } else {
+    return _standard_order_legacy;
+  }
 }
 
 ////////////////////////////////////////////////////////////////////

+ 5 - 5
panda/src/egg/eggXfmSAnim.cxx

@@ -22,20 +22,20 @@
 #include "eggParameters.h"
 #include "config_egg.h"
 
-#include <indent.h>
-#include <compose_matrix.h>
+#include "indent.h"
+#include "compose_matrix.h"
 
 #include <math.h>
 
 TypeHandle EggXfmSAnim::_type_handle;
 
-//string EggXfmSAnim::_standard_order = "srpht";
 
 // For now, the standard order is sphrt.  This matches the old,
 // incorrect behavior of decompose_matrix().  When we have a new
 // egg-optchar, we can safely remove the old decompose_matrix() and
-// restore the correct standard order (above).
-const string EggXfmSAnim::_standard_order = "sphrt";
+// restore the correct standard order.
+const string EggXfmSAnim::_standard_order_legacy = "sphrt";
+const string EggXfmSAnim::_standard_order_hpr_fix = "srpht";
 
 // These are the table ID's of all tables we support, in the order we
 // expect to write them to the egg file.

+ 4 - 3
panda/src/egg/eggXfmSAnim.h

@@ -20,9 +20,9 @@
 #define EGGXFMSANIM_H
 
 
-#include <pandabase.h>
-
+#include "pandabase.h"
 #include "eggGroupNode.h"
+#include "config_linmath.h"  // for temp_hpr_fix
 
 class EggXfmAnimData;
 
@@ -92,7 +92,8 @@ private:
   string _order;
   CoordinateSystem _coordsys;
 
-  static const string _standard_order;
+  static const string _standard_order_legacy;
+  static const string _standard_order_hpr_fix;
   static const string _table_ids;
   static const int _num_table_ids;