de.grogra.ext.x3d
public class X3DExport extends SceneGraphExport implements FileWriterSource
SceneGraphExport.NodeExport, SceneGraphExport.ObjectExportFilterSource.MetaDataKey<V>| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
TRANSFORMERFACTORY_JAVA |
protected java.lang.String |
TRANSFORMERFACTORY_XALAN |
protected java.lang.String |
XSLT_PATH_X3D_TO_VRML_CLASSIC |
protected java.lang.String |
XSLT_PATH_X3D_TO_VRML97 |
protected java.lang.String |
XSLT_PATH_X3D_TO_VRML97_A |
filesitem, sourceAUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URLDEFAULT_VALUE, EMPTY_MAP| Constructor and Description |
|---|
X3DExport(FilterItem item,
FilterSource source) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beginGroup(SceneTree.InnerNode group)
This method is invoked at the beginning of every inner node
group which has more than one child. |
protected SceneTree |
createSceneTree(View3D scene)
The implementation of this method creates the scene tree which is
to be exported by this export.
|
protected void |
endGroup(SceneTree.InnerNode group)
This method is invoked at the end of every inner node
group which has more than one child. |
java.lang.String |
getDirectory()
This method returns the base directory within
SceneGraphExport.getFileSystem() to use for the export. |
SceneGraphExport.NodeExport |
getExportFor(java.lang.Object object,
boolean asNode)
This method is used to obtain an instance of
NodeExport
capable of exporting the object of a
SceneTree.Leaf. |
java.lang.Object |
getFile(java.lang.String name)
This method creates a file in
SceneGraphExport.getDirectory(). |
de.grogra.ext.x3d.xmlbeans.TransformDocument.Transform |
getLastTransform() |
java.io.File |
getOutFile() |
de.grogra.ext.x3d.xmlbeans.SceneDocument.Scene |
getScene() |
void |
increaseProgress() |
void |
write(java.io.File out)
This method writes the data to
out. |
export, export, getExportForObject, getFiles, getFileSystem, getGraphState, getOutputStream, getPath, getPath, getView, initDirectory, initFileSystem, visit, visitEnter, visitLeave, writeget, getFilter, getFlavor, getImpl, getMetaData, getRegistry, getSource, getSystemId, initProgressMonitor, setFlavor, setMetaData, setMetaData, setProgress, setSystemId, toString, toURLclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFilter, getFlavor, getMetaData, getSystemId, initProgressMonitor, setMetaData, setProgressgetRegistryprotected final java.lang.String TRANSFORMERFACTORY_JAVA
protected final java.lang.String TRANSFORMERFACTORY_XALAN
protected final java.lang.String XSLT_PATH_X3D_TO_VRML_CLASSIC
protected final java.lang.String XSLT_PATH_X3D_TO_VRML97
protected final java.lang.String XSLT_PATH_X3D_TO_VRML97_A
public X3DExport(FilterItem item, FilterSource source)
protected void beginGroup(SceneTree.InnerNode group) throws java.io.IOException
SceneGraphExportgroup which has more than one child. Its children
will be processed until the corresponding method
SceneGraphExport.endGroup(de.grogra.imp3d.objects.SceneTree.InnerNode) is invoked. The export should write
the hierarchy and transformation information of the group.beginGroup in class SceneGraphExportgroup - the groupjava.io.IOExceptionprotected SceneTree createSceneTree(View3D scene)
SceneGraphExportcreateSceneTree in class SceneGraphExportscene - the view which defines the scene to exportprotected void endGroup(SceneTree.InnerNode group) throws java.io.IOException
SceneGraphExportgroup which has more than one child. Its children
have been processed completely.endGroup in class SceneGraphExportgroup - the groupjava.io.IOExceptionSceneGraphExport.beginGroup(de.grogra.imp3d.objects.SceneTree.InnerNode)public java.lang.String getDirectory()
SceneGraphExportSceneGraphExport.getFileSystem() to use for the export.
On first invocation, the directory is obtained from
SceneGraphExport.initDirectory().getDirectory in class SceneGraphExportpublic SceneGraphExport.NodeExport getExportFor(java.lang.Object object, boolean asNode)
SceneGraphExportNodeExport
capable of exporting the object of a
SceneTree.Leaf. If no such export
is defined, null is returned.
This implementation looks for an export defined in the registry:
As name, the name of the class of object is chosen,
the export is searched as a child of FilterBase.item.
getExportFor in class SceneGraphExportobject - object of the original scene graphasNode - is object a node or an edge?nullpublic java.lang.Object getFile(java.lang.String name)
throws java.io.IOException
SceneGraphExportSceneGraphExport.getDirectory(). The file
name is based ob name: E.g., if name
is test.png, the actual name could be something like
test123.png. It is ensured that no file will be returned
twice during a single export.getFile in class SceneGraphExportname - name for filejava.io.IOExceptionpublic de.grogra.ext.x3d.xmlbeans.TransformDocument.Transform getLastTransform()
public java.io.File getOutFile()
public de.grogra.ext.x3d.xmlbeans.SceneDocument.Scene getScene()
public void increaseProgress()
public void write(java.io.File out)
throws java.io.IOException
FileWriterSourceout.write in interface FileWriterSourceout - the file to which data is writtenjava.io.IOException