mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
* Adjustment: Update Assimp version to 5.0.1.
This commit is contained in:
parent
14ebeaf3eb
commit
4758f7bdaf
679 changed files with 50502 additions and 19698 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
Copyright (c) 2006-2019, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFil
|
|||
|
||||
// create node
|
||||
aiNode* node = new aiNode;
|
||||
node->mName.length = (ai_uint32)pNode->mName.length();
|
||||
node->mName.length = pNode->mName.length();
|
||||
node->mParent = pParent;
|
||||
memcpy( node->mName.data, pNode->mName.c_str(), pNode->mName.length());
|
||||
node->mName.data[node->mName.length] = 0;
|
||||
|
|
@ -513,36 +513,30 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
|
|||
} else {
|
||||
// separate key sequences for position, rotation, scaling
|
||||
nbone->mNumPositionKeys = (unsigned int)bone->mPosKeys.size();
|
||||
if (nbone->mNumPositionKeys != 0) {
|
||||
nbone->mPositionKeys = new aiVectorKey[nbone->mNumPositionKeys];
|
||||
for( unsigned int c = 0; c < nbone->mNumPositionKeys; ++c ) {
|
||||
aiVector3D pos = bone->mPosKeys[c].mValue;
|
||||
nbone->mPositionKeys = new aiVectorKey[nbone->mNumPositionKeys];
|
||||
for( unsigned int c = 0; c < nbone->mNumPositionKeys; ++c ) {
|
||||
aiVector3D pos = bone->mPosKeys[c].mValue;
|
||||
|
||||
nbone->mPositionKeys[c].mTime = bone->mPosKeys[c].mTime;
|
||||
nbone->mPositionKeys[c].mValue = pos;
|
||||
}
|
||||
nbone->mPositionKeys[c].mTime = bone->mPosKeys[c].mTime;
|
||||
nbone->mPositionKeys[c].mValue = pos;
|
||||
}
|
||||
|
||||
// rotation
|
||||
nbone->mNumRotationKeys = (unsigned int)bone->mRotKeys.size();
|
||||
if (nbone->mNumRotationKeys != 0) {
|
||||
nbone->mRotationKeys = new aiQuatKey[nbone->mNumRotationKeys];
|
||||
for( unsigned int c = 0; c < nbone->mNumRotationKeys; ++c ) {
|
||||
aiMatrix3x3 rotmat = bone->mRotKeys[c].mValue.GetMatrix();
|
||||
nbone->mRotationKeys = new aiQuatKey[nbone->mNumRotationKeys];
|
||||
for( unsigned int c = 0; c < nbone->mNumRotationKeys; ++c ) {
|
||||
aiMatrix3x3 rotmat = bone->mRotKeys[c].mValue.GetMatrix();
|
||||
|
||||
nbone->mRotationKeys[c].mTime = bone->mRotKeys[c].mTime;
|
||||
nbone->mRotationKeys[c].mValue = aiQuaternion( rotmat);
|
||||
nbone->mRotationKeys[c].mValue.w *= -1.0f; // needs quat inversion
|
||||
}
|
||||
nbone->mRotationKeys[c].mTime = bone->mRotKeys[c].mTime;
|
||||
nbone->mRotationKeys[c].mValue = aiQuaternion( rotmat);
|
||||
nbone->mRotationKeys[c].mValue.w *= -1.0f; // needs quat inversion
|
||||
}
|
||||
|
||||
// scaling
|
||||
nbone->mNumScalingKeys = (unsigned int)bone->mScaleKeys.size();
|
||||
if (nbone->mNumScalingKeys != 0) {
|
||||
nbone->mScalingKeys = new aiVectorKey[nbone->mNumScalingKeys];
|
||||
for( unsigned int c = 0; c < nbone->mNumScalingKeys; c++)
|
||||
nbone->mScalingKeys[c] = bone->mScaleKeys[c];
|
||||
}
|
||||
nbone->mScalingKeys = new aiVectorKey[nbone->mNumScalingKeys];
|
||||
for( unsigned int c = 0; c < nbone->mNumScalingKeys; c++)
|
||||
nbone->mScalingKeys[c] = bone->mScaleKeys[c];
|
||||
|
||||
// longest lasting key sequence determines duration
|
||||
if( bone->mPosKeys.size() > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue