Panda3D
 All Classes Functions Variables Enumerations
loaderFileTypeAssimp.h
1 // Filename: loaderFileTypeAssimp.h
2 // Created by: rdb (29Mar11)
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 LOADERFILETYPEASSIMP_H
16 #define LOADERFILETYPEASSIMP_H
17 
18 #include "config_assimp.h"
19 #include "loaderFileType.h"
20 
21 class AssimpLoader;
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : LoaderFileTypeAssimp
25 // Description : This defines the Loader interface that uses the
26 // Assimp library to load various model formats.
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_ASSIMP LoaderFileTypeAssimp : public LoaderFileType {
29 public:
31  virtual ~LoaderFileTypeAssimp();
32 
33  virtual string get_name() const;
34  virtual string get_extension() const;
35  virtual string get_additional_extensions() const;
36  virtual bool supports_compressed() const;
37 
38  virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
39  BamCacheRecord *record) const;
40 
41 public:
42  AssimpLoader *_loader;
43 
44 public:
45  static TypeHandle get_class_type() {
46  return _type_handle;
47  }
48  static void init_type() {
49  LoaderFileType::init_type();
50  register_type(_type_handle, "LoaderFileTypeAssimp",
51  LoaderFileType::get_class_type());
52  }
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57 
58 private:
59  static TypeHandle _type_handle;
60 };
61 
62 #endif
63 
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 that uses the Assimp library to load various model formats...
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 string get_additional_extensions() const
Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this loader.
This is the base class for a family of scene-graph file types that the Loader supports.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension)...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
Class that interfaces with Assimp and builds Panda nodes to represent the Assimp structures.
Definition: assimpLoader.h:31