Panda3D
|
00001 // Filename: coordinateSystem.h 00002 // Created by: drose (24Sep99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef COORDINATESYSTEM_H 00016 #define COORDINATESYSTEM_H 00017 00018 #include "pandabase.h" 00019 00020 #include "typedef.h" 00021 00022 BEGIN_PUBLISH 00023 00024 enum CoordinateSystem { 00025 // The CS_default entry does not refer to a particular coordinate 00026 // system, but rather to the value stored in 00027 // default_coordinate_system, which in turn is loaded from the 00028 // config variable "coordinate-system". 00029 CS_default, 00030 00031 CS_zup_right, 00032 CS_yup_right, 00033 CS_zup_left, 00034 CS_yup_left, 00035 00036 // CS_invalid is not a coordinate system at all. It can be used in 00037 // user-input processing code to indicate a contradictory coordinate 00038 // system request. 00039 CS_invalid, 00040 }; 00041 00042 EXPCL_PANDA_LINMATH CoordinateSystem get_default_coordinate_system(); 00043 EXPCL_PANDA_LINMATH CoordinateSystem parse_coordinate_system_string(const string &str); 00044 EXPCL_PANDA_LINMATH string format_coordinate_system(CoordinateSystem cs); 00045 EXPCL_PANDA_LINMATH bool is_right_handed(CoordinateSystem cs = CS_default); 00046 00047 END_PUBLISH 00048 00049 #define IS_LEFT_HANDED_COORDSYSTEM(cs) ((cs==CS_zup_left) || (cs==CS_yup_left)) 00050 00051 EXPCL_PANDA_LINMATH ostream &operator << (ostream &out, CoordinateSystem cs); 00052 EXPCL_PANDA_LINMATH istream &operator >> (istream &in, CoordinateSystem &cs); 00053 00054 00055 #endif 00056