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.SoWriteActiontraverses the scene graph and uses an instance ofSoOutputto write each node.SoOutputmethods can be called to specify what file or memory buffer to write to.SoOutputsupports both ASCII (default) and binary formats and provides some convenience functions for opening and closing files. SeeSbFileHelperfor more convenience functions. Since Open Inventor 8.1,SoOutputcan 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
SoOutputis 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 anSoOutputto use for output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidenableElement(java.lang.Class<? extends Inventor> t, int stkIndex)SoOutputgetOutput()Returns reference toSoOutputinstance 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
-
-