OgreImporter: Implement binary skeleton serialization. Fix bone/animation matrix stuff to be simpler (aka read as Quats to internal structures). Cleanup code for pull request.

This commit is contained in:
Jonne Nauha
2014-05-21 04:00:11 +03:00
parent cf9b705829
commit 1129ae5a6e
7 changed files with 789 additions and 313 deletions

View File

@@ -44,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
#include "OgreStructs.h"
#include "OgreParsingUtils.h"
#include "irrXMLWrapper.h"
namespace Assimp
@@ -54,6 +52,7 @@ namespace Ogre
{
typedef irr::io::IrrXMLReader XmlReader;
typedef boost::shared_ptr<XmlReader> XmlReaderPtr;
class OgreXmlSerializer
{
@@ -62,16 +61,19 @@ public:
/** @note Fatal unrecoverable errors will throw a DeadlyImportError. */
static MeshXml *ImportMesh(XmlReader *reader);
/// Imports skeleton to @c mesh into MeshXML::skeleton.
/// Imports skeleton to @c mesh.
/** If mesh does not have a skeleton reference or the skeleton file
cannot be found it is not a fatal DeadlyImportError. */
static void ImportSkeleton(Assimp::IOSystem *pIOHandler, MeshXml *mesh);
static void ImportSkeleton(Assimp::IOSystem *pIOHandler, Mesh *mesh);
private:
OgreXmlSerializer(XmlReader *reader) :
m_reader(reader)
{
}
static XmlReaderPtr OpenReader(Assimp::IOSystem *pIOHandler, const std::string &filename);
// Mesh
void ReadMesh(MeshXml *mesh);