![]() |
http://www.sim.no/ http://www.coin3d.org/ |
SoSTLFileKit is a class for using STL files with Coin. More...
#include <ForeignFiles/SoSTLFileKit.h>
Public Types | |
enum | Colorization { GREY , MATERIALISE , TNO_VISICAM } |
![]() | |
enum | NodeType { INVENTOR = 0x0000 , VRML1 = 0x0001 , VRML2 = 0x0002 , INVENTOR_1 = 0x0004 , INVENTOR_2_0 = 0x0008 , INVENTOR_2_1 = 0x0010 , INVENTOR_2_5 = 0x0020 , INVENTOR_2_6 = 0x0040 , COIN_1_0 = 0x0080 , COIN_2_0 = 0x0100 , EXTENSION = 0x0200 , COIN_2_2 = 0x0400 , COIN_2_3 = 0x0800 , COIN_2_4 = 0x1000 , INVENTOR_5_0 = 0x2000 , COIN_2_5 = 0x4000 , COIN_3_0 = 0x8000 , INVENTOR_6_0 = 0x10000 } |
Public Attributes | |
SoSFString | info |
SoSFBool | binary |
SoSFEnum | colorization |
![]() | |
SoSFString | filename |
Static Protected Member Functions | |
static const SoFieldData ** | getFieldDataPtr (void) |
static const SoNodekitCatalog ** | getClassNodekitCatalogPtr (void) |
![]() | |
static const SoFieldData ** | getFieldDataPtr (void) |
static const SoNodekitCatalog ** | getClassNodekitCatalogPtr (void) |
static void | initClasses (void) |
static SbBool | registerFileExtension (SoType handler, SbName extension, SoForeignFileIdentifyFunc *identify) |
![]() | |
static const SoFieldData ** | getFieldDataPtr (void) |
static const SoNodekitCatalog ** | getClassNodekitCatalogPtr (void) |
![]() | |
static const SoFieldData ** | getFieldDataPtr (void) |
static void | setNextActionMethodIndex (int index) |
static int | getNextActionMethodIndex (void) |
static void | incNextActionMethodIndex (void) |
static void | setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) |
![]() | |
static uint32_t | getCurrentWriteCounter (void) |
static void | staticDataLock (void) |
static void | staticDataUnlock (void) |
Protected Attributes | |
SoSFNode | shapehints |
SoSFNode | texture |
SoSFNode | normalbinding |
SoSFNode | normals |
SoSFNode | materialbinding |
SoSFNode | material |
SoSFNode | coordinates |
SoSFNode | facets |
![]() | |
SoSFNode | topSeparator |
![]() | |
SoSFNode | callbackList |
SoChildList * | children |
SbBool | connectionsSetUp |
![]() | |
uint32_t | uniqueId |
![]() | |
SbBool | isBuiltIn |
Additional Inherited Members | |
![]() | |
enum | BaseFlags { IS_ENGINE = 0x01 , IS_GROUP = 0x02 } |
![]() | |
static uint32_t | nextUniqueId = 1 |
static int | nextActionMethodIndex = 0 |
SoSTLFileKit 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:
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.
SoSTLFileKit::SoSTLFileKit | ( | void | ) |
Constructor.
|
protectedvirtual |
Destructor.
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:
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.
|
protectedvirtual |
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL
.
Reimplemented from SoForeignFileKit.
|
virtual |
Returns the nodekit catalog which defines the layout of this class' kit.
Reimplemented from SoForeignFileKit.
Initializes class and registers file identification functions.
|
static |
Returns wether or not filename is identified as an STL file.
Reimplemented from SoForeignFileKit.
|
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.
Reimplemented from SoForeignFileKit.
|
virtual |
Reimplemented from SoForeignFileKit.
|
virtual |
Converts a scene graph into an SoSTLFileKit. Useful for creating STL files.
Reimplemented from SoForeignFileKit.
Reimplemented from SoForeignFileKit.
|
virtual |
Writes the STL model to an STL file.
Reimplemented from SoForeignFileKit.
Reimplemented from SoForeignFileKit.
Converts the STL model into a native scene graph.
Reimplemented from SoForeignFileKit.
|
protected |
Adds one triangle to the STL model.
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.
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated for Coin by Doxygen 1.10.0.