de.grogra.ext.x3d
Class ClassicVRMLExport
java.lang.Object
de.grogra.pf.io.FilterBase
de.grogra.imp3d.io.SceneGraphExport
de.grogra.ext.x3d.X3DExport
de.grogra.ext.x3d.ClassicVRMLExport
- All Implemented Interfaces:
- SceneTree.Visitor, FileWriterSource, Filter, FilterSource, RegistryContext, Map
public class ClassicVRMLExport
- extends X3DExport
- implements FileWriterSource
| Nested classes/interfaces inherited from interface de.grogra.util.Map |
Map.Chain |
| Methods inherited from class de.grogra.imp3d.io.SceneGraphExport |
export, export, getExportForObject, getFiles, getFileSystem, getGraphState, getOutputStream, getPath, getPath, getView, initDirectory, initFileSystem, visit, visitEnter, visitLeave, write |
| Methods inherited from class de.grogra.pf.io.FilterBase |
get, getFilter, getFlavor, getImpl, getMetaData, getRegistry, getSource, getSystemId, initProgressMonitor, setFlavor, setMetaData, setMetaData, setProgress, setSystemId, toString, toURL |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClassicVRMLExport
public ClassicVRMLExport(FilterItem item,
FilterSource source)
beginGroup
protected void beginGroup(SceneTree.InnerNode group)
throws java.io.IOException
- Description copied from class:
SceneGraphExport
- This method is invoked at the beginning of every inner node
group 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.
- Overrides:
beginGroup in class X3DExport
- Parameters:
group - the group
- Throws:
java.io.IOException
createSceneTree
protected SceneTree createSceneTree(View3D scene)
- Description copied from class:
SceneGraphExport
- The implementation of this method creates the scene tree which is
to be exported by this export.
- Overrides:
createSceneTree in class X3DExport
- Parameters:
scene - the view which defines the scene to export
- Returns:
- scene tree for the view
endGroup
protected void endGroup(SceneTree.InnerNode group)
throws java.io.IOException
- Description copied from class:
SceneGraphExport
- This method is invoked at the end of every inner node
group which has more than one child. Its children
have been processed completely.
- Overrides:
endGroup in class X3DExport
- Parameters:
group - the group
- Throws:
java.io.IOException- See Also:
SceneGraphExport.beginGroup(de.grogra.imp3d.objects.SceneTree.InnerNode)
getDirectory
public java.lang.String getDirectory()
- Description copied from class:
SceneGraphExport
- This method returns the base directory within
SceneGraphExport.getFileSystem() to use for the export.
On first invocation, the directory is obtained from
SceneGraphExport.initDirectory().
- Overrides:
getDirectory in class X3DExport
- Returns:
- directory to use for export
getExportFor
public SceneGraphExport.NodeExport getExportFor(java.lang.Object object,
boolean asNode)
- Description copied from class:
SceneGraphExport
- This method is used to obtain an instance of
NodeExport
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.
- Overrides:
getExportFor in class X3DExport
- Parameters:
object - object of the original scene graphasNode - is object a node or an edge?
- Returns:
- suitable export for the object or
null
getFile
public java.lang.Object getFile(java.lang.String name)
throws java.io.IOException
- Description copied from class:
SceneGraphExport
- This method creates a file in
SceneGraphExport.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.
- Overrides:
getFile in class X3DExport
- Parameters:
name - name for file
- Returns:
- file
- Throws:
java.io.IOException
getLastTransform
public de.grogra.ext.x3d.xmlbeans.TransformDocument.Transform getLastTransform()
- Overrides:
getLastTransform in class X3DExport
getOutFile
public java.io.File getOutFile()
- Overrides:
getOutFile in class X3DExport
getScene
public de.grogra.ext.x3d.xmlbeans.SceneDocument.Scene getScene()
- Overrides:
getScene in class X3DExport
increaseProgress
public void increaseProgress()
- Overrides:
increaseProgress in class X3DExport
write
public void write(java.io.File out)
throws java.io.IOException
- Description copied from interface:
FileWriterSource
- This method writes the data to
out.
- Specified by:
write in interface FileWriterSource- Overrides:
write in class X3DExport
- Parameters:
out - the file to which data is written
- Throws:
java.io.IOException