2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +00:00

More RigInverter work

This commit is contained in:
Jack Andersen
2016-04-07 17:37:14 -10:00
parent 9ee8840b54
commit 1b1a94c649
9 changed files with 150 additions and 87 deletions

View File

@@ -2,7 +2,9 @@
#define __COMMON_RIGINVERTER_HPP__
#include "zeus/CVector3f.hpp"
#include "zeus/CMatrix3f.hpp"
#include "zeus/CQuaternion.hpp"
#include "BlenderConnection.hpp"
namespace DataSpec
{
@@ -18,7 +20,8 @@ public:
struct Bone
{
const typename CINFType::Bone& m_origBone;
zeus::CQuaternion m_inverter;
zeus::CMatrix3f m_inverter;
zeus::CMatrix3f m_restorer;
zeus::CVector3f m_tail;
zeus::CVector3f m_parentDelta;
Bone(const CINFType& cinf, const typename CINFType::Bone& origBone);
@@ -28,6 +31,9 @@ private:
std::vector<Bone> m_bones;
public:
RigInverter(const CINFType& cinf);
RigInverter(const CINFType& cinf,
const std::unordered_map<std::string,
hecl::BlenderConnection::DataStream::Matrix3f>& matrices);
const CINFType& getCINF() const {return m_cinf;}
const std::vector<Bone>& getBones() const {return m_bones;}
zeus::CQuaternion transformRotation(atUint32 boneId, const zeus::CQuaternion& origRot) const;