Assimp  v4.1. (December 2018)
Assimp::XFileExporter Class Reference

Helper class to export a given scene to a X-file. More...

Public Member Functions

 XFileExporter (const aiScene *pScene, IOSystem *pIOSystem, const std::string &path, const std::string &file, const ExportProperties *pProperties)
 Constructor for a specific scene to export. More...
 
virtual ~XFileExporter ()
 Destructor. More...
 

Public Attributes

std::stringstream mOutput
 Stringstream to write all output into. More...
 

Protected Member Functions

void PopTag ()
 Leaves an element, decreasing the indentation. More...
 
void PushTag ()
 Enters a new xml element, which increases the indentation. More...
 
std::string toXFileString (aiString &name)
 normalize the name to be accepted by xfile readers More...
 
void WriteFile ()
 Starts writing the contents. More...
 
void WriteFrameTransform (aiMatrix4x4 &m)
 write a frame transform More...
 
void WriteHeader ()
 Writes the asset header. More...
 
void WriteMesh (aiMesh *mesh)
 write a mesh entry of the scene More...
 
void WriteNode (aiNode *pNode)
 Recursively writes the given node. More...
 
void writePath (const aiString &path)
 write a path More...
 

Protected Attributes

std::string endstr
 current line end string for simple stream insertion More...
 
const std::string mFile
 Name of the file (without extension) where the scene will be exported. More...
 
IOSystem * mIOSystem
 The IOSystem for output. More...
 
const std::string mPath
 Path of the directory where the scene will be exported. More...
 
const ExportProperties * mProperties
 hold the properties pointer More...
 
const aiScene * mScene
 The scene to be written. More...
 
bool mSceneOwned
 
std::string startstr
 current line start string, contains the current indentation for simple stream insertion More...
 

Detailed Description

Helper class to export a given scene to a X-file.

Note: an xFile uses a left hand system. Assimp used a right hand system (OpenGL), therefore we have to transform everything

Constructor & Destructor Documentation

◆ XFileExporter()

XFileExporter::XFileExporter ( const aiScene *  pScene,
IOSystem *  pIOSystem,
const std::string &  path,
const std::string &  file,
const ExportProperties *  pProperties 
)

Constructor for a specific scene to export.

◆ ~XFileExporter()

XFileExporter::~XFileExporter ( )
virtual

Destructor.

Member Function Documentation

◆ PopTag()

void Assimp::XFileExporter::PopTag ( )
inlineprotected

Leaves an element, decreasing the indentation.

◆ PushTag()

void Assimp::XFileExporter::PushTag ( )
inlineprotected

Enters a new xml element, which increases the indentation.

◆ toXFileString()

std::string XFileExporter::toXFileString ( aiString &  name)
protected

normalize the name to be accepted by xfile readers

◆ WriteFile()

void XFileExporter::WriteFile ( )
protected

Starts writing the contents.

◆ WriteFrameTransform()

void XFileExporter::WriteFrameTransform ( aiMatrix4x4 &  m)
protected

write a frame transform

◆ WriteHeader()

void XFileExporter::WriteHeader ( )
protected

Writes the asset header.

◆ WriteMesh()

void XFileExporter::WriteMesh ( aiMesh *  mesh)
protected

write a mesh entry of the scene

◆ WriteNode()

void XFileExporter::WriteNode ( aiNode *  pNode)
protected

Recursively writes the given node.

◆ writePath()

void XFileExporter::writePath ( const aiString &  path)
protected

write a path

Member Data Documentation

◆ endstr

std::string Assimp::XFileExporter::endstr
protected

current line end string for simple stream insertion

◆ mFile

const std::string Assimp::XFileExporter::mFile
protected

Name of the file (without extension) where the scene will be exported.

◆ mIOSystem

IOSystem* Assimp::XFileExporter::mIOSystem
protected

The IOSystem for output.

◆ mOutput

std::stringstream Assimp::XFileExporter::mOutput

Stringstream to write all output into.

◆ mPath

const std::string Assimp::XFileExporter::mPath
protected

Path of the directory where the scene will be exported.

◆ mProperties

const ExportProperties* Assimp::XFileExporter::mProperties
protected

hold the properties pointer

◆ mScene

const aiScene* Assimp::XFileExporter::mScene
protected

The scene to be written.

◆ mSceneOwned

bool Assimp::XFileExporter::mSceneOwned
protected

◆ startstr

std::string Assimp::XFileExporter::startstr
protected

current line start string, contains the current indentation for simple stream insertion


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