Panda3D
 All Classes Functions Variables Enumerations
loaderFileTypePandatool.h
00001 // Filename: loaderFileTypePandatool.h
00002 // Created by:  drose (20Jun00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef LOADERFILETYPEPANDATOOL_H
00016 #define LOADERFILETYPEPANDATOOL_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "loaderFileType.h"
00021 
00022 class SomethingToEggConverter;
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : LoaderFileTypePandatool
00026 // Description : This defines the Loader interface to files whose
00027 //               converters are defined within the Pandatool package
00028 //               and inherit from SomethingToEggConverter, like
00029 //               FltToEggConverter and LwoToEggConverter.
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PTLOADER LoaderFileTypePandatool : public LoaderFileType {
00032 public:
00033   LoaderFileTypePandatool(SomethingToEggConverter *converter);
00034   virtual ~LoaderFileTypePandatool();
00035 
00036   virtual string get_name() const;
00037   virtual string get_extension() const;
00038   virtual string get_additional_extensions() const;
00039   virtual bool supports_compressed() const;
00040 
00041   virtual void resolve_filename(Filename &path) const;
00042   virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
00043                                   BamCacheRecord *record) const;
00044 
00045 private:
00046   SomethingToEggConverter *_converter;
00047 
00048 public:
00049   static TypeHandle get_class_type() {
00050     return _type_handle;
00051   }
00052   static void init_type() {
00053     LoaderFileType::init_type();
00054     register_type(_type_handle, "LoaderFileTypePandatool",
00055                   LoaderFileType::get_class_type());
00056   }
00057   virtual TypeHandle get_type() const {
00058     return get_class_type();
00059   }
00060   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00061 
00062 private:
00063   static TypeHandle _type_handle;
00064 };
00065 
00066 #endif
00067 
 All Classes Functions Variables Enumerations