Class X3DXMLExporter

java.lang.Object
org.web3d.vrml.export.Exporter
org.web3d.vrml.export.X3DXMLExporter
All Implemented Interfaces:
ContentHandler, ProtoHandler, RouteHandler, ScriptHandler, StringContentHandler

public class X3DXMLExporter extends Exporter
X3D XML encoding Exporter. WARNING: Do not change the location of a push or pop unless you really test the results. This class must track when to drop a </field> tag. It ends when:
  • a value is specified
  • another fieldDecl is found on the same level
  • a field is found on the same level
  • the script/protoInterface ends

Maintain a level variable inc on each new node dec on each end of node

Maintain a stack of level variables tracking fieldDecl push on a fieldDecl pop on a endFieldDecl(above rules)

To handle the fact that IS elements must be declared first we have a stack of StringBuilders where IS information is kept per node. push on startNode pop and prepend on endNode

To handle ProtoInstance fieldValues being fieldValue element instead of attribute we need to know when we are inside a protoInstance. push on startNode whether this is a protoInstance pop on endNode TODO: convert VRML97 Collision.collide to isActive fix double loop on converting training.wrl fix ' exporting in MountHood_VRML conversion fix containerField for things like CADFace/shape

Version:
$Revision: 1.22 $
Author:
Alan Hudson