Panda3D
 All Classes Functions Variables Enumerations
config_flt.cxx
1 // Filename: config_flt.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_flt.h"
16 #include "fltRecord.h"
17 #include "fltBead.h"
18 #include "fltBeadID.h"
19 #include "fltGroup.h"
20 #include "fltObject.h"
21 #include "fltGeometry.h"
22 #include "fltFace.h"
23 #include "fltCurve.h"
24 #include "fltMesh.h"
25 #include "fltLocalVertexPool.h"
26 #include "fltMeshPrimitive.h"
27 #include "fltVectorRecord.h"
28 #include "fltVertexList.h"
29 #include "fltLOD.h"
30 #include "fltInstanceDefinition.h"
31 #include "fltInstanceRef.h"
32 #include "fltHeader.h"
33 #include "fltVertex.h"
34 #include "fltMaterial.h"
35 #include "fltTexture.h"
36 #include "fltLightSourceDefinition.h"
37 #include "fltUnsupportedRecord.h"
38 #include "fltTransformRecord.h"
39 #include "fltTransformGeneralMatrix.h"
40 #include "fltTransformPut.h"
41 #include "fltTransformRotateAboutEdge.h"
42 #include "fltTransformRotateAboutPoint.h"
43 #include "fltTransformScale.h"
44 #include "fltTransformTranslate.h"
45 #include "fltTransformRotateScale.h"
46 #include "fltExternalReference.h"
47 
48 #include "dconfig.h"
49 
50 Configure(config_flt);
51 NotifyCategoryDef(flt, "");
52 
53 
54 ConfigVariableBool flt_error_abort
55 ("flt-error-abort", false,
56  PRC_DESC("Set this true to trigger an assertion failure (and core dump) "
57  "immediately when an error is detected on reading or writing a flt "
58  "file. This is primarily useful for debugging the flt reader itself, "
59  "to generate a stack trace to determine precisely at what point a flt "
60 
61  "file failed."));
62 
63 
64 ConfigureFn(config_flt) {
65  init_libflt();
66 }
67 
68 ////////////////////////////////////////////////////////////////////
69 // Function: init_libflt
70 // Description: Initializes the library. This must be called at
71 // least once before any of the functions or classes in
72 // this library can be used. Normally it will be
73 // called by the static initializers and need not be
74 // called explicitly, but special cases exist.
75 ////////////////////////////////////////////////////////////////////
76 void
77 init_libflt() {
78  static bool initialized = false;
79  if (initialized) {
80  return;
81  }
82  initialized = true;
83 
84  FltRecord::init_type();
85  FltBead::init_type();
86  FltBeadID::init_type();
87  FltGroup::init_type();
88  FltObject::init_type();
89  FltGeometry::init_type();
90  FltFace::init_type();
91  FltCurve::init_type();
92  FltMesh::init_type();
93  FltLocalVertexPool::init_type();
94  FltMeshPrimitive::init_type();
95  FltVectorRecord::init_type();
96  FltVertexList::init_type();
97  FltLOD::init_type();
98  FltInstanceDefinition::init_type();
99  FltInstanceRef::init_type();
100  FltHeader::init_type();
101  FltVertex::init_type();
102  FltMaterial::init_type();
103  FltTexture::init_type();
104  FltLightSourceDefinition::init_type();
105  FltUnsupportedRecord::init_type();
106  FltTransformRecord::init_type();
107  FltTransformGeneralMatrix::init_type();
108  FltTransformPut::init_type();
109  FltTransformRotateAboutEdge::init_type();
110  FltTransformRotateAboutPoint::init_type();
111  FltTransformScale::init_type();
112  FltTransformTranslate::init_type();
113  FltTransformRotateScale::init_type();
114  FltExternalReference::init_type();
115 }
116 
This is a convenience class to specialize ConfigVariable as a boolean type.