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);