1 /*
2  * SceneProtoMap.cpp
3  *
4  * Copyright (C) 1999 Stephen F. White, 2008 J. "MUFTI" Scheurich
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program (see the file "COPYING" for details); if
18  * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
19  * Cambridge, MA 02139, USA.
20  */
21 
22 #include "stdafx.h"
23 #include "SceneProtoMap.h"
24 
25 #include "NodeAnchor.h"
26 #include "NodeAppearance.h"
27 #include "NodeArc2D.h"
28 #include "NodeArcClose2D.h"
29 #include "NodeARSensor.h"
30 #include "NodeAudioClip.h"
31 #include "NodeBackground.h"
32 #include "NodeBallJoint.h"
33 #include "NodeBinaryGeometry.h"
34 #include "NodeBillboard.h"
35 #include "NodeBlendMode.h"
36 #include "NodeBlendedVolumeStyle.h"
37 #include "NodeBlock.h"
38 #include "NodeBooleanFilter.h"
39 #include "NodeBooleanToggle.h"
40 #include "NodeBooleanTrigger.h"
41 #include "NodeBooleanSequencer.h"
42 #include "NodeBoundaryEnhancementVolumeStyle.h"
43 #include "NodeBoundedPhysicsModel.h"
44 #include "NodeBox.h"
45 #include "NodeCADAssembly.h"
46 #include "NodeCADFace.h"
47 #include "NodeCADLayer.h"
48 #include "NodeCADPart.h"
49 #include "NodeCOVER.h"
50 #include "NodeCartoonVolumeStyle.h"
51 #include "NodeCattExportRec.h"
52 #include "NodeCattExportSrc.h"
53 #include "NodeCircle2D.h"
54 #include "NodeClipPlane.h"
55 #include "NodeCollidableOffset.h"
56 #include "NodeCollidableShape.h"
57 #include "NodeCollision.h"
58 #include "NodeCollisionCollection.h"
59 #include "NodeCollisionSensor.h"
60 #include "NodeCollisionSpace.h"
61 #include "NodeColor.h"
62 #include "NodeColorDamper.h"
63 #include "NodeColorChaser.h"
64 #include "NodeColorInterpolator.h"
65 #include "NodeColorMaskMode.h"
66 #include "NodeColorRGBA.h"
67 #include "NodeColorSetInterpolator.h"
68 #include "NodeCommonSurfaceShader.h"
69 #include "NodeComposedCubeMapTexture.h"
70 #include "NodeComposedShader.h"
71 #include "NodeComposedTexture3D.h"
72 #include "NodeComposedVolumeStyle.h"
73 #include "NodeCone.h"
74 #include "NodeConeEmitter.h"
75 #include "NodeContact.h"
76 #include "NodeContour2D.h"
77 #include "NodeContourPolyline2D.h"
78 #include "NodeCoordinate.h"
79 #include "NodeCoordinateChaser.h"
80 #include "NodeCoordinateDamper.h"
81 #include "NodeCoordinateDeformer.h"
82 #include "NodeCoordinateDouble.h"
83 #include "NodeCoordinateInterpolator2D.h"
84 #include "NodeCoordinateInterpolator.h"
85 #include "NodeCubeTexture.h"
86 #include "NodeCubicBezier2DOrientationInterpolator.h"
87 #include "NodeCubicBezierPositionInterpolator.h"
88 #include "NodeCurveAnimation.h"
89 #include "NodeCylinder.h"
90 #include "NodeCylinderSensor.h"
91 #include "NodeDepthMode.h"
92 #include "NodeDirectionalLight.h"
93 #include "NodeDISEntityManager.h"
94 #include "NodeDISEntityTypeMapping.h"
95 #include "NodeDish.h"
96 #include "NodeDisk2D.h"
97 #include "NodeDoubleAxisHingeJoint.h"
98 #include "NodeDynamicLOD.h"
99 #include "NodeEaseInEaseOut.h"
100 #include "NodeEdgeEnhancementVolumeStyle.h"
101 #include "NodeEffect.h"
102 #include "NodeEffectPart.h"
103 #include "NodeElevationGrid.h"
104 #include "NodeEnvironment.h"
105 #include "NodeEspduTransform.h"
106 #include "NodeExplosionEmitter.h"
107 #include "NodeExternalGeometry.h"
108 #include "NodeExtrusion.h"
109 #include "NodeField.h"
110 #include "NodeFillProperties.h"
111 #include "NodeFloatVertexAttribute.h"
112 #include "NodeFog.h"
113 #include "NodeFogCoordinate.h"
114 #include "NodeFontStyle.h"
115 #include "NodeForcePhysicsModel.h"
116 #include "NodeGeneratedCubeMapTexture.h"
117 #include "NodeGeneratedShadowMap.h"
118 #include "NodeGeoCoordinate.h"
119 #include "NodeGeoElevationGrid.h"
120 #include "NodeGeoMetadata.h"
121 #include "NodeGeoLocation.h"
122 #include "NodeGeoLOD.h"
123 #include "NodeGeoPositionInterpolator.h"
124 #include "NodeGeoProximitySensor.h"
125 #include "NodeGeoOrigin.h"
126 #include "NodeGeoTouchSensor.h"
127 #include "NodeGeoTransform.h"
128 #include "NodeGeoViewpoint.h"
129 #include "NodeGroup.h"
130 #include "NodeHAnimDisplacer.h"
131 #include "NodeHAnimHumanoid.h"
132 #include "NodeHAnimMotion.h"
133 #include "NodeHAnimJoint.h"
134 #include "NodeHAnimSegment.h"
135 #include "NodeHAnimSite.h"
136 #include "NodeImageCubeMapTexture.h"
137 #include "NodeImageGeometry.h"
138 #include "NodeImageTexture.h"
139 #include "NodeImageTexture3D.h"
140 #include "NodeImageTextureAtlas.h"
141 #include "NodeIndexedFaceSet.h"
142 #include "NodeIndexedLineSet.h"
143 #include "NodeIndexedQuadSet.h"
144 #include "NodeIndexedTriangleFanSet.h"
145 #include "NodeIndexedTriangleSet.h"
146 #include "NodeIndexedTriangleStripSet.h"
147 #include "NodeInline.h"
148 #include "NodeInlineLoadControl.h"
149 #include "NodeIntegerSequencer.h"
150 #include "NodeIntegerTrigger.h"
151 #include "NodeIsoSurfaceVolumeData.h"
152 #include "NodeJoystickSensor.h"
153 #include "NodeKambiAppearance.h"
154 #include "NodeKambiHeadLight.h"
155 #include "NodeKambiInline.h"
156 #include "NodeKambiNavigationInfo.h"
157 #include "NodeKambiOctreeProperties.h"
158 #include "NodeKambiTriangulation.h"
159 #include "NodeKeySensor.h"
160 #include "NodeLabView.h"
161 #include "NodeLayer.h"
162 #include "NodeLayerSet.h"
163 #include "NodeLayout.h"
164 #include "NodeLayoutGroup.h"
165 #include "NodeLayoutLayer.h"
166 #include "NodeLdrawDatExport.h"
167 #include "NodeLinePickSensor.h"
168 #include "NodeLineProperties.h"
169 #include "NodeLineSet.h"
170 #include "NodeLoadSensor.h"
171 #include "NodeLocalFog.h"
172 #include "NodeLOD.h"
173 #include "NodeMaterial.h"
174 #include "NodeMatrix3VertexAttribute.h"
175 #include "NodeMatrix4VertexAttribute.h"
176 #include "NodeMatrixTransform.h"
177 #include "NodeMesh.h"
178 #include "NodeMetadataBoolean.h"
179 #include "NodeMetadataDouble.h"
180 #include "NodeMetadataFloat.h"
181 #include "NodeMetadataInteger.h"
182 #include "NodeMetadataSet.h"
183 #include "NodeMetadataString.h"
184 #include "NodeMotorJoint.h"
185 #include "NodeMovieTexture.h"
186 #include "NodeMPRVolumeStyle.h"
187 #include "NodeMultiGeneratedTextureCoordinate.h"
188 #include "NodeMultiPart.h"
189 #include "NodeMultiTexture.h"
190 #include "NodeMultiTextureCoordinate.h"
191 #include "NodeMultiTextureTransform.h"
192 #include "NodeNavigationInfo.h"
193 #include "NodeNormal.h"
194 #include "NodeNormalInterpolator.h"
195 #include "NodeNozzle.h"
196 #include "NodeNurbsCurve.h"
197 #include "NodeNurbsCurve2D.h"
198 #include "NodeNurbsGroup.h"
199 #include "NodeNurbsOrientationInterpolator.h"
200 #include "NodeNurbsPositionInterpolator.h"
201 #include "NodeNurbsSet.h"
202 #include "NodeNurbsSurface.h"
203 #include "NodeNurbsSurfaceInterpolator.h"
204 #include "NodeNurbsSweptSurface.h"
205 #include "NodeNurbsSwungSurface.h"
206 #include "NodeNurbsTextureSurface.h"
207 #include "NodeNurbsTextureCoordinate.h"
208 #include "NodeNurbsTrimmedSurface.h"
209 #include "NodeOpacityMapVolumeStyle.h"
210 #include "NodeOrientationChaser.h"
211 #include "NodeOrientationDamper.h"
212 #include "NodeOrientationInterpolator.h"
213 #include "NodeOrthoViewpoint.h"
214 #include "NodePackagedShader.h"
215 #include "NodeParam.h"
216 #include "NodeParticleSet.h"
217 #include "NodeParticleSystem.h"
218 #include "NodePickableGroup.h"
219 #include "NodePixelTexture.h"
220 #include "NodePixelTexture3D.h"
221 #include "NodePlane.h"
222 #include "NodePlaneSensor.h"
223 #include "NodePointEmitter.h"
224 #include "NodePointLight.h"
225 #include "NodePointProperties.h"
226 #include "NodePointPickSensor.h"
227 #include "NodePointSet.h"
228 #include "NodePolyline2D.h"
229 #include "NodePolylineEmitter.h"
230 #include "NodePolypoint2D.h"
231 #include "NodePopGeometry.h"
232 #include "NodePopGeometryLevel.h"
233 #include "NodePositionChaser.h"
234 #include "NodePositionChaser2D.h"
235 #include "NodePositionDamper.h"
236 #include "NodePositionDamper2D.h"
237 #include "NodePositionInterpolator.h"
238 #include "NodePositionInterpolator2D.h"
239 #include "NodePrimitivePickSensor.h"
240 #include "NodeProjectionVolumeStyle.h"
241 #include "NodeProgramShader.h"
242 #include "NodeProjectedTextureCoordinate.h"
243 #include "NodeProximitySensor.h"
244 #include "NodePyramid.h"
245 #include "NodeQuadSet.h"
246 #include "NodeRadarVolumeStyle.h"
247 #include "NodeReceiverPdu.h"
248 #include "NodeRectangle2D.h"
249 #include "NodeRectangularTorus.h"
250 #include "NodeRenderedTexture.h"
251 #include "NodeRefinementTexture.h"
252 #include "NodeRemoteSelectionGroup.h"
253 #include "NodeRigidBody.h"
254 #include "NodeRigidBodyCollection.h"
255 #include "NodeScalarChaser.h"
256 #include "NodeScalarDamper.h"
257 #include "NodeScalarInterpolator.h"
258 #include "NodeScreenEffect.h"
259 #include "NodeScreenFontStyle.h"
260 #include "NodeScreenGroup.h"
261 #include "NodeSegmentedVolumeData.h"
262 #include "NodeShadedVolumeStyle.h"
263 #include "NodeShaderPart.h"
264 #include "NodeShaderProgram.h"
265 #include "NodeShaderTexture.h"
266 #include "NodeShape.h"
267 #include "NodeSignalPdu.h"
268 #include "NodeSilhouetteEnhancementVolumeStyle.h"
269 #include "NodeSingleAxisHingeJoint.h"
270 #include "NodeSky.h"
271 #include "NodeSliderJoint.h"
272 #include "NodeSlopedCylinder.h"
273 #include "NodeSnout.h"
274 #include "NodeSolidOfRevolution.h"
275 #include "NodeSound.h"
276 #include "NodeSpaceSensor.h"
277 #include "NodeSphere.h"
278 #include "NodeSphereSegment.h"
279 #include "NodeSphereSensor.h"
280 #include "NodeSplinePositionInterpolator.h"
281 #include "NodeSplinePositionInterpolator2D.h"
282 #include "NodeSplineScalarInterpolator.h"
283 #include "NodeSpotLight.h"
284 #include "NodeSquadOrientationInterpolator.h"
285 #include "NodeStaticGroup.h"
286 #include "NodeSteeringWheel.h"
287 #include "NodeStippleVolumeStyle.h"
288 #include "NodeStringSensor.h"
289 #include "NodeSuperEllipsoid.h"
290 #include "NodeSuperExtrusion.h"
291 #include "NodeSuperRevolver.h"
292 #include "NodeSuperShape.h"
293 #include "NodeSurfaceEmitter.h"
294 #include "NodeSurfaceShaderTexture.h"
295 #include "NodeSwitch.h"
296 #include "NodeTeapot.h"
297 #include "NodeTexCoordChaser2D.h"
298 #include "NodeTexCoordDamper2D.h"
299 #include "NodeText.h"
300 #include "NodeText3D.h"
301 #include "NodeTextureBackground.h"
302 #include "NodeTextureCoordinate.h"
303 #include "NodeTextureCoordinate3D.h"
304 #include "NodeTextureCoordinate4D.h"
305 #include "NodeTextureCoordinateGenerator.h"
306 #include "NodeTextureProperties.h"
307 #include "NodeTextureTransform.h"
308 #include "NodeTextureTransform3D.h"
309 #include "NodeTextureTransformMatrix3D.h"
310 #include "NodeTimeTrigger.h"
311 #include "NodeTimeSensor.h"
312 #include "NodeToneMappedVolumeStyle.h"
313 #include "NodeTorus.h"
314 #include "NodeTouchSensor.h"
315 #include "NodeTransformSensor.h"
316 #include "NodeTransmitterPdu.h"
317 #include "NodeTriangleFanSet.h"
318 #include "NodeTriangleSet.h"
319 #include "NodeTriangleSet2D.h"
320 #include "NodeTriangleStripSet.h"
321 #include "NodeTrimmedSurface.h"
322 #include "NodeTransform.h"
323 #include "NodeTUIButton.h"
324 #include "NodeTUIComboBox.h"
325 #include "NodeTUIFloatSlider.h"
326 #include "NodeTUIFrame.h"
327 #include "NodeTUILabel.h"
328 #include "NodeTUIListBox.h"
329 #include "NodeTUIMap.h"
330 #include "NodeTUIProgressBar.h"
331 #include "NodeTUISlider.h"
332 #include "NodeTUISplitter.h"
333 #include "NodeTUITab.h"
334 #include "NodeTUITabFolder.h"
335 #include "NodeTUIToggleButton.h"
336 #include "NodeTwoSidedMaterial.h"
337 #include "NodeUniform.h"
338 #include "NodeUniversalJoint.h"
339 #include "NodeVehicle.h"
340 #include "NodeVectorInterpolator.h"
341 #include "NodeViewfrustum.h"
342 #include "NodeViewpoint.h"
343 #include "NodeViewpointGroup.h"
344 #include "NodeViewport.h"
345 #include "NodeVisibilitySensor.h"
346 #include "NodeVirtualAcoustics.h"
347 #include "NodeVirtualSoundSource.h"
348 #include "NodeVolumeData.h"
349 #include "NodeVolumeEmitter.h"
350 #include "NodeVolumePickSensor.h"
351 #include "NodeVrmlCut.h"
352 #include "NodeVrmlScene.h"
353 #include "NodeWave.h"
354 #include "NodeWindPhysicsModel.h"
355 #include "NodeWonderlandImportJava.h"
356 #include "NodeWorldInfo.h"
357 #include "NodeComment.h"
358 #include "NodeImport.h"
359 #include "NodeExport.h"
360 
361 void
addOrReplace(ProtoMap * protos,const char * string,Proto * proto,bool add)362 SceneProtoMap::addOrReplace(ProtoMap *protos, const char *string,
363                             Proto *proto, bool add)
364 {
365     if (add)
366         protos->add(string, proto);
367     else if (strcmp(string, (const char *)proto->getName(true)) == 0)
368         protos->replace(string, proto);
369 
370     ProtoMap::Chain::Iterator *j;
371 
372     for (int i = 0; i < protos->width(); i++)
373         for (j = protos->chain(i).first(); j != NULL; j = j->next())
374              if (j->item()->getData()->getType() >= VRML_COMMENT)
375                  protos->setExtraData(j);
376 }
377 
378 
379 void
createProtoMap(ProtoMap * protos,Scene * scene,bool add)380 SceneProtoMap::createProtoMap(ProtoMap *protos, Scene *scene, bool add)
381 {
382     addOrReplace(protos, "Anchor", new ProtoAnchor(scene), add);
383     addOrReplace(protos, "Appearance", new ProtoAppearance(scene), add);
384     addOrReplace(protos, "Arc2D", new ProtoArc2D(scene), add);
385     addOrReplace(protos, "ArcClose2D", new ProtoArcClose2D(scene), add);
386     addOrReplace(protos, "ARSensor", new ProtoARSensor(scene), add);
387     addOrReplace(protos, "AudioClip", new ProtoAudioClip(scene), add);
388     addOrReplace(protos, "Background", new ProtoBackground(scene), add);
389     addOrReplace(protos, "BallJoint", new ProtoBallJoint(scene), add);
390     addOrReplace(protos, "BinaryGeometry", new ProtoBinaryGeometry(scene), add);
391     addOrReplace(protos, "Billboard", new ProtoBillboard(scene), add);
392     addOrReplace(protos, "BlendMode", new ProtoBlendMode(scene), add);
393     addOrReplace(protos, "BlendedVolumeStyle",
394                  new ProtoBlendedVolumeStyle(scene), add);
395     addOrReplace(protos, "Block", new ProtoBlock(scene), add);
396     addOrReplace(protos, "BooleanFilter", new ProtoBooleanFilter(scene), add);
397     addOrReplace(protos, "BooleanToggle", new ProtoBooleanToggle(scene), add);
398     addOrReplace(protos, "BooleanTrigger",
399                  new ProtoBooleanTrigger(scene), add);
400     addOrReplace(protos, "BooleanSequencer",
401                  new ProtoBooleanSequencer(scene), add);
402     addOrReplace(protos, "BoundaryEnhancementVolumeStyle",
403                  new ProtoBoundaryEnhancementVolumeStyle(scene), add);
404     addOrReplace(protos, "BoundedPhysicsModel",
405                  new ProtoBoundedPhysicsModel(scene), add);
406     addOrReplace(protos, "Box", new ProtoBox(scene), add);
407     addOrReplace(protos, "CADAssembly", new ProtoCADAssembly(scene), add);
408     addOrReplace(protos, "CADFace", new ProtoCADFace(scene), add);
409     addOrReplace(protos, "CADLayer", new ProtoCADLayer(scene), add);
410     addOrReplace(protos, "CADPart", new ProtoCADPart(scene), add);
411     addOrReplace(protos, "CartoonVolumeStyle",
412                  new ProtoCartoonVolumeStyle(scene), add);
413     addOrReplace(protos, "CattExportRec", new ProtoCattExportRec(scene), add);
414     addOrReplace(protos, "CattExportSrc", new ProtoCattExportSrc(scene), add);
415     addOrReplace(protos, "Circle2D", new ProtoCircle2D(scene), add);
416     addOrReplace(protos, "ClipPlane", new ProtoClipPlane(scene), add);
417     addOrReplace(protos, "CollidableOffset",
418                  new ProtoCollidableOffset(scene), add);
419     addOrReplace(protos, "CollidableShape",
420                  new ProtoCollidableShape(scene), add);
421     addOrReplace(protos, "Collision", new ProtoCollision(scene), add);
422     addOrReplace(protos, "CollisionCollection",
423                  new ProtoCollisionCollection(scene), add);
424     addOrReplace(protos, "CollisionSensor",
425                  new ProtoCollisionSensor(scene), add);
426     addOrReplace(protos, "CollisionSpace",
427                  new ProtoCollisionSpace(scene), add);
428     addOrReplace(protos, "Color", new ProtoColor(scene), add);
429     addOrReplace(protos, "ColorChaser", new ProtoColorChaser(scene), add);
430     addOrReplace(protos, "ColorDamper", new ProtoColorDamper(scene), add);
431     addOrReplace(protos, "ColorInterpolator",
432                  new ProtoColorInterpolator(scene), add);
433     addOrReplace(protos, "ColorMaskMode", new ProtoColorMaskMode(scene), add);
434     addOrReplace(protos, "ColorRGBA", new ProtoColorRGBA(scene), add);
435     addOrReplace(protos, "ColorSetInterpolator",
436                  new ProtoColorSetInterpolator(scene), add);
437     addOrReplace(protos, "ComposedCubeMapTexture",
438                  new ProtoComposedCubeMapTexture(scene), add);
439     addOrReplace(protos, "CommonSurfaceShader",
440                  new ProtoCommonSurfaceShader(scene), add);
441     addOrReplace(protos, "ComposedShader",
442                  new ProtoComposedShader(scene), add);
443     addOrReplace(protos, "ComposedTexture3D",
444                  new ProtoComposedTexture3D(scene), add);
445     addOrReplace(protos, "ComposedVolumeStyle",
446                  new ProtoComposedVolumeStyle(scene), add);
447     addOrReplace(protos, "Cone", new ProtoCone(scene), add);
448     addOrReplace(protos, "ConeEmitter", new ProtoConeEmitter(scene), add);
449     addOrReplace(protos, "Contact", new ProtoContact(scene), add);
450     addOrReplace(protos, "Contour2D", new ProtoContour2D(scene), add);
451     addOrReplace(protos, "ContourPolyline2D",
452                  new ProtoContourPolyline2D(scene), add);
453     addOrReplace(protos, "Coordinate", new ProtoCoordinate(scene), add);
454     addOrReplace(protos, "CoordinateChaser",
455                  new ProtoCoordinateChaser(scene), add);
456     addOrReplace(protos, "CoordinateDamper",
457                  new ProtoCoordinateDamper(scene), add);
458     addOrReplace(protos, "CoordinateDeformer",
459                  new ProtoCoordinateDeformer(scene), add);
460     addOrReplace(protos, "CoordinateDouble",
461                  new ProtoCoordinateDouble(scene), add);
462     addOrReplace(protos, "CoordinateInterpolator",
463                  new ProtoCoordinateInterpolator(scene), add);
464     addOrReplace(protos, "CoordinateInterpolator2D",
465                  new ProtoCoordinateInterpolator2D(scene), add);
466     addOrReplace(protos, "COVER", new ProtoCOVER(scene), add);
467     addOrReplace(protos, "CubeTexture", new ProtoCubeTexture(scene), add);
468     addOrReplace(protos, "CubicBezier2DOrientationInterpolator",
469                  new ProtoCubicBezier2DOrientationInterpolator(scene), add);
470     addOrReplace(protos, "CubicBezierPositionInterpolator",
471                  new ProtoCubicBezierPositionInterpolator(scene), add);
472     addOrReplace(protos, "CurveAnimation",
473                  new ProtoCurveAnimation(scene), add);
474     addOrReplace(protos, "Cylinder", new ProtoCylinder(scene), add);
475     addOrReplace(protos, "CylinderSensor",
476                  new ProtoCylinderSensor(scene), add);
477     addOrReplace(protos, "DepthMode", new ProtoDepthMode(scene), add);
478     addOrReplace(protos, "DirectionalLight",
479                  new ProtoDirectionalLight(scene), add);
480     addOrReplace(protos, "DISEntityManager",
481                  new ProtoDISEntityManager(scene), add);
482     addOrReplace(protos, "DISEntityTypeMapping",
483                  new ProtoDISEntityTypeMapping(scene), add);
484     addOrReplace(protos, "Dish", new ProtoDish(scene), add);
485     addOrReplace(protos, "Disk2D", new ProtoDisk2D(scene), add);
486     addOrReplace(protos, "DoubleAxisHingeJoint",
487                  new ProtoDoubleAxisHingeJoint(scene), add);
488     addOrReplace(protos, "DynamicLOD", new ProtoDynamicLOD(scene), add);
489     addOrReplace(protos, "EaseInEaseOut", new ProtoEaseInEaseOut(scene), add);
490     addOrReplace(protos, "EdgeEnhancementVolumeStyle",
491                  new ProtoEdgeEnhancementVolumeStyle(scene), add);
492     addOrReplace(protos, "Effect", new ProtoEffect(scene), add);
493     addOrReplace(protos, "EffectPart", new ProtoEffectPart(scene), add);
494     addOrReplace(protos, "Environment", new ProtoEnvironment(scene), add);
495     addOrReplace(protos, "ExternalGeometry",
496                  new ProtoExternalGeometry(scene), add);
497     addOrReplace(protos, "ElevationGrid", new ProtoElevationGrid(scene), add);
498     addOrReplace(protos, "EspduTransform",
499                  new ProtoEspduTransform(scene), add);
500     addOrReplace(protos, "ExplosionEmitter",
501                  new ProtoExplosionEmitter(scene), add);
502     addOrReplace(protos, "Extrusion", new ProtoExtrusion(scene), add);
503     addOrReplace(protos, "Field", new ProtoField(scene), add);
504     addOrReplace(protos, "FillProperties",
505                  new ProtoFillProperties(scene), add);
506     addOrReplace(protos, "FloatVertexAttribute",
507                  new ProtoFloatVertexAttribute(scene), add);
508     addOrReplace(protos, "Fog", new ProtoFog(scene), add);
509     addOrReplace(protos, "FogCoordinate", new ProtoFogCoordinate(scene), add);
510     addOrReplace(protos, "FontStyle", new ProtoFontStyle(scene), add);
511     addOrReplace(protos, "ForcePhysicsModel",
512                  new ProtoForcePhysicsModel(scene), add);
513     addOrReplace(protos, "GeneratedCubeMapTexture",
514                  new ProtoGeneratedCubeMapTexture(scene), add);
515     addOrReplace(protos, "GeneratedShadowMap",
516                  new ProtoGeneratedShadowMap(scene), add);
517     addOrReplace(protos, "GeoCoordinate", new ProtoGeoCoordinate(scene), add);
518     addOrReplace(protos, "GeoElevationGrid",
519                  new ProtoGeoElevationGrid(scene), add);
520     addOrReplace(protos, "GeoLocation", new ProtoGeoLocation(scene), add);
521     addOrReplace(protos, "GeoLOD", new ProtoGeoLOD(scene), add);
522     addOrReplace(protos, "GeoMetadata", new ProtoGeoMetadata(scene), add);
523     addOrReplace(protos, "GeoOrigin", new ProtoGeoOrigin(scene), add);
524     addOrReplace(protos, "GeoPositionInterpolator",
525                  new ProtoGeoPositionInterpolator(scene), add);
526     addOrReplace(protos, "GeoProximitySensor",
527                  new ProtoGeoProximitySensor(scene), add);
528     addOrReplace(protos, "GeoTouchSensor",
529                  new ProtoGeoTouchSensor(scene), add);
530     addOrReplace(protos, "GeoTransform", new ProtoGeoTransform(scene), add);
531     addOrReplace(protos, "GeoViewpoint", new ProtoGeoViewpoint(scene), add);
532     addOrReplace(protos, "Group", new ProtoGroup(scene), add);
533     addOrReplace(protos, "HAnimDisplacer",
534                  new ProtoHAnimDisplacer(scene), add);
535     addOrReplace(protos, "HAnimHumanoid", new ProtoHAnimHumanoid(scene), add);
536     addOrReplace(protos, "HAnimMotion", new ProtoHAnimMotion(scene), add);
537     addOrReplace(protos, "HAnimJoint", new ProtoHAnimJoint(scene), add);
538     addOrReplace(protos, "HAnimSegment", new ProtoHAnimSegment(scene), add);
539     addOrReplace(protos, "HAnimSite", new ProtoHAnimSite(scene), add);
540     addOrReplace(protos, "ImageCubeMapTexture",
541                  new ProtoImageCubeMapTexture(scene), add);
542     addOrReplace(protos, "ImageGeometry", new ProtoImageGeometry(scene), add);
543     addOrReplace(protos, "ImageTexture", new ProtoImageTexture(scene), add);
544     addOrReplace(protos, "ImageTexture3D",
545                  new ProtoImageTexture3D(scene), add);
546     addOrReplace(protos, "ImageTextureAtlas",
547                  new ProtoImageTextureAtlas(scene), add);
548     addOrReplace(protos, "IndexedFaceSet",
549                  new ProtoIndexedFaceSet(scene), add);
550     addOrReplace(protos, "IndexedLineSet",
551                  new ProtoIndexedLineSet(scene), add);
552     addOrReplace(protos, "IndexedQuadSet",
553                  new ProtoIndexedQuadSet(scene), add);
554     addOrReplace(protos, "IndexedTriangleFanSet",
555                  new ProtoIndexedTriangleFanSet(scene), add);
556     addOrReplace(protos, "IndexedTriangleSet",
557                  new ProtoIndexedTriangleSet(scene), add);
558     addOrReplace(protos, "IndexedTriangleStripSet",
559                  new ProtoIndexedTriangleStripSet(scene), add);
560     addOrReplace(protos, "Inline", new ProtoInline(scene), add);
561     addOrReplace(protos, "InlineLoadControl",
562                  new ProtoInlineLoadControl(scene), add);
563     addOrReplace(protos, "IntegerSequencer",
564                  new ProtoIntegerSequencer(scene), add);
565     addOrReplace(protos, "IntegerTrigger",
566                  new ProtoIntegerTrigger(scene), add);
567     addOrReplace(protos, "IsoSurfaceVolumeData",
568                  new ProtoIsoSurfaceVolumeData(scene), add);
569     addOrReplace(protos, "JoystickSensor",
570                  new ProtoJoystickSensor(scene), add);
571     addOrReplace(protos, "KambiAppearance",
572                  new ProtoKambiAppearance(scene), add);
573     addOrReplace(protos, "KambiHeadLight",
574                  new ProtoKambiHeadLight(scene), add);
575     addOrReplace(protos, "KambiInline", new ProtoKambiInline(scene), add);
576     addOrReplace(protos, "KambiNavigationInfo",
577                  new ProtoKambiNavigationInfo(scene), add);
578     addOrReplace(protos, "KambiOctreeProperties",
579                  new ProtoKambiOctreeProperties(scene), add);
580     addOrReplace(protos, "KambiTriangulation",
581                  new ProtoKambiTriangulation(scene), add);
582     addOrReplace(protos, "KeySensor", new ProtoKeySensor(scene), add);
583     addOrReplace(protos, "LabView", new ProtoLabView(scene), add);
584     addOrReplace(protos, "Layer", new ProtoLayer(scene), add);
585     addOrReplace(protos, "LayerSet", new ProtoLayerSet(scene), add);
586     addOrReplace(protos, "Layout", new ProtoLayout(scene), add);
587     addOrReplace(protos, "LayoutGroup", new ProtoLayoutGroup(scene), add);
588     addOrReplace(protos, "LayoutLayer", new ProtoLayoutLayer(scene), add);
589     addOrReplace(protos, "LdrawDatExport",
590                  new ProtoLdrawDatExport(scene), add);
591     addOrReplace(protos, "LinePickSensor",
592                  new ProtoLinePickSensor(scene), add);
593     addOrReplace(protos, "LineProperties",
594                  new ProtoLineProperties(scene), add);
595     addOrReplace(protos, "LineSet", new ProtoLineSet(scene), add);
596     addOrReplace(protos, "LoadSensor", new ProtoLoadSensor(scene), add);
597     addOrReplace(protos, "LocalFog", new ProtoLocalFog(scene), add);
598     addOrReplace(protos, "LOD", new ProtoLOD(scene), add);
599     addOrReplace(protos, "Material", new ProtoMaterial(scene), add);
600     addOrReplace(protos, "Matrix3VertexAttribute",
601                  new ProtoMatrix3VertexAttribute(scene), add);
602     addOrReplace(protos, "Matrix4VertexAttribute",
603                  new ProtoMatrix4VertexAttribute(scene), add);
604     addOrReplace(protos, "MatrixTransform",
605                  new ProtoMatrixTransform(scene), add);
606     addOrReplace(protos, "Mesh", new ProtoMesh(scene), add);
607     addOrReplace(protos, "MetadataBoolean",
608                  new ProtoMetadataBoolean(scene), add);
609     addOrReplace(protos, "MetadataDouble",
610                  new ProtoMetadataDouble(scene), add);
611     addOrReplace(protos, "MetadataFloat", new ProtoMetadataFloat(scene), add);
612     addOrReplace(protos, "MetadataInteger",
613                  new ProtoMetadataInteger(scene), add);
614     addOrReplace(protos, "MetadataSet", new ProtoMetadataSet(scene), add);
615     addOrReplace(protos, "MetadataString",
616                  new ProtoMetadataString(scene), add);
617     addOrReplace(protos, "MotorJoint", new ProtoMotorJoint(scene), add);
618     addOrReplace(protos, "MovieTexture", new ProtoMovieTexture(scene), add);
619     addOrReplace(protos, "MPRVolumeStyle", new ProtoMPRVolumeStyle(scene), add);
620     addOrReplace(protos, "MultiGeneratedTextureCoordinate",
621                  new ProtoMultiGeneratedTextureCoordinate(scene), add);
622     addOrReplace(protos, "MultiPart", new ProtoMultiPart(scene), add);
623     addOrReplace(protos, "MultiTexture", new ProtoMultiTexture(scene), add);
624     addOrReplace(protos, "MultiTextureCoordinate",
625                  new ProtoMultiTextureCoordinate(scene), add);
626     addOrReplace(protos, "MultiTextureTransform",
627                  new ProtoMultiTextureTransform(scene), add);
628     addOrReplace(protos, "NavigationInfo",
629                  new ProtoNavigationInfo(scene), add);
630     addOrReplace(protos, "Normal", new ProtoNormal(scene), add);
631     addOrReplace(protos, "NormalInterpolator",
632                  new ProtoNormalInterpolator(scene), add);
633     addOrReplace(protos, "Nozzle", new ProtoNozzle(scene), add);
634     addOrReplace(protos, "NurbsCurve", new ProtoNurbsCurve(scene), add);
635     addOrReplace(protos, "NurbsCurve2D", new ProtoNurbsCurve2D(scene), add);
636     addOrReplace(protos, "NurbsGroup", new ProtoNurbsGroup(scene), add);
637     addOrReplace(protos, "NurbsOrientationInterpolator",
638                  new ProtoNurbsOrientationInterpolator(scene), add);
639     addOrReplace(protos, "NurbsPositionInterpolator",
640                  new ProtoNurbsPositionInterpolator(scene), add);
641     addOrReplace(protos, "NurbsSet", new ProtoNurbsSet(scene), add);
642     addOrReplace(protos, "NurbsSurface", new ProtoNurbsSurface(scene), add);
643     addOrReplace(protos, "NurbsSurfaceInterpolator",
644                  new ProtoNurbsSurfaceInterpolator(scene), add);
645     addOrReplace(protos, "NurbsSweptSurface",
646                  new ProtoNurbsSweptSurface(scene), add);
647     addOrReplace(protos, "NurbsSwungSurface",
648                  new ProtoNurbsSwungSurface(scene), add);
649     addOrReplace(protos, "NurbsTextureSurface",
650                  new ProtoNurbsTextureSurface(scene), add);
651     addOrReplace(protos, "NurbsTextureCoordinate",
652                  new ProtoNurbsTextureCoordinate(scene), add);
653     addOrReplace(protos, "NurbsTrimmedSurface",
654                  new ProtoNurbsTrimmedSurface(scene), add);
655     addOrReplace(protos, "OpacityMapVolumeStyle",
656                  new ProtoOpacityMapVolumeStyle(scene), add);
657     addOrReplace(protos, "OrientationChaser",
658                  new ProtoOrientationChaser(scene), add);
659     addOrReplace(protos, "OrientationDamper",
660                  new ProtoOrientationDamper(scene), add);
661     addOrReplace(protos, "OrientationInterpolator",
662                  new ProtoOrientationInterpolator(scene), add);
663     addOrReplace(protos, "OrthoViewpoint",
664                  new ProtoOrthoViewpoint(scene), add);
665     addOrReplace(protos, "PackagedShader",
666                  new ProtoPackagedShader(scene), add);
667     addOrReplace(protos, "Param", new ProtoParam(scene), add);
668     addOrReplace(protos, "ParticleSet", new ProtoParticleSet(scene), add);
669     addOrReplace(protos, "ParticleSystem",
670                  new ProtoParticleSystem(scene), add);
671     addOrReplace(protos, "PickableGroup", new ProtoPickableGroup(scene), add);
672     addOrReplace(protos, "PixelTexture", new ProtoPixelTexture(scene), add);
673     addOrReplace(protos, "PixelTexture3D",
674                  new ProtoPixelTexture3D(scene), add);
675     addOrReplace(protos, "Plane", new ProtoPlane(scene), add);
676     addOrReplace(protos, "PlaneSensor", new ProtoPlaneSensor(scene), add);
677     addOrReplace(protos, "PointEmitter", new ProtoPointEmitter(scene), add);
678     addOrReplace(protos, "PointLight", new ProtoPointLight(scene), add);
679     addOrReplace(protos, "PointProperties",
680                  new ProtoPointProperties(scene), add);
681     addOrReplace(protos, "PointPickSensor",
682                  new ProtoPointPickSensor(scene), add);
683     addOrReplace(protos, "PointSet", new ProtoPointSet(scene), add);
684     addOrReplace(protos, "Polyline2D", new ProtoPolyline2D(scene), add);
685     addOrReplace(protos, "PolylineEmitter",
686                  new ProtoPolylineEmitter(scene), add);
687     addOrReplace(protos, "Polypoint2D", new ProtoPolypoint2D(scene), add);
688     addOrReplace(protos, "PopGeometry", new ProtoPopGeometry(scene), add);
689     addOrReplace(protos, "PopGeometryLevel",
690                  new ProtoPopGeometryLevel(scene), add);
691     addOrReplace(protos, "PositionChaser",
692                  new ProtoPositionChaser(scene), add);
693     addOrReplace(protos, "PositionChaser2D",
694                  new ProtoPositionChaser2D(scene), add);
695     addOrReplace(protos, "PositionDamper",
696                  new ProtoPositionDamper(scene), add);
697     addOrReplace(protos, "PositionDamper2D",
698                  new ProtoPositionDamper2D(scene), add);
699     addOrReplace(protos, "PositionInterpolator",
700                  new ProtoPositionInterpolator(scene), add);
701     addOrReplace(protos, "PositionInterpolator2D",
702                  new ProtoPositionInterpolator2D(scene), add);
703     addOrReplace(protos, "PrimitivePickSensor",
704                  new ProtoPrimitivePickSensor(scene), add);
705     addOrReplace(protos, "ProgramShader", new ProtoProgramShader(scene), add);
706     addOrReplace(protos, "ProjectedTextureCoordinate",
707                  new ProtoProjectedTextureCoordinate(scene), add);
708     addOrReplace(protos, "ProjectionVolumeStyle",
709                  new ProtoProjectionVolumeStyle(scene), add);
710     addOrReplace(protos, "ProximitySensor",
711                  new ProtoProximitySensor(scene), add);
712     addOrReplace(protos, "Pyramid", new ProtoPyramid(scene), add);
713     addOrReplace(protos, "QuadSet", new ProtoQuadSet(scene), add);
714     addOrReplace(protos, "RadarVolumeStyle",
715                           new ProtoRadarVolumeStyle(scene), add);
716     addOrReplace(protos, "ReceiverPdu", new ProtoReceiverPdu(scene), add);
717     addOrReplace(protos, "Rectangle2D", new ProtoRectangle2D(scene), add);
718     addOrReplace(protos, "RectangularTorus",
719                  new ProtoRectangularTorus(scene), add);
720     addOrReplace(protos, "RenderedTexture",
721                  new ProtoRenderedTexture(scene), add);
722     addOrReplace(protos, "RefinementTexture",
723                  new ProtoRefinementTexture(scene), add);
724     addOrReplace(protos, "RemoteSelectionGroup",
725                  new ProtoRemoteSelectionGroup(scene), add);
726     addOrReplace(protos, "RigidBody", new ProtoRigidBody(scene), add);
727     addOrReplace(protos, "RigidBodyCollection",
728                  new ProtoRigidBodyCollection(scene), add);
729     addOrReplace(protos, "ScalarChaser", new ProtoScalarChaser(scene), add);
730     addOrReplace(protos, "ScalarDamper", new ProtoScalarDamper(scene), add);
731     addOrReplace(protos, "ScalarInterpolator",
732                  new ProtoScalarInterpolator(scene), add);
733     addOrReplace(protos, "ScreenEffect", new ProtoScreenEffect(scene), add);
734     addOrReplace(protos, "ScreenFontStyle",
735                  new ProtoScreenFontStyle(scene), add);
736     addOrReplace(protos, "ScreenGroup", new ProtoScreenGroup(scene), add);
737     addOrReplace(protos, "SegmentedVolumeData",
738                  new ProtoSegmentedVolumeData(scene), add);
739     addOrReplace(protos, "ShadedVolumeStyle",
740                  new ProtoShadedVolumeStyle(scene), add);
741     addOrReplace(protos, "ShaderPart", new ProtoShaderPart(scene), add);
742     addOrReplace(protos, "ShaderProgram", new ProtoShaderProgram(scene), add);
743     addOrReplace(protos, "ShaderTexture", new ProtoShaderTexture(scene), add);
744     addOrReplace(protos, "Shape", new ProtoShape(scene), add);
745     addOrReplace(protos, "SilhouetteEnhancementVolumeStyle",
746                  new ProtoSilhouetteEnhancementVolumeStyle(scene), add);
747     addOrReplace(protos, "SignalPdu", new ProtoSignalPdu(scene), add);
748     addOrReplace(protos, "SingleAxisHingeJoint",
749                  new ProtoSingleAxisHingeJoint(scene), add);
750     addOrReplace(protos, "Sky", new ProtoSky(scene), add);
751     addOrReplace(protos, "SliderJoint", new ProtoSliderJoint(scene), add);
752     addOrReplace(protos, "SlopedCylinder", new ProtoSlopedCylinder(scene), add);
753     addOrReplace(protos, "Snout", new ProtoSnout(scene), add);
754     addOrReplace(protos, "SolidOfRevolution", new ProtoSolidOfRevolution(scene),
755                  add);
756     addOrReplace(protos, "Sound", new ProtoSound(scene), add);
757     addOrReplace(protos, "SpaceSensor", new ProtoSpaceSensor(scene), add);
758     addOrReplace(protos, "Sphere", new ProtoSphere(scene), add);
759     addOrReplace(protos, "SphereSegment", new ProtoSphereSegment(scene), add);
760     addOrReplace(protos, "SphereSensor", new ProtoSphereSensor(scene), add);
761     addOrReplace(protos, "SplinePositionInterpolator",
762                  new ProtoSplinePositionInterpolator(scene), add);
763     addOrReplace(protos, "SplinePositionInterpolator2D",
764                  new ProtoSplinePositionInterpolator2D(scene), add);
765     addOrReplace(protos, "SplineScalarInterpolator",
766                  new ProtoSplineScalarInterpolator(scene), add);
767     addOrReplace(protos, "SpotLight", new ProtoSpotLight(scene), add);
768     addOrReplace(protos, "SquadOrientationInterpolator",
769                  new ProtoSquadOrientationInterpolator(scene), add);
770     addOrReplace(protos, "StaticGroup", new ProtoStaticGroup(scene), add);
771     addOrReplace(protos, "SteeringWheel", new ProtoSteeringWheel(scene), add);
772     addOrReplace(protos, "StippleVolumeStyle",
773                  new ProtoStippleVolumeStyle(scene), add);
774     addOrReplace(protos, "StringSensor", new ProtoStringSensor(scene), add);
775     addOrReplace(protos, "SuperEllipsoid",
776                  new ProtoSuperEllipsoid(scene), add);
777     addOrReplace(protos, "SuperExtrusion",
778                  new ProtoSuperExtrusion(scene), add);
779     addOrReplace(protos, "SuperShape", new ProtoSuperShape(scene), add);
780     addOrReplace(protos, "SuperRevolver", new ProtoSuperRevolver(scene), add);
781     addOrReplace(protos, "SurfaceEmitter",
782                  new ProtoSurfaceEmitter(scene), add);
783     addOrReplace(protos, "SurfaceShaderTexture",
784                  new ProtoSurfaceShaderTexture(scene), add);
785     addOrReplace(protos, "Switch", new ProtoSwitch(scene), add);
786     addOrReplace(protos, "Teapot", new ProtoTeapot(scene), add);
787     addOrReplace(protos, "TexCoordChaser2D",
788                  new ProtoTexCoordChaser2D(scene), add);
789     addOrReplace(protos, "TexCoordDamper2D",
790                  new ProtoTexCoordDamper2D(scene), add);
791     addOrReplace(protos, "Text", new ProtoText(scene), add);
792     addOrReplace(protos, "Text3D", new ProtoText3D(scene), add);
793     addOrReplace(protos, "TextureBackground",
794                  new ProtoTextureBackground(scene), add);
795     addOrReplace(protos, "TextureCoordinate",
796                  new ProtoTextureCoordinate(scene), add);
797     addOrReplace(protos, "TextureCoordinate3D",
798                  new ProtoTextureCoordinate3D(scene), add);
799     addOrReplace(protos, "TextureCoordinate4D",
800                  new ProtoTextureCoordinate4D(scene), add);
801     addOrReplace(protos, "TextureCoordinateGenerator",
802                  new ProtoTextureCoordinateGenerator(scene), add);
803     addOrReplace(protos, "TextureProperties",
804                  new ProtoTextureProperties(scene), add);
805     addOrReplace(protos, "TextureTransform",
806                  new ProtoTextureTransform(scene), add);
807     addOrReplace(protos, "TextureTransform3D",
808                  new ProtoTextureTransform3D(scene), add);
809     addOrReplace(protos, "TextureTransformMatrix3D",
810                  new ProtoTextureTransformMatrix3D(scene), add);
811     addOrReplace(protos, "TimeSensor", new ProtoTimeSensor(scene), add);
812     addOrReplace(protos, "TimeTrigger", new ProtoTimeTrigger(scene), add);
813     addOrReplace(protos, "ToneMappedVolumeStyle",
814                  new ProtoToneMappedVolumeStyle(scene), add);
815     addOrReplace(protos, "TouchSensor", new ProtoTouchSensor(scene), add);
816     addOrReplace(protos, "Torus", new ProtoTorus(scene), add);
817     addOrReplace(protos, "Transform", new ProtoTransform(scene), add);
818     addOrReplace(protos, "TransformSensor",
819                  new ProtoTransformSensor(scene), add);
820     addOrReplace(protos, "TransmitterPdu",
821                  new ProtoTransmitterPdu(scene), add);
822     addOrReplace(protos, "TriangleFanSet",
823                  new ProtoTriangleFanSet(scene), add);
824     addOrReplace(protos, "TriangleSet", new ProtoTriangleSet(scene), add);
825     addOrReplace(protos, "TriangleSet2D", new ProtoTriangleSet2D(scene), add);
826     addOrReplace(protos, "TriangleStripSet",
827                  new ProtoTriangleStripSet(scene), add);
828     addOrReplace(protos, "TrimmedSurface", new ProtoTrimmedSurface(scene), add);
829     addOrReplace(protos, "TUIButton", new ProtoTUIButton(scene), add);
830     addOrReplace(protos, "TUIComboBox", new ProtoTUIComboBox(scene), add);
831     addOrReplace(protos, "TUIFloatSlider",
832                  new ProtoTUIFloatSlider(scene), add);
833     addOrReplace(protos, "TUIFrame", new ProtoTUIFrame(scene), add);
834     addOrReplace(protos, "TUILabel", new ProtoTUILabel(scene), add);
835     addOrReplace(protos, "TUIListBox", new ProtoTUIListBox(scene), add);
836     addOrReplace(protos, "TUIMap", new ProtoTUIMap(scene), add);
837     addOrReplace(protos, "TUIProgressBar",
838                  new ProtoTUIProgressBar(scene), add);
839     addOrReplace(protos, "TUISlider", new ProtoTUISlider(scene), add);
840     addOrReplace(protos, "TUISplitter", new ProtoTUISplitter(scene), add);
841     addOrReplace(protos, "TUITab", new ProtoTUITab(scene), add);
842     addOrReplace(protos, "TUITabFolder", new ProtoTUITabFolder(scene), add);
843     addOrReplace(protos, "TUIToggleButton",
844                  new ProtoTUIToggleButton(scene), add);
845     addOrReplace(protos, "TwoSidedMaterial",
846                  new ProtoTwoSidedMaterial(scene), add);
847     addOrReplace(protos, "Uniform", new ProtoUniform(scene), add);
848     addOrReplace(protos, "UniversalJoint", new ProtoUniversalJoint(scene), add);
849     addOrReplace(protos, "Vehicle", new ProtoVehicle(scene), add);
850     addOrReplace(protos, "VectorInterpolator",
851                  new ProtoVectorInterpolator(scene), add);
852     addOrReplace(protos, "Viewfrustum", new ProtoViewfrustum(scene), add);
853     addOrReplace(protos, "Viewpoint", new ProtoViewpoint(scene), add);
854     addOrReplace(protos, "ViewpointGroup",
855                  new ProtoViewpointGroup(scene), add);
856     addOrReplace(protos, "Viewport", new ProtoViewport(scene), add);
857     addOrReplace(protos, "VirtualAcoustics", new ProtoVirtualAcoustics(scene), add);
858     addOrReplace(protos, "VirtualSoundSource",
859                  new ProtoVirtualSoundSource(scene), add);
860     addOrReplace(protos, "VisibilitySensor",
861                  new ProtoVisibilitySensor(scene), add);
862     addOrReplace(protos, "VolumeData", new ProtoVolumeData(scene), add);
863     addOrReplace(protos, "VolumeEmitter", new ProtoVolumeEmitter(scene), add);
864     addOrReplace(protos, "VolumePickSensor",
865                  new ProtoVolumePickSensor(scene), add);
866     addOrReplace(protos, "VrmlCut", new ProtoVrmlCut(scene), add);
867     addOrReplace(protos, "VrmlScene", new ProtoVrmlScene(scene), add);
868     addOrReplace(protos, "Wave", new ProtoWave(scene), add);
869     addOrReplace(protos, "WindPhysicsModel",
870                  new ProtoWindPhysicsModel(scene), add);
871     addOrReplace(protos, "WonderlandImportJava",
872                  new ProtoWonderlandImportJava(scene), add);
873     addOrReplace(protos, "WorldInfo", new ProtoWorldInfo(scene), add);
874     addOrReplace(protos, "#", new ProtoComment(scene), add);
875     addOrReplace(protos, "IMPORT", new ProtoImport(scene), add);
876     addOrReplace(protos, "EXPORT", new ProtoExport(scene), add);
877 }
878 
879 void
updateProtoMap(ProtoMap * protos,Scene * scene)880 SceneProtoMap::updateProtoMap(ProtoMap* protos, Scene *scene)
881 {
882     bool needUpdate = false;
883     ProtoMap::Chain::Iterator *j;
884     for (int i = 0; i < protos->width(); i++) {
885         for (j = protos->chain(i).first(); j != NULL; j = j->next()) {
886             if (j->item()->getData() && j->item()->getData()->needUpdate()) {
887                 needUpdate = true;
888                 break;
889             }
890         }
891         if (needUpdate)
892             break;
893     }
894     if (needUpdate)
895         createProtoMap(protos, scene, false);
896 
897     MyString contourPolyline2D = "";
898     contourPolyline2D += "ContourPolyline2D";
899     (*protos)[contourPolyline2D] = new ProtoContourPolyline2D(scene);
900     const NodeList *nodes = scene->getNodes();
901     for (long i = 0; i < nodes->size(); i++) {
902          Node *node = nodes->get(i);
903          if (node->getType() == X3D_CONTOUR_POLYLINE_2D)
904              node->setProto((*protos)[contourPolyline2D]);
905     }
906 }
907 
908 
909