Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoSTLInputReader Class Reference

VSG extension Class for importing a scene graph from a STL file. More...

#include <Inventor/io/STL/SoSTLInputReader.h>

+ Inheritance diagram for SoSTLInputReader:

Public Member Functions

 SoSTLInputReader ()
 Constructor.
 
virtual ~SoSTLInputReader ()
 Destructor.
 
virtual bool canConvert (SoInput *)
 Returns true if the specified input source can be converted by this plugin.
 
virtual SoSeparatorconvert (SoInput *)
 Returns the specified input source in the form of an Open Inventor scene graph.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
virtual SoType getTypeId () const =0
 Returns the type identifier for a specific instance.
 
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Detailed Description

VSG extension Class for importing a scene graph from a STL file.

This class imports data from an STL format (.stl) file into an Open Inventor scene graph.

Both ASCII and binary file formats are supported.

It may be efficient to use this class directly to import STL format data when the file format is already known. For convenience, note that the SoDB::readAll() method will automatically use this class if it detects that the specified file is STL format.

Limitations:

  • Import is done in float single precision. Precision may be lost if stl file contains values in double precision.

[C++] The STL module must be initialized (see SoSTLFileFormat) before using this class directly. It is not necessary to explicitly initialize the module when using SoDB::readAll().

SEE ALSO

SoSTLFileFormat, SoSTLWriteAction

Definition at line 40 of file SoSTLInputReader.h.

Constructor & Destructor Documentation

◆ SoSTLInputReader()

SoSTLInputReader::SoSTLInputReader ( )

Constructor.

◆ ~SoSTLInputReader()

virtual SoSTLInputReader::~SoSTLInputReader ( )
virtual

Destructor.

Member Function Documentation

◆ canConvert()

virtual bool SoSTLInputReader::canConvert ( SoInput )
virtual

Returns true if the specified input source can be converted by this plugin.

Note that the input source (SoInput object) may be a file or a buffer (memory). This method should return false if the input source is a buffer and the reader does not support reading from a buffer. SoInput::getCurFile() returns NULL if the input source is a buffer.

Implements SoInputReader.

◆ convert()

virtual SoSeparator * SoSTLInputReader::convert ( SoInput )
virtual

Returns the specified input source in the form of an Open Inventor scene graph.

Note that the input source (SoInput object) may be a file or a buffer (memory). This method should return NULL if the input source is a buffer and the reader does not support reading from a buffer. SoInput::getCurFile() returns NULL if the input source is a buffer.

Implements SoInputReader.


The documentation for this class was generated from the following file: