public class SoWriteAction extends SoAction
SoWriteAction
traverses the scene graph and uses an instance of SoOutput
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. See SbFileHelper
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. See SoSTLWriteAction
.
An instance of SoOutput
is automatically created by SoWriteAction
. 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:
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoWriteAction()
Constructor.
|
SoWriteAction(SoOutput out)
Constructor that takes an
SoOutput to use for output. |
Modifier and Type | Method and Description |
---|---|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
SoOutput |
getOutput()
Returns reference to
SoOutput instance in action. |
apply, apply, clearApplyResult, 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
dispose, getNativeResourceHandle
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com