|
Assimp
v4.1. (December 2018)
|
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... | |
| 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 | WriteFloatEntry (const Property &pProperty, const std::string &pTypeName) |
| Writes a scalar property. More... | |
| void | WriteImageEntry (const Surface &pSurface, const std::string &pNameAdd) |
| Writes an image entry for the given surface. More... | |
| 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... | |
| virtual | ~ColladaExporter () |
| Destructor. More... | |
Public 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... | |
| std::stringstream | mOutput |
| Stringstream to write all output into. 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 |
Protected Types | |
| enum | FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color, FloatType_Mat4x4, FloatType_Weight, FloatType_Time } |
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 | WriteAmbienttLight (const aiLight *const light) |
| void | WriteAnimationLibrary (size_t pIndex) |
| void | WriteAnimationsLibrary () |
| void | WriteCamera (size_t pIndex) |
| void | WriteCamerasLibrary () |
| Writes the cameras library. More... | |
| void | WriteController (size_t pIndex) |
| Writes a skin controller of the given mesh. More... | |
| void | WriteControllerLibrary () |
| Writes the controller library. More... | |
| void | WriteDirectionalLight (const aiLight *const light) |
| void | WriteFile () |
| Starts writing the contents. More... | |
| void | WriteFloatArray (const std::string &pIdString, FloatDataType pType, const ai_real *pData, size_t pElementCount) |
| Writes a float array of the given type. 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 | 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 | WriteTextures () |
| Writes the embedded textures. More... | |
Protected Attributes | |
| std::string | mFoundSkeletonRootNodeID = "skeleton_root" |
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.
| void ColladaExporter::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.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Writes the cameras library.
|
protected |
Writes a skin controller of the given mesh.
|
protected |
Writes the controller library.
|
protected |
|
protected |
Starts writing the contents.
|
protected |
Writes a float array of the given type.
| void ColladaExporter::WriteFloatEntry | ( | const Property & | pProperty, |
| const std::string & | pTypeName | ||
| ) |
Writes a scalar property.
|
protected |
Writes the given mesh.
|
protected |
Writes the geometry library.
|
protected |
Writes the asset header.
| void ColladaExporter::WriteImageEntry | ( | const Surface & | pSurface, |
| const std::string & | pNameAdd | ||
| ) |
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 |
| void ColladaExporter::WriteTextureColorEntry | ( | const Surface & | pSurface, |
| const std::string & | pTypeName, | ||
| const std::string & | pImageName | ||
| ) |
Writes a color-or-texture entry into an effect definition.
| void ColladaExporter::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.
|
protected |
Writes the embedded textures.
| std::string Assimp::ColladaExporter::endstr |
current line end string for simple stream insertion
| std::vector<Material> Assimp::ColladaExporter::materials |
| const std::string Assimp::ColladaExporter::mFile |
Name of the file (without extension) where the scene will be exported.
|
protected |
| std::stringstream Assimp::ColladaExporter::mOutput |
Stringstream to write all output into.
| const std::string Assimp::ColladaExporter::mPath |
Path of the directory where the scene will be exported.
| const aiScene* Assimp::ColladaExporter::mScene |
The scene to be written.
| bool Assimp::ColladaExporter::mSceneOwned |
| std::string Assimp::ColladaExporter::startstr |
current line start string, contains the current indentation for simple stream insertion
| std::map<unsigned int, std::string> Assimp::ColladaExporter::textures |