#ifndef _BBCCOLLADAMESHSERIALIZER_H #define _BBCCOLLADAMESHSERIALIZER_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace BBC { class _BBCExport ColladaMeshSerializer { public: ColladaMeshSerializer(); virtual ~ColladaMeshSerializer(); void setEntity(EntityPtr entity); EntityPtr getEntity(); void exportMesh(const Ogre::String& fileName, bool mergeSubMeshes, bool tangents); void save(Ogre::String filename); protected: EntityPtr mEntity; FCDocument* mFCDocument; FCDGeometry* mFCDGeometry; FCDGeometryMesh* mFCDGeometryMesh; FCDGeometrySource* mFCDGeometryColorSource; FCDGeometrySource* mFCDGeometryTexCoordSource; FCDGeometrySource* mFCDGeometryVertexSource; FCDGeometrySource* mFCDGeometryNormalsSource; FCDGeometryPolygons* mFCDGeometryPolygons; FCDGeometryPolygonsInput* mFCDGeometryPolygonsInput; FCDVisualSceneNodeLibrary* mFCDVisualSceneNodeLibrary; FCDSceneNode* mSceneNode; FCDGeometryInstance* mFCDGeometryInstance; FCDEntityInstanceList mFCDEntityInstanceList; FCDMaterialInstance* mFCDMaterialInstance; FCDMaterialInstanceList mFCDMaterialInstanceList; FCDMaterial* mFCDMaterial; FCDEffect* mFCDEffect; FloatList mFloatPositionList; FloatList mFloatNormalList; UInt32List mIntPositionIDFaceList; FloatList mFloatColorList; FloatList mFloatTexCoordList[OGRE_MAX_TEXTURE_COORD_SETS]; unsigned int iCount; unsigned int iSubEntityFirstIDFace; unsigned int iSubEntityNextFirstIDFace; unsigned int iSubEntityLastIDFace; void buildMesh(MeshPtr pMesh, bool mergeSubmeshes); void exportSubMeshes(MeshPtr pMesh); void exportSubMesh(MeshPtr pMesh, unsigned int iSubMesh); }; } #endif