loaderFileTypeStf.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 loaderFileTypeStf.h
  10. * @author drose
  11. * @date 2010-10-07
  12. */
  13. #ifndef LOADERFILETYPESTF_H
  14. #define LOADERFILETYPESTF_H
  15. #include "contribbase.h"
  16. #include "loaderFileType.h"
  17. /**
  18. * This defines the Loader interface to read SpeedTree STF files--a simple
  19. * text file that describes a forest of trees (references to SRT files).
  20. */
  21. class EXPCL_PANDASPEEDTREE LoaderFileTypeStf : public LoaderFileType {
  22. public:
  23. LoaderFileTypeStf();
  24. virtual std::string get_name() const;
  25. virtual std::string get_extension() const;
  26. virtual bool supports_compressed() const;
  27. virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
  28. BamCacheRecord *record) const;
  29. public:
  30. static TypeHandle get_class_type() {
  31. return _type_handle;
  32. }
  33. static void init_type() {
  34. LoaderFileType::init_type();
  35. register_type(_type_handle, "LoaderFileTypeStf",
  36. LoaderFileType::get_class_type());
  37. }
  38. virtual TypeHandle get_type() const {
  39. return get_class_type();
  40. }
  41. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  42. private:
  43. static TypeHandle _type_handle;
  44. };
  45. #endif