From 2d221eadb2936d4bdd425d4617ddbb116dfa5a03 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 2 Jul 2003 22:38:02 +0000 Subject: [PATCH] standard order should reflect temp-hpr-fix --- panda/src/egg/eggXfmSAnim.I | 6 +++++- panda/src/egg/eggXfmSAnim.cxx | 10 +++++----- panda/src/egg/eggXfmSAnim.h | 7 ++++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/panda/src/egg/eggXfmSAnim.I b/panda/src/egg/eggXfmSAnim.I index 60096c7852..08457df826 100644 --- a/panda/src/egg/eggXfmSAnim.I +++ b/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; + } } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/egg/eggXfmSAnim.cxx b/panda/src/egg/eggXfmSAnim.cxx index 10da746848..6077f6d0ed 100644 --- a/panda/src/egg/eggXfmSAnim.cxx +++ b/panda/src/egg/eggXfmSAnim.cxx @@ -22,20 +22,20 @@ #include "eggParameters.h" #include "config_egg.h" -#include -#include +#include "indent.h" +#include "compose_matrix.h" #include 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. diff --git a/panda/src/egg/eggXfmSAnim.h b/panda/src/egg/eggXfmSAnim.h index d3db8aa0d7..f899e3ef13 100644 --- a/panda/src/egg/eggXfmSAnim.h +++ b/panda/src/egg/eggXfmSAnim.h @@ -20,9 +20,9 @@ #define EGGXFMSANIM_H -#include - +#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;