Panda3D
config_xfile.cxx
1 // Filename: config_xfile.cxx
2 // Created by: drose (24Aug00)
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_xfile.h"
16 #include "xFile.h"
17 #include "xFileDataDef.h"
18 #include "xFileDataObject.h"
19 #include "xFileDataObjectArray.h"
20 #include "xFileDataObjectDouble.h"
21 #include "xFileDataObjectInteger.h"
22 #include "xFileDataObjectString.h"
23 #include "xFileDataNode.h"
24 #include "xFileDataNodeReference.h"
25 #include "xFileDataNodeTemplate.h"
26 #include "xFileNode.h"
27 #include "xFileTemplate.h"
28 
29 #include "dconfig.h"
30 
31 Configure(config_xfile);
32 NotifyCategoryDef(xfile, "");
33 
34 // This is set true, typically by the user's command-line options, to
35 // indicate that when a X file is generated it should include all
36 // geometry in one big mesh, instead of preserving the hierarchy
37 // from the source egg file.
38 bool xfile_one_mesh = false;
39 
40 ConfigureFn(config_xfile) {
41  init_libxfile();
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: init_libxfile
46 // Description: Initializes the library. This must be called at
47 // least once before any of the functions or classes in
48 // this library can be used. Normally it will be
49 // called by the static initializers and need not be
50 // called explicitly, but special cases exist.
51 ////////////////////////////////////////////////////////////////////
52 void
53 init_libxfile() {
54  static bool initialized = false;
55  if (initialized) {
56  return;
57  }
58  initialized = true;
59 
60  XFile::init_type();
61  XFileDataDef::init_type();
62  XFileDataObject::init_type();
63  XFileDataObjectArray::init_type();
64  XFileDataObjectDouble::init_type();
65  XFileDataObjectInteger::init_type();
66  XFileDataObjectString::init_type();
67  XFileDataNode::init_type();
68  XFileDataNodeReference::init_type();
69  XFileDataNodeTemplate::init_type();
70  XFileNode::init_type();
71  XFileTemplate::init_type();
72 }
73