java.lang.Object
de.grogra.pf.io.FilterBase
de.grogra.imp3d.io.SceneGraphExport
de.grogra.ext.povray.POVExport
- All Implemented Interfaces:
SceneTree.Visitor,FileWriterSource,Filter,FilterSource,WriterSource,RegistryContext,Map
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.imp3d.io.SceneGraphExport
SceneGraphExport.NodeExport, SceneGraphExport.ObjectExportNested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FilterSource.MetaDataKey<Float> static final FilterSource.MetaDataKey<Float> static final IOFlavorstatic final FilterSource.MetaDataKey<Boolean> static final MimeTypefinal PolygonArrayfinal Poolstatic final FilterSource.MetaDataKey<Boolean> Fields inherited from class de.grogra.pf.io.FilterBase
item, sourceFields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URLFields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbeginGroup(SceneTree.InnerNode group) This method is invoked at the beginning of every inner nodegroupwhich has more than one child.protected SceneTreecreateSceneTree(View3D scene) The implementation of this method creates the scene tree which is to be exported by this export.declareObject(Object object, String name) protected voidendGroup(SceneTree.InnerNode group) This method is invoked at the end of every inner nodegroupwhich has more than one child.static voidbooleanThis method is invoked for some attribute value in order to export the value.booleanvoidgetDeclaredName(Object object) getExportFor(Object object, boolean asNode) This method is used to obtain an instance ofNodeExportcapable of exporting the object of aSceneTree.Leaf.This method creates a file inSceneGraphExport.getDirectory().getObjectType(String type) protected ObjectDetermines the directory to use.protected FileSystemDetermines the file system to use.protected voidwrite()Exports the scene of the view.voidThis method writes the data toout.voidThis method writes the data toout.Methods inherited from class de.grogra.imp3d.io.SceneGraphExport
export, getDirectory, getExportForObject, getFiles, getFileSystem, getGraphState, getOutputStream, getPath, getPath, getView, visit, visitEnter, visitLeaveMethods inherited from class de.grogra.pf.io.FilterBase
get, getFilter, getFlavor, getImpl, getMetaData, getRegistry, getSource, getSystemId, initProgressMonitor, setFlavor, setMetaData, setMetaData, setProgress, setSystemId, toString, toURLMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, getSystemId, initProgressMonitor, setMetaData, setProgressMethods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
-
Field Details
-
FLATNESS
-
LAYERS
-
ASPECT
-
TEMPORARY
-
pool
-
MIME_TYPE
-
FLAVOR
-
polygons
-
-
Constructor Details
-
POVExport
-
-
Method Details
-
createSceneTree
Description copied from class:SceneGraphExportThe implementation of this method creates the scene tree which is to be exported by this export.- Specified by:
createSceneTreein classSceneGraphExport- Parameters:
scene- the view which defines the scene to export- Returns:
- scene tree for the view
-
beginGroup
Description copied from class:SceneGraphExportThis method is invoked at the beginning of every inner nodegroupwhich has more than one child. Its children will be processed until the corresponding methodSceneGraphExport.endGroup(de.grogra.imp3d.objects.SceneTree.InnerNode)is invoked. The export should write the hierarchy and transformation information of thegroup.- Specified by:
beginGroupin classSceneGraphExport- Parameters:
group- the group- Throws:
IOException
-
endGroup
Description copied from class:SceneGraphExportThis method is invoked at the end of every inner nodegroupwhich has more than one child. Its children have been processed completely.- Specified by:
endGroupin classSceneGraphExport- Parameters:
group- the group- Throws:
IOException- See Also:
-
initFileSystem
Description copied from class:SceneGraphExportDetermines the file system to use. This method is invoked once bySceneGraphExport.getFileSystem().- Overrides:
initFileSystemin classSceneGraphExport- Returns:
- file system to use
- Throws:
IOException
-
initDirectory
Description copied from class:SceneGraphExportDetermines the directory to use. This method is invoked once bySceneGraphExport.getDirectory().- Overrides:
initDirectoryin classSceneGraphExport- Returns:
- directory to use
- Throws:
IOException
-
getFile
Description copied from class:SceneGraphExportThis method creates a file inSceneGraphExport.getDirectory(). The file name is based obname: E.g., ifnameistest.png, the actual name could be something liketest123.png. It is ensured that no file will be returned twice during a single export.- Overrides:
getFilein classSceneGraphExport- Parameters:
name- name for file- Returns:
- file
- Throws:
IOException
-
write
Description copied from class:SceneGraphExportExports the scene of the view. This method at first creates the scene tree usingSceneGraphExport.createSceneTree(View3D), then it lets this export instance visit the created scene tree. During visit, the methodsSceneGraphExport.beginGroup(de.grogra.imp3d.objects.SceneTree.InnerNode),SceneGraphExport.endGroup(de.grogra.imp3d.objects.SceneTree.InnerNode)andSceneGraphExport.export(SceneTree.Leaf, SceneTree.InnerNode)are invoked; these have to be implemented to perform the actual export to the destination.- Overrides:
writein classSceneGraphExport- Throws:
IOException
-
write
Description copied from interface:FileWriterSourceThis method writes the data toout.- Specified by:
writein interfaceFileWriterSource- Parameters:
out- the file to which data is written- Throws:
IOException
-
write
Description copied from interface:WriterSourceThis method writes the data toout.- Specified by:
writein interfaceWriterSource- Parameters:
w- the writer to which data is written- Throws:
IOException
-
getDeclaredName
-
declareObject
-
exportPolygons
- Throws:
IOException
-
export
- Throws:
IOException
-
export
Description copied from class:SceneGraphExportThis method is invoked for some attribute value in order to export the value.This implementation obtains an
SceneGraphExport.ObjectExportviaSceneGraphExport.getExportForObject(Object)and, if successful, uses this to export the value.- Overrides:
exportin classSceneGraphExport- Parameters:
object- object to export- Throws:
IOException
-
getObjectType
-
getExportFor
Description copied from class:SceneGraphExportThis method is used to obtain an instance ofNodeExportcapable of exporting the object of aSceneTree.Leaf. If no such export is defined,nullis returned.This implementation looks for an export defined in the registry: As name, the name of the class of
objectis chosen, the export is searched as a child ofFilterBase.item.- Overrides:
getExportForin classSceneGraphExport- Parameters:
object- object of the original scene graphasNode- is object a node or an edge?- Returns:
- suitable export for the object or
null
-
export
-