Class SoSTLWriteAction


  • public class SoSTLWriteAction
    extends SoCallbackAction
    Class for exporting a scene graph to an STL file. This class exports an Open Inventor scenegraph into an STL format (.stl) file.

    ASCII and binary file formats are supported (see setBinaryOutput() method).

    Limitations:

    • The STL format does not support color or texture information
      (and this class does not support any of the non-standard extensions for specifying color).
    • The application is responsible for checking if the specified file can be created (see SbFileHelper).

    See Also:
    SbFileHelper, SoSTLFileFormat, SoSTLInputReader
    • Constructor Detail

      • SoSTLWriteAction

        public SoSTLWriteAction()
        Constructor.
    • Method Detail

      • isBinaryOutput

        public boolean isBinaryOutput()
        Returns current state of binary flag.
      • setBinaryOutput

        public void setBinaryOutput​(boolean flag)
        Sets whether output should be ASCII (default) or binary.
      • setOutputFileName

        public void setOutputFileName​(java.lang.String filename)
        Set the output filename to write to.

        Parameters:
        filename - the output filename to write to.
      • enableElement

        public static void enableElement​(java.lang.Class<? extends Inventor> t,
                                         int stkIndex)