2
0

loaderFileTypeSrt.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 loaderFileTypeSrt.h
  10. * @author drose
  11. * @date 2010-10-06
  12. */
  13. #ifndef LOADERFILETYPESRT_H
  14. #define LOADERFILETYPESRT_H
  15. #include "contribbase.h"
  16. #include "loaderFileType.h"
  17. /**
  18. * This defines the Loader interface to read SpeedTree SRT files, which
  19. * describe a single tree. It actually returns a SpeedTreeNode with just a
  20. * single tree within it.
  21. */
  22. class EXPCL_PANDASPEEDTREE LoaderFileTypeSrt : public LoaderFileType {
  23. public:
  24. LoaderFileTypeSrt();
  25. virtual std::string get_name() const;
  26. virtual std::string get_extension() const;
  27. virtual bool supports_compressed() const;
  28. virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
  29. BamCacheRecord *record) const;
  30. public:
  31. static TypeHandle get_class_type() {
  32. return _type_handle;
  33. }
  34. static void init_type() {
  35. LoaderFileType::init_type();
  36. register_type(_type_handle, "LoaderFileTypeSrt",
  37. LoaderFileType::get_class_type());
  38. }
  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. private:
  44. static TypeHandle _type_handle;
  45. };
  46. #endif