SoSTLFileKit - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 4.0.0
Note : Coin
NAMESoSTLFileKit − SoSTLFileKit is a class for using STL files with Coin.
SYNOPSIS
#include <ForeignFiles/SoSTLFileKit.h> Inherits SoForeignFileKit.
Public Typesenum Colorization { GREY, MATERIALISE, TNO_VISICAM }
Public Member Functionsvirtual SoType getTypeId (void) const
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. virtual const SoNodekitCatalog * getNodekitCatalog (void) const
SoSTLFileKit (void)
virtual SbBool canReadFile (const char *filename=NULL) const
virtual SbBool readFile (const char *filename)
virtual SbBool canWriteFile (const char *filename=NULL) const
virtual SbBool writeFile (const char *filename)
SbBool canReadScene (void) const
SbBool readScene (SoNode *scene)
virtual SoSeparator * convert ()
Static Public Member Functionsstatic SoType getClassTypeId (void)
static const SoNodekitCatalog * getClassNodekitCatalog (void)
static void initClass (void)
static SbBool identify (const char *filename)
Public AttributesSoSFString info
SoSFBool binary
SoSFEnum colorization
Protected Member Functionsvirtual const SoFieldData * getFieldData (void) const
virtual ~SoSTLFileKit (void)
void reset (void)
SbBool addFacet (const SbVec3f &v1, const SbVec3f &v2, const SbVec3f &v3, const SbVec3f &normal)
void organizeModel (void)
Static Protected Member Functionsstatic const SoFieldData ** getFieldDataPtr (void)
static const SoNodekitCatalog ** getClassNodekitCatalogPtr (void)
Protected AttributesSoSFNode shapehints
SoSFNode texture
SoSFNode normalbinding
SoSFNode normals
SoSFNode materialbinding
SoSFNode material
SoSFNode coordinates
SoSFNode facets
Additional Inherited Members
Detailed DescriptionSoSTLFileKit is a class for using STL files with Coin. Class for using STL files with Coin. You can use it to read and write STL files, and convert back and forth between Open Inventor scene graphs and SoSTLFileKits. STL files are 3D models intended for 3D printers, and is a format supported by a wide variety of computer-aided design programs. STL models are, because of their intended purpose, always representations of solid objects. STL is short for Stereolithography, the process used for 3D printing. Ordinary STL models do not contain color information. There are, however, two extensions to the binary file format for specifying color. Currently neither extension is supported. This is caused by lack of sample models using the extensions and will be added as soon as such models are found. We have the specs on the extensions, and it should be pretty straight-forwards to implement, but we want to get it right at once since we have write support (we don't want to inadvertently create a third color extension ;). When writing STL files, certain STL model criterias are not enforced by SoSTLFileKit. These are: • STL models should represent complete solids - it is the user's responsibility to give models of solid data to readScene(), and not readScene()'s responsibility to check the incoming data. • STL models should have all triangles in counterclockwise order. This is not enforced either. • STL models should reside in the positive octant of the coordinate space. This is also the user's responsibility to ensure, although adding functionality for translating the model should be easy, so it might get implemented. Since the color extensions are not supported yet, color information is not collected either when converting Open Inventor scene graphs to SoSTLFileKits. Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Since Coin 3.0
Constructor & Destructor Documentation
SoSTLFileKit::SoSTLFileKit (void)Constructor.
SoSTLFileKit::~SoSTLFileKit (void) [protected], [virtual]Destructor.
Member Function Documentation
SoType SoSTLFileKit::getTypeId (void) const [virtual]Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. Usage example: void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
}For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups. Reimplemented from SoForeignFileKit.
const SoFieldData * SoSTLFileKit::getFieldData (void) const [protected], [virtual]Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. Reimplemented from SoForeignFileKit.
const SoNodekitCatalog * SoSTLFileKit::getNodekitCatalog (void) const [virtual]Returns the nodekit catalog which defines the layout of this class' kit. Reimplemented from SoForeignFileKit.
void SoSTLFileKit::initClass (void) [static]Initializes class and registers file identification functions.
SbBool SoSTLFileKit::identify (const char * filename) [static]Returns wether or not filename is identified as an STL file.
SbBool SoSTLFileKit::canReadFile (const char * filename = NULL) const [virtual]Checks if this concrete class can read the given file. Reimplemented from SoForeignFileKit.
SbBool SoSTLFileKit::readFile (const char * filename) [virtual]Reads in an STL file. Both ascii and binary files are supported. For binary files, the color extensions are not implemented yet. Returns FALSE if filename could not be opened or parsed correctly. See also canReadFile Reimplemented from SoForeignFileKit.
SbBool SoSTLFileKit::canWriteFile (const char * filename = NULL) const [virtual]Checks if this concrete class can write to the given file. Reimplemented from SoForeignFileKit.
SbBool SoSTLFileKit::writeFile (const char * filename) [virtual]Writes the STL model to an STL file. See also binary, info, canWriteFile, canReadScene Reimplemented from SoForeignFileKit.
SbBool SoSTLFileKit::readScene (SoNode * scene)Converts a scene graph into an SoSTLFileKit. Useful for creating STL files. See also canReadScene, canWriteFile, writeFile
SoSeparator * SoSTLFileKit::convert () [virtual]Converts (if necessary) the internal representation of the foreign file to a pure Coin scenegraph. Returns the root node with a refcount of 0. Implements SoForeignFileKit.
void SoSTLFileKit::reset (void) [protected]Resets the STL model so it contains nothing.
SbBool SoSTLFileKit::addFacet (const SbVec3f & v1, const SbVec3f & v2, const SbVec3f & v3, const SbVec3f & n) [protected]Adds one triangle to the STL model. See also reset, organizeModel
void SoSTLFileKit::organizeModel (void) [protected]Should be called after the STL model is completely set up in the SoSTLFileKit through import from a file or from a scene graph. The model will then be optimized for fast rendering. See also addFacet, reset
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 39,681 byte
man-SoSTLFileKit.3coin4Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 187,815
Visitor ID : :
Visitor IP : 3.144.41.252 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.