fltGroup.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 fltGroup.h
  10. * @author drose
  11. * @date 2000-08-24
  12. */
  13. #ifndef FLTGROUP_H
  14. #define FLTGROUP_H
  15. #include "pandatoolbase.h"
  16. #include "fltBeadID.h"
  17. /**
  18. * The main grouping bead of the flt file.
  19. */
  20. class FltGroup : public FltBeadID {
  21. public:
  22. FltGroup(FltHeader *header);
  23. enum Flags {
  24. F_forward_animation = 0x40000000,
  25. F_swing_animation = 0x20000000,
  26. F_bounding_box = 0x10000000,
  27. F_freeze_bounding_box = 0x08000000,
  28. F_default_parent = 0x04000000,
  29. };
  30. int _relative_priority;
  31. unsigned int _flags;
  32. int _special_id1, _special_id2;
  33. int _significance;
  34. int _layer_id;
  35. protected:
  36. virtual bool extract_record(FltRecordReader &reader);
  37. virtual bool build_record(FltRecordWriter &writer) const;
  38. public:
  39. virtual TypeHandle get_type() const {
  40. return get_class_type();
  41. }
  42. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  43. static TypeHandle get_class_type() {
  44. return _type_handle;
  45. }
  46. static void init_type() {
  47. FltBeadID::init_type();
  48. register_type(_type_handle, "FltGroup",
  49. FltBeadID::get_class_type());
  50. }
  51. private:
  52. static TypeHandle _type_handle;
  53. };
  54. #endif