From 651a95df40520cb4e2bd8f103b04a36d7b9122ec Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 4 Feb 2012 00:04:29 +0000 Subject: [PATCH] format_coordinate_system() --- panda/src/linmath/coordinateSystem.cxx | 7 +++++++ panda/src/linmath/coordinateSystem.h | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/panda/src/linmath/coordinateSystem.cxx b/panda/src/linmath/coordinateSystem.cxx index e614f5121f..372768724c 100644 --- a/panda/src/linmath/coordinateSystem.cxx +++ b/panda/src/linmath/coordinateSystem.cxx @@ -65,6 +65,13 @@ parse_coordinate_system_string(const string &str) { return CS_invalid; } +string +format_coordinate_system(CoordinateSystem cs) { + ostringstream strm; + strm << cs; + return strm.str(); +} + bool is_right_handed(CoordinateSystem cs) { if (cs == CS_default) { diff --git a/panda/src/linmath/coordinateSystem.h b/panda/src/linmath/coordinateSystem.h index 59a73ccc44..f1f0edc98d 100644 --- a/panda/src/linmath/coordinateSystem.h +++ b/panda/src/linmath/coordinateSystem.h @@ -40,12 +40,12 @@ enum CoordinateSystem { }; EXPCL_PANDA_LINMATH CoordinateSystem get_default_coordinate_system(); +EXPCL_PANDA_LINMATH CoordinateSystem parse_coordinate_system_string(const string &str); +EXPCL_PANDA_LINMATH string format_coordinate_system(CoordinateSystem cs); +EXPCL_PANDA_LINMATH bool is_right_handed(CoordinateSystem cs = CS_default); END_PUBLISH -EXPCL_PANDA_LINMATH CoordinateSystem parse_coordinate_system_string(const string &str); -EXPCL_PANDA_LINMATH bool is_right_handed(CoordinateSystem cs = CS_default); - #define IS_LEFT_HANDED_COORDSYSTEM(cs) ((cs==CS_zup_left) || (cs==CS_yup_left)) EXPCL_PANDA_LINMATH ostream &operator << (ostream &out, CoordinateSystem cs);