MeVisLab Toolbox Reference
SoSceneWriter Class Reference

Open Inventor engine to write scene representation to file. More...

#include <SoSceneWriter.h>

Inheritance diagram for SoSceneWriter:

Classes

struct  COLORED_POINT
 struct holds point information when VRML_2 output is applied on SGI Inventor scenes More...
 
struct  hashColoredPoint
 For computing a hash value for a colored point. More...
 

Public Types

enum  Format {
  INVENTOR_ASCII = 0 , INVENTOR_BINARY , STL_ASCII , STL_BINARY ,
  VRML_97
}
 Save formats. More...
 
enum  SoPrimitive { LINE = 2 , TRIANGLE = 3 }
 

Public Member Functions

 SoSceneWriter ()
 
void saveChanged ()
 save the scene More...
 
void inputChanged (SoField *) override
 Engine dummy implementation. More...
 
void evaluate () override
 Engine dummy implementation. More...
 

Static Public Member Functions

static void initClass ()
 initializes this class More...
 
static void saveChangedCB (void *data, SoSensor *a)
 forward sensor CB to saveChanged() More...
 

Public Attributes

SoSFNode sceneGraph
 Fields. More...
 
SoSFTrigger save
 save the scene More...
 
SoSFString filename
 absolute filename of the output file More...
 
SoSFEnum format
 format that should be written More...
 
SoSFBool bColorPerVertex
 Format Options for self-coded VRML 2.0. More...
 
SoSFBool bUseGlobalColor
 save only one color per object More...
 
SoSFBool bNormalPerVertex
 save normal per vertex (or only one per facet) More...
 
SoSFBool bSaveNormals
 save or suppress saving of normals More...
 

Protected Member Functions

 ~SoSceneWriter () override
 
void formatFileExtension ()
 set filename field's extension according to format More...
 
void writeSimpleVRML2 ()
 write simple VRML 2 format (oko) More...
 
static void getTriIn (void *pData, SoCallbackAction *pAct, const SoPrimitiveVertex *pV1, const SoPrimitiveVertex *pV2, const SoPrimitiveVertex *pV3)
 callback function for extracting triangulation from the scene More...
 
void writeVecToStlFile (SoMFVec3f *pMVec3f)
 STL File format (Stefan Zidowitz) More...
 
SbVec3f const getNormal (const SbVec3f *pVec, const int nIdx)
 compute the normal of the given triangle More...
 

Detailed Description

Open Inventor engine to write scene representation to file.

Suppress warning suppressions in Visual C++ and include all non ML includes here Warning disabled: 'warning C4018': 'expression' : signed/unsigned mismatch Open Inventor engine to write scene representation to file

The STL file format was implemented by Stephan Zidowitz. The Inventor formats use the Open Inventor SoWriteSction to write the scene. The VRML formats are only supported when compiled with TGS Open Inventor

Definition at line 53 of file SoSceneWriter.h.

Member Enumeration Documentation

◆ Format

Save formats.

Enumerator
INVENTOR_ASCII 
INVENTOR_BINARY 
STL_ASCII 
STL_BINARY 
VRML_97 

Definition at line 70 of file SoSceneWriter.h.

◆ SoPrimitive

Enumerator
LINE 
TRIANGLE 

Definition at line 78 of file SoSceneWriter.h.

Constructor & Destructor Documentation

◆ SoSceneWriter()

SoSceneWriter::SoSceneWriter ( )

◆ ~SoSceneWriter()

SoSceneWriter::~SoSceneWriter ( )
overrideprotected

Member Function Documentation

◆ evaluate()

void SoSceneWriter::evaluate ( )
inlineoverride

Engine dummy implementation.

Definition at line 165 of file SoSceneWriter.h.

◆ formatFileExtension()

void SoSceneWriter::formatFileExtension ( )
protected

set filename field's extension according to format

◆ getNormal()

SbVec3f const SoSceneWriter::getNormal ( const SbVec3f *  pVec,
const int  nIdx 
)
protected

compute the normal of the given triangle

◆ getTriIn()

static void SoSceneWriter::getTriIn ( void *  pData,
SoCallbackAction *  pAct,
const SoPrimitiveVertex *  pV1,
const SoPrimitiveVertex *  pV2,
const SoPrimitiveVertex *  pV3 
)
static

callback function for extracting triangulation from the scene

◆ initClass()

static void SoSceneWriter::initClass ( )
static

initializes this class

◆ inputChanged()

void SoSceneWriter::inputChanged ( SoField *  )
inlineoverride

Engine dummy implementation.

Definition at line 163 of file SoSceneWriter.h.

◆ saveChanged()

void SoSceneWriter::saveChanged ( )

save the scene

◆ saveChangedCB()

static void SoSceneWriter::saveChangedCB ( void *  data,
SoSensor *  a 
)
static

forward sensor CB to saveChanged()

◆ writeSimpleVRML2()

void SoSceneWriter::writeSimpleVRML2 ( )
protected

write simple VRML 2 format (oko)

◆ writeVecToStlFile()

void SoSceneWriter::writeVecToStlFile ( SoMFVec3f *  pMVec3f)
protected

STL File format (Stefan Zidowitz)

create .stl-file and write formated triangle data from List pMVec3f

Member Data Documentation

◆ bColorPerVertex

SoSFBool SoSceneWriter::bColorPerVertex

Format Options for self-coded VRML 2.0.

save color per vertex (or only one per facet)

Definition at line 140 of file SoSceneWriter.h.

◆ bNormalPerVertex

SoSFBool SoSceneWriter::bNormalPerVertex

save normal per vertex (or only one per facet)

Definition at line 146 of file SoSceneWriter.h.

◆ bSaveNormals

SoSFBool SoSceneWriter::bSaveNormals

save or suppress saving of normals

Definition at line 149 of file SoSceneWriter.h.

◆ bUseGlobalColor

SoSFBool SoSceneWriter::bUseGlobalColor

save only one color per object

Definition at line 143 of file SoSceneWriter.h.

◆ filename

SoSFString SoSceneWriter::filename

absolute filename of the output file

Definition at line 132 of file SoSceneWriter.h.

◆ format

SoSFEnum SoSceneWriter::format

format that should be written

Definition at line 134 of file SoSceneWriter.h.

◆ save

SoSFTrigger SoSceneWriter::save

save the scene

Definition at line 130 of file SoSceneWriter.h.

◆ sceneGraph

SoSFNode SoSceneWriter::sceneGraph

Fields.

input scene graph

Definition at line 128 of file SoSceneWriter.h.


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