Panda3D
|
00001 // Filename: eggCoordinateSystem.cxx 00002 // Created by: drose (20Jan99) 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 #include "eggCoordinateSystem.h" 00016 00017 #include "indent.h" 00018 00019 TypeHandle EggCoordinateSystem::_type_handle; 00020 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Function: EggCoordinateSystem::write 00024 // Access: Public, Virtual 00025 // Description: Writes the coordinate system definition to the 00026 // indicated output stream in Egg format. 00027 //////////////////////////////////////////////////////////////////// 00028 void EggCoordinateSystem:: 00029 write(ostream &out, int indent_level) const { 00030 if (get_value() != CS_default && 00031 get_value() != CS_invalid) { 00032 indent(out, indent_level) 00033 << "<CoordinateSystem> { "; 00034 switch (get_value()) { 00035 case CS_zup_right: 00036 out << "Z-Up"; 00037 break; 00038 00039 case CS_yup_right: 00040 out << "Y-Up"; 00041 break; 00042 00043 case CS_zup_left: 00044 out << "Z-Up-Left"; 00045 break; 00046 00047 case CS_yup_left: 00048 out << "Y-Up-Left"; 00049 break; 00050 00051 default: 00052 out << "/* Invalid coordinate system " << (int)get_value() << " */"; 00053 } 00054 out << " }\n\n"; 00055 } 00056 }