Class SoWriteAction
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.actions.SoAction
-
- com.openinventor.inventor.actions.SoWriteAction
-
public class SoWriteAction extends SoAction
Writes a scene graph to a file. This class is used for writing scene graphs in Open Inventor (.iv) format.SoWriteAction
traverses the scene graph and uses an instance ofSoOutput
to write each node.SoOutput
methods can be called to specify what file or memory buffer to write to.SoOutput
supports both ASCII (default) and binary formats and provides some convenience functions for opening and closing files. SeeSbFileHelper
for more convenience functions. Since Open Inventor 8.1,SoOutput
can write compressed data in the lossless Zlib (gzip) format. Both ASCII and binary format files may be compressed.STL
Open Inventor can also export geometry to an STL (.stl) format file. SeeSoSTLWriteAction
.EXAMPLE An instance of
SoOutput
is automatically created bySoWriteAction
. This is typically the only instance needed. For example:SoWriteAction action = new SoWriteAction(); SoOutput output = action.getOutput(); output.openFile( "output.iv" ); output.setBinary( true ); // Optional: write binary format action.apply( root ); output.closeFile(); - See Also:
SoOutput
,SoSTLWriteAction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoWriteAction()
Constructor.SoWriteAction(SoOutput out)
Constructor that takes anSoOutput
to use for output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
SoOutput
getOutput()
Returns reference toSoOutput
instance in action.-
Methods inherited from class com.openinventor.inventor.actions.SoAction
apply, apply, clearApplyResult, forwardTraversal, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-