Panda3D
loaderFileTypeEgg.h
1 // Filename: loaderFileTypeEgg.h
2 // Created by: drose (20Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef LOADERFILETYPEEGG_H
16 #define LOADERFILETYPEEGG_H
17 
18 #include "pandabase.h"
19 
20 #include "loaderFileType.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LoaderFileTypeEgg
24 // Description : This defines the Loader interface to read Egg files.
25 ////////////////////////////////////////////////////////////////////
26 class EXPCL_PANDAEGG LoaderFileTypeEgg : public LoaderFileType {
27 public:
29 
30  virtual string get_name() const;
31  virtual string get_extension() const;
32  virtual bool supports_compressed() const;
33 
34  virtual bool supports_load() const;
35  virtual bool supports_save() const;
36 
37  virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &optoins,
38  BamCacheRecord *record) const;
39  virtual bool save_file(const Filename &path, const LoaderOptions &options,
40  PandaNode *node) const;
41 
42 public:
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  LoaderFileType::init_type();
48  register_type(_type_handle, "LoaderFileTypeEgg",
49  LoaderFileType::get_class_type());
50  }
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
60 #endif
61 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
Specifies parameters that may be passed to the loader.
Definition: loaderOptions.h:26
This defines the Loader interface to read Egg files.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
virtual bool supports_load() const
Returns true if the file type can be used to load files, and load_file() is supported.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension)...
virtual bool supports_save() const
Returns true if the file type can be used to save files, and save_file() is supported.
This is the base class for a family of scene-graph file types that the Loader supports.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85