coordinateSystem.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Filename: coordinateSystem.h
  2. // Created by: drose (24Sep99)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef COORDINATESYSTEM_H
  19. #define COORDINATESYSTEM_H
  20. #include "pandabase.h"
  21. #include "typedef.h"
  22. BEGIN_PUBLISH
  23. enum CoordinateSystem {
  24. // The CS_default entry does not refer to a particular coordinate
  25. // system, but rather to the value stored in
  26. // default_coordinate_system, which in turn is loaded from the
  27. // config variable "coordinate-system".
  28. CS_default,
  29. CS_zup_right,
  30. CS_yup_right,
  31. CS_zup_left,
  32. CS_yup_left,
  33. // CS_invalid is not a coordinate system at all. It can be used in
  34. // user-input processing code to indicate a contradictory coordinate
  35. // system request.
  36. CS_invalid,
  37. };
  38. EXPCL_PANDA CoordinateSystem get_default_coordinate_system();
  39. END_PUBLISH
  40. EXPCL_PANDA CoordinateSystem parse_coordinate_system_string(const string &str);
  41. EXPCL_PANDA bool is_right_handed(CoordinateSystem cs = CS_default);
  42. #define IS_LEFT_HANDED_COORDSYSTEM(cs) ((cs==CS_zup_left) || (cs==CS_yup_left))
  43. EXPCL_PANDA ostream &operator << (ostream &out, CoordinateSystem cs);
  44. EXPCL_PANDA istream &operator >> (istream &in, CoordinateSystem &cs);
  45. #endif