eggCoordinateSystem.cxx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Filename: eggCoordinateSystem.cxx
  2. // Created by: drose (20Jan99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. #include "eggCoordinateSystem.h"
  6. #include <indent.h>
  7. TypeHandle EggCoordinateSystem::_type_handle;
  8. ////////////////////////////////////////////////////////////////////
  9. // Function: EggCoordinateSystem::write
  10. // Access: Public, Virtual
  11. // Description: Writes the coordinate system definition to the
  12. // indicated output stream in Egg format.
  13. ////////////////////////////////////////////////////////////////////
  14. void EggCoordinateSystem::
  15. write(ostream &out, int indent_level) const {
  16. if (get_value() != CS_default &&
  17. get_value() != CS_invalid) {
  18. indent(out, indent_level)
  19. << "<CoordinateSystem> { ";
  20. switch (get_value()) {
  21. case CS_zup_right:
  22. out << "Z-Up";
  23. break;
  24. case CS_yup_right:
  25. out << "Y-Up";
  26. break;
  27. case CS_zup_left:
  28. out << "Z-Up-Left";
  29. break;
  30. case CS_yup_left:
  31. out << "Y-Up-Left";
  32. break;
  33. }
  34. out << " }\n\n";
  35. }
  36. }