lwoHeader.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file lwoHeader.h
  10. * @author drose
  11. * @date 2001-04-24
  12. */
  13. #ifndef LWOHEADER_H
  14. #define LWOHEADER_H
  15. #include "pandatoolbase.h"
  16. #include "lwoGroupChunk.h"
  17. /**
  18. * The first chunk in a Lightwave Object file.
  19. */
  20. class LwoHeader : public LwoGroupChunk {
  21. public:
  22. LwoHeader();
  23. IffId _lwid;
  24. INLINE bool is_valid() const;
  25. INLINE double get_version() const;
  26. public:
  27. virtual bool read_iff(IffInputFile *in, size_t stop_at);
  28. virtual void write(std::ostream &out, int indent_level = 0) const;
  29. private:
  30. bool _valid;
  31. double _version;
  32. public:
  33. virtual TypeHandle get_type() const {
  34. return get_class_type();
  35. }
  36. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  37. static TypeHandle get_class_type() {
  38. return _type_handle;
  39. }
  40. static void init_type() {
  41. LwoGroupChunk::init_type();
  42. register_type(_type_handle, "LwoHeader",
  43. LwoGroupChunk::get_class_type());
  44. }
  45. private:
  46. static TypeHandle _type_handle;
  47. };
  48. #include "lwoHeader.I"
  49. #endif