home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / include / k3d / k3dsdk / axis.h < prev    next >
C/C++ Source or Header  |  2008-11-07  |  2KB  |  71 lines

  1. #ifndef K3DSDK_AXIS_H
  2. #define K3DSDK_AXIS_H
  3.  
  4. // K-3D
  5. // Copyright (c) 1995-2004, Timothy M. Shead
  6. //
  7. // Contact: tshead@k-3d.com
  8. //
  9. // This program is free software; you can redistribute it and/or
  10. // modify it under the terms of the GNU General Public
  11. // License as published by the Free Software Foundation; either
  12. // version 2 of the License, or (at your option) any later version.
  13. //
  14. // This program is distributed in the hope that it will be useful,
  15. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. // General Public License for more details.
  18. //
  19. // You should have received a copy of the GNU General Public
  20. // License along with this program; if not, write to the Free Software
  21. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  22.  
  23. /** \file
  24.         \brief Provides an enumerated type for representing axes (useful in a lot of objects)
  25.         \author Tim Shead (tshead@k-3d.com)
  26. */
  27.  
  28. #include "ienumeration_property.h"
  29. #include <iosfwd>
  30.  
  31. namespace k3d
  32. {
  33.  
  34. /// Enumerates standard axes
  35. typedef enum
  36. {
  37.     X,
  38.     Y,
  39.     Z
  40. } axis;
  41.  
  42. /// Enumerates signed axes
  43. typedef enum
  44. {
  45.     NX,
  46.     PX,
  47.     NY,
  48.     PY,
  49.     NZ,
  50.     PZ
  51. } signed_axis;
  52.  
  53. /// Returns descriptions of the allowed axis values, for use with enumeration properties
  54. const ienumeration_property::enumeration_values_t& axis_values();
  55. /// Returns descriptions of the allowed signed axis values, for use with enumeration properties
  56. const ienumeration_property::enumeration_values_t& signed_axis_values();
  57.  
  58. /// Serialization
  59. std::ostream& operator<<(std::ostream& Stream, const axis& Value);
  60. /// Serialization
  61. std::istream& operator>>(std::istream& Stream, axis& Value);
  62.  
  63. /// Serialization
  64. std::ostream& operator<<(std::ostream& Stream, const signed_axis& Value);
  65. /// Serialization
  66. std::istream& operator>>(std::istream& Stream, signed_axis& Value);
  67.  
  68. } // namespace k3d
  69.  
  70. #endif // !K3DSDK_AXIS_H
  71.