15 #include "config_egg.h" 16 #include "eggRenderMode.h" 17 #include "eggAnimData.h" 18 #include "eggAnimPreload.h" 19 #include "eggAttributes.h" 21 #include "eggBinMaker.h" 22 #include "eggComment.h" 23 #include "eggCompositePrimitive.h" 24 #include "eggCoordinateSystem.h" 26 #include "eggExternalReference.h" 27 #include "eggFilenameNode.h" 29 #include "eggGroupNode.h" 30 #include "eggGroupUniquifier.h" 32 #include "eggMaterial.h" 33 #include "eggNameUniquifier.h" 34 #include "eggNamedObject.h" 36 #include "eggNurbsCurve.h" 37 #include "eggNurbsSurface.h" 38 #include "eggObject.h" 41 #include "eggPolygon.h" 42 #include "eggPolysetMaker.h" 43 #include "eggPoolUniquifier.h" 44 #include "eggPrimitive.h" 45 #include "eggSAnimData.h" 46 #include "eggSurface.h" 47 #include "eggSwitchCondition.h" 49 #include "eggTexture.h" 50 #include "eggTriangleFan.h" 51 #include "eggTriangleStrip.h" 52 #include "eggUserData.h" 53 #include "eggVertex.h" 54 #include "eggVertexPool.h" 55 #include "eggVertexUV.h" 56 #include "eggVertexAux.h" 57 #include "eggXfmAnimData.h" 58 #include "eggXfmSAnim.h" 62 Configure(config_egg);
63 NotifyCategoryDef(egg,
"");
65 ConfigureFn(config_egg) {
70 (
"egg-support-old-anims",
true,
71 PRC_DESC(
"Set this true to support loading of old character animation files, which " 72 "had the convention that the order \"phr\" implied a reversed roll."));
76 PRC_DESC(
"Set this true to convert triangles and higher-order polygons " 77 "into triangle strips and triangle fans when an egg file is " 78 "loaded or converted to bam. Set this false just to triangulate " 79 "everything into independent triangles."));
82 (
"egg-retesselate-coplanar",
false,
83 PRC_DESC(
"If this is true, the egg loader may reverse the " 84 "tesselation direction of a single pair of planar triangles that " 85 "share the same properties, if that will help get a better " 86 "triangle strip. In some rare cases, doing so can distort the " 87 "UV's on a face; turning this off should eliminate that artifact " 88 "(at the cost of less-effective triangle stripping)."));
91 (
"egg-unroll-fans",
true,
92 PRC_DESC(
"Set this true to allow the egg loader to convert weak triangle " 93 "fans--triangles that share the same vertex but aren't " 94 "connected enough to justify making a triangle fan primitive " 95 "from them--into a series of zig-zag triangles that can make " 96 "a triangle strip that might connect better with its neighbors."));
99 (
"egg-show-tstrips",
false,
100 PRC_DESC(
"Set this true to color each triangle strip a random color, with " 101 "the leading triangle a little bit darker, so you can visually " 102 "observe the quality of the triangle stripping algorithm."));
105 (
"egg-show-qsheets",
false,
106 PRC_DESC(
"Set this true to color each quadsheet a random color, so you " 107 "can visually observe the quadsheet algorithm."));
110 (
"egg-show-quads",
false,
111 PRC_DESC(
"Set this true to color each detected quad a random color, so " 112 "you can visually observe the algorithm that unifies pairs of " 113 "triangles into quads (prior to generating triangle strips)."));
116 (
"egg-subdivide-polys",
true,
117 PRC_DESC(
"This is obsolete. In the old Geom implementation, it used to " 118 "be true to force higher-order polygons that were not otherwise " 119 "meshed to be subdivided into triangles. In the new " 120 "Geom implementation, this happens anyway."));
123 (
"egg-consider-fans",
false,
124 PRC_DESC(
"Set this true to enable the egg mesher to consider making " 125 "triangle fans out of triangles that are connected at a common " 126 "vertex. This may help if your scene involves lots of such " 127 "connected triangles, but it can also make the overall stripping " 128 "less effective (by interfering with triangle strips)."));
131 (
"egg-max-tfan-angle", 40.0,
132 PRC_DESC(
"The maximum average angle per triangle to allow in a triangle " 133 "fan. If triangles are larger than this--that is, more loosely " 134 "packed--then we figure a triangle strip is likely to do a " 135 "more effective job than a triangle fan, and the fan maker leaves " 139 (
"egg-min-tfan-tris", 4,
140 PRC_DESC(
"The minimum number of triangles that must be involved in order " 141 "to generate a triangle fan. Fewer than this is just interrupting " 142 "a triangle strip."));
145 (
"egg-coplanar-threshold", 0.01,
146 PRC_DESC(
"The numerical threshold below which polygons are considered " 147 "to be coplanar. Determined empirically."));
150 (
"egg-test-vref-integrity", 20,
151 PRC_DESC(
"The maximum number of vertices a primitive may have before " 152 "its vertices will no longer be checked for internal integrity. " 153 "This is meaningful in non-production builds only."));
156 (
"egg-recursion-limit", 1000,
157 PRC_DESC(
"The maximum number of levels that recursive algorithms within " 158 "the egg library are allowed to traverse. This is a simple hack " 159 "to prevent deeply-recursive algorithms from triggering a stack " 160 "overflow. Set it larger to run more efficiently if your stack " 161 "allows it; set it lower if you experience stack overflows."));
173 static bool initialized =
false;
179 EggRenderMode::init_type();
180 EggAnimData::init_type();
181 EggAnimPreload::init_type();
182 EggAttributes::init_type();
184 EggBinMaker::init_type();
185 EggComment::init_type();
186 EggCompositePrimitive::init_type();
187 EggCoordinateSystem::init_type();
188 EggCurve::init_type();
189 EggData::init_type();
190 EggExternalReference::init_type();
191 EggFilenameNode::init_type();
192 EggGroup::init_type();
193 EggGroupNode::init_type();
194 EggGroupUniquifier::init_type();
195 EggLine::init_type();
196 EggMaterial::init_type();
197 EggNameUniquifier::init_type();
198 EggNamedObject::init_type();
199 EggNode::init_type();
200 EggNurbsCurve::init_type();
201 EggNurbsSurface::init_type();
202 EggObject::init_type();
203 EggPatch::init_type();
204 EggPoint::init_type();
205 EggPolygon::init_type();
206 EggPolysetMaker::init_type();
207 EggPoolUniquifier::init_type();
208 EggPrimitive::init_type();
209 EggSAnimData::init_type();
210 EggSurface::init_type();
211 EggSwitchCondition::init_type();
212 EggSwitchConditionDistance::init_type();
213 EggTable::init_type();
214 EggTexture::init_type();
215 EggTriangleFan::init_type();
216 EggTriangleStrip::init_type();
217 EggUserData::init_type();
218 EggVertex::init_type();
219 EggVertexPool::init_type();
220 EggVertexUV::init_type();
221 EggVertexAux::init_type();
222 EggXfmAnimData::init_type();
223 EggXfmSAnim::init_type();
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a floating-point type.
This is a convenience class to specialize ConfigVariable as an integer type.