SoWriteAction Class |
Writes a scene graph to a file.
Namespace: OIV.Inventor.Actions
The SoWriteAction type exposes the following members.
Name | Description | |
---|---|---|
SoWriteAction | Constructor. | |
SoWriteAction(SoOutput) | Constructor that takes an OIV.Inventor.SoOutput to use for output. |
Name | Description | |
---|---|---|
Apply(SoNode) | Initiates an action on the graph defined by a node. | |
Apply(SoPath) | Initiates an action on the graph defined by a path. | |
Apply(SoPathList) | Calls Apply(pathList, false). (Inherited from SoAction.) | |
Apply(SoPathList, Boolean) | Initiates an action on the graph defined by a list of paths. | |
ClearApplyResult | When applied, an action may reference nodes or create objects (e.g. | |
EnableElement | ||
EnableElements | Obsolete.
Returns the list of enabled elements for a given action subclass.
(Inherited from SoAction.) | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
ForwardTraversal(SoNode) | Traverse a node that is not part of the current scenegraph. | |
ForwardTraversal(SoPath) | Traverse a path that is not part of the current scenegraph. | |
GetContinueActionInBranchFlag | This function indicates if the action must stop in the current branch. | |
GetCurPath | Returns the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed. | |
GetDistribMode | Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only). | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetNodeAppliedTo | Returns the node the action is being applied to. | |
GetOriginalPathListAppliedTo | Returns the original path list the action is being applied to. | |
GetOutput | Returns reference to OIV.Inventor.SoOutput instance in action. | |
GetPathAppliedTo | Returns the path the action is being applied to. | |
GetPathCode | Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to. | |
GetPathListAppliedTo | Returns the path list the action is being applied to. | |
GetPipeId | Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
GetSceneManager | Return the OIV.Inventor.SoSceneManager associated with this action. | |
GetState | Gets the state from the action. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWhatAppliedTo | Returns code indicating what action is being applied to. | |
HasTerminated | Returns true if the traversal has reached a termination condition. | |
InvalidateState | Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied. | |
IsBeingApplied | Returns true if this action is currently being applied. | |
IsLastPathListAppliedTo | Returns true if the current list is the last one from the original. | |
IsUsingAlternateRep | Returns true if current action is using alternate representations. | |
PostDelayedTraversal | Method called by SoMultiPassManager after delayed pass traversals. | |
PreDelayedTraversal | Method called by SoMultiPassManager before delayed pass traversals. | |
ResetContinueActionInBranchFlag | This function resets the continue action flag. | |
SetPipeId | Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
SetSceneManager | Set the scene manager associated with this action (if any ). | |
SetUpState | Creates state if it is NULL or it is no longer valid because new elements have been enabled since it was created. | |
StopActionInBranch | This function stops the action in the current Scene Graph branch. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Traverse | Does traversal of a graph rooted by a node. | |
UseAlternateRep | Tell the action to use alternate representations during traversal when available. |
This class is used for writing scene graphs in Open Inventor (.iv) format. OIV.Inventor.Actions.SoWriteAction traverses the scene graph and uses an instance of OIV.Inventor.SoOutput to write each node. OIV.Inventor.SoOutput methods can be called to specify what file or memory buffer to write to. OIV.Inventor.SoOutput supports both ASCII (default) and binary formats and provides some convenience functions for opening and closing files. See OIV.Inventor.Helpers.SbFileHelper for more convenience functions. Since Open Inventor 8.1, OIV.Inventor.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 OIV.Inventor.IO.STL.SoSTLWriteAction.
An instance of OIV.Inventor.SoOutput is automatically created by OIV.Inventor.Actions.SoWriteAction. This is typically the only instance needed. For example:
SoWriteAction writeAction = new SoWriteAction(); writeAction.GetOutput().OpenFile( "output.iv" ); writeAction.GetOutput().SetBinary( true ); // Optional: write binary format writeAction.Apply( root ); writeAction.GetOutput().CloseFile();