Assimp
v3.1.1 (June 2014)
|
Helper class to export a given scene to a Collada file. More...
Classes | |
struct | Material |
struct | Property |
struct | Surface |
Public Member Functions | |
ColladaExporter (const aiScene *pScene, IOSystem *pIOSystem, const std::string &path, const std::string &file) | |
Constructor for a specific scene to export. More... | |
virtual | ~ColladaExporter () |
Destructor. More... | |
Public Attributes | |
std::stringstream | mOutput |
Stringstream to write all output into. More... | |
Protected Types | |
enum | FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color } |
Protected Member Functions | |
std::string | GetMeshId (size_t pIndex) const |
Creates a mesh ID for the given mesh. More... | |
void | PopTag () |
Leaves an element, decreasing the indentation. More... | |
void | PushTag () |
Enters a new xml element, which increases the indentation. More... | |
void | ReadMaterialSurface (Surface &poSurface, const aiMaterial *pSrcMat, aiTextureType pTexture, const char *pKey, size_t pType, size_t pIndex) |
Dammit C++ - y u no compile two-pass? No I have to add all methods below the struct definitions Reads a single surface entry from the given material keys. More... | |
void | WriteAmbienttLight (const aiLight *const light) |
void | WriteCamera (size_t pIndex) |
void | WriteCamerasLibrary () |
Writes the cameras library. More... | |
void | WriteDirectionalLight (const aiLight *const light) |
void | WriteFile () |
Starts writing the contents. More... | |
void | WriteFloatArray (const std::string &pIdString, FloatDataType pType, const float *pData, size_t pElementCount) |
Writes a float array of the given type. More... | |
void | WriteFloatEntry (const Property &pProperty, const std::string &pTypeName) |
Writes a scalar property. More... | |
void | WriteGeometry (size_t pIndex) |
Writes the given mesh. More... | |
void | WriteGeometryLibrary () |
Writes the geometry library. More... | |
void | WriteHeader () |
Writes the asset header. More... | |
void | WriteImageEntry (const Surface &pSurface, const std::string &pNameAdd) |
Writes an image entry for the given surface. More... | |
void | WriteLight (size_t pIndex) |
void | WriteLightsLibrary () |
Writes the cameras library. More... | |
void | WriteMaterials () |
Writes the material setup. More... | |
void | WriteNode (const aiScene *scene, aiNode *pNode) |
Recursively writes the given node. More... | |
void | WritePointLight (const aiLight *const light) |
void | WriteSceneLibrary () |
Writes the scene library. More... | |
void | WriteSpotLight (const aiLight *const light) |
void | WriteTextureColorEntry (const Surface &pSurface, const std::string &pTypeName, const std::string &pImageName) |
Writes a color-or-texture entry into an effect definition. More... | |
void | WriteTextureParamEntry (const Surface &pSurface, const std::string &pTypeName, const std::string &pMatName) |
Writes the two parameters necessary for referencing a texture in an effect entry. More... | |
void | WriteTextures () |
Writes the embedded textures. More... | |
Protected Attributes | |
std::string | endstr |
current line end string for simple stream insertion More... | |
std::vector< Material > | materials |
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 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... | |
std::map< unsigned int, std::string > | textures |
Helper class to export a given scene to a Collada file.
Just for my personal comfort when implementing it.
|
protected |
ColladaExporter::ColladaExporter | ( | const aiScene * | pScene, |
IOSystem * | pIOSystem, | ||
const std::string & | path, | ||
const std::string & | file | ||
) |
Constructor for a specific scene to export.
|
virtual |
Destructor.
|
inlineprotected |
Creates a mesh ID for the given mesh.
|
inlineprotected |
Leaves an element, decreasing the indentation.
|
inlineprotected |
Enters a new xml element, which increases the indentation.
|
protected |
Dammit C++ - y u no compile two-pass? No I have to add all methods below the struct definitions Reads a single surface entry from the given material keys.
|
protected |
|
protected |
|
protected |
Writes the cameras library.
|
protected |
|
protected |
Starts writing the contents.
|
protected |
Writes a float array of the given type.
|
protected |
Writes a scalar property.
|
protected |
Writes the given mesh.
|
protected |
Writes the geometry library.
|
protected |
Writes the asset header.
|
protected |
Writes an image entry for the given surface.
|
protected |
|
protected |
Writes the cameras library.
|
protected |
Writes the material setup.
collect all materials from the scene
Recursively writes the given node.
|
protected |
|
protected |
Writes the scene library.
|
protected |
|
protected |
Writes a color-or-texture entry into an effect definition.
|
protected |
Writes the two parameters necessary for referencing a texture in an effect entry.
|
protected |
Writes the embedded textures.
|
protected |
current line end string for simple stream insertion
|
protected |
|
protected |
Name of the file (without extension) where the scene will be exported.
std::stringstream Assimp::ColladaExporter::mOutput |
Stringstream to write all output into.
|
protected |
Path of the directory where the scene will be exported.
|
protected |
The scene to be written.
|
protected |
|
protected |
current line start string, contains the current indentation for simple stream insertion
|
protected |