00001 // Filename: eggCoordinateSystem.cxx 00002 // Created by: drose (20Jan99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "eggCoordinateSystem.h" 00020 00021 #include <indent.h> 00022 00023 TypeHandle EggCoordinateSystem::_type_handle; 00024 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Function: EggCoordinateSystem::write 00028 // Access: Public, Virtual 00029 // Description: Writes the coordinate system definition to the 00030 // indicated output stream in Egg format. 00031 //////////////////////////////////////////////////////////////////// 00032 void EggCoordinateSystem:: 00033 write(ostream &out, int indent_level) const { 00034 if (get_value() != CS_default && 00035 get_value() != CS_invalid) { 00036 indent(out, indent_level) 00037 << "<CoordinateSystem> { "; 00038 switch (get_value()) { 00039 case CS_zup_right: 00040 out << "Z-Up"; 00041 break; 00042 00043 case CS_yup_right: 00044 out << "Y-Up"; 00045 break; 00046 00047 case CS_zup_left: 00048 out << "Z-Up-Left"; 00049 break; 00050 00051 case CS_yup_left: 00052 out << "Y-Up-Left"; 00053 break; 00054 00055 default: 00056 out << "/* Invalid coordinate system " << (int)get_value() << " */"; 00057 } 00058 out << " }\n\n"; 00059 } 00060 }