Panda3D
 All Classes Functions Variables Enumerations
config_assimp.cxx
1 // Filename: config_assimp.cxx
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 #include "config_assimp.h"
16 
17 #include "loaderFileTypeAssimp.h"
18 
19 #include "dconfig.h"
20 #include "loaderFileTypeRegistry.h"
21 
22 ConfigureDef(config_assimp);
23 NotifyCategoryDef(assimp, "");
24 
25 ConfigureFn(config_assimp) {
26  init_libassimp();
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: init_libassimp
31 // Description: Initializes the library. This must be called at
32 // least once before any of the functions or classes in
33 // this library can be used. Normally it will be
34 // called by the static initializers and need not be
35 // called explicitly, but special cases exist.
36 ////////////////////////////////////////////////////////////////////
37 void
38 init_libassimp() {
39  static bool initialized = false;
40  if (initialized) {
41  return;
42  }
43  initialized = true;
44 
45  LoaderFileTypeAssimp::init_type();
46 
49 }
This defines the Loader interface that uses the Assimp library to load various model formats...
static LoaderFileTypeRegistry * get_global_ptr()
Returns a pointer to the global LoaderFileTypeRegistry object.
void register_type(LoaderFileType *type)
Defines a new LoaderFileType in the universe.
This class maintains the set of all known LoaderFileTypes in the universe.