- fixed stupid little bug in the SceneAnimator - does not crash anymore on animations with empty tracks
- reverted matrix operations to what I think is the correct matrix sequence. Skinned meshes still not working, though - fixed a strange runtime exception in the irrlicht mesh loader git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@211 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
a7088d6263
commit
6b02833561
|
@ -663,7 +663,7 @@ private:
|
||||||
// MSVC debugger complains here about loss of data ...
|
// MSVC debugger complains here about loss of data ...
|
||||||
// todo ... I temporarily disabled the check in the build config
|
// todo ... I temporarily disabled the check in the build config
|
||||||
for (int i=0; i<sizeWithoutHeader; ++i)
|
for (int i=0; i<sizeWithoutHeader; ++i)
|
||||||
TextData[i] = (char_type)source[i];
|
TextData[i] = char_type( source[i] & ((1u << (sizeof( char_type)*8)) - 1));
|
||||||
|
|
||||||
TextBegin = TextData;
|
TextBegin = TextData;
|
||||||
TextSize = sizeWithoutHeader;
|
TextSize = sizeWithoutHeader;
|
||||||
|
|
|
@ -77,7 +77,7 @@ void AnimEvaluator::Evaluate( double pTime)
|
||||||
|
|
||||||
// ******** Position *****
|
// ******** Position *****
|
||||||
aiVector3D presentPosition( 0, 0, 0);
|
aiVector3D presentPosition( 0, 0, 0);
|
||||||
if( channel->mPositionKeys > 0)
|
if( channel->mNumPositionKeys > 0)
|
||||||
{
|
{
|
||||||
// Look for present frame number. Search from last position if time is after the last time, else from beginning
|
// Look for present frame number. Search from last position if time is after the last time, else from beginning
|
||||||
// Should be much quicker than always looking from start for the average use case.
|
// Should be much quicker than always looking from start for the average use case.
|
||||||
|
@ -96,7 +96,7 @@ void AnimEvaluator::Evaluate( double pTime)
|
||||||
|
|
||||||
// ******** Rotation *********
|
// ******** Rotation *********
|
||||||
aiQuaternion presentRotation( 1, 0, 0, 0);
|
aiQuaternion presentRotation( 1, 0, 0, 0);
|
||||||
if( channel->mRotationKeys > 0)
|
if( channel->mNumRotationKeys > 0)
|
||||||
{
|
{
|
||||||
unsigned int frame = (time >= mLastTime) ? mLastPositions[a].get<1>() : 0;
|
unsigned int frame = (time >= mLastTime) ? mLastPositions[a].get<1>() : 0;
|
||||||
while( frame < channel->mNumRotationKeys - 1)
|
while( frame < channel->mNumRotationKeys - 1)
|
||||||
|
@ -113,7 +113,7 @@ void AnimEvaluator::Evaluate( double pTime)
|
||||||
|
|
||||||
// ******** Scaling **********
|
// ******** Scaling **********
|
||||||
aiVector3D presentScaling( 0, 0, 0);
|
aiVector3D presentScaling( 0, 0, 0);
|
||||||
if( channel->mScalingKeys > 0)
|
if( channel->mNumScalingKeys > 0)
|
||||||
{
|
{
|
||||||
unsigned int frame = (time >= mLastTime) ? mLastPositions[a].get<2>() : 0;
|
unsigned int frame = (time >= mLastTime) ? mLastPositions[a].get<2>() : 0;
|
||||||
while( frame < channel->mNumScalingKeys - 1)
|
while( frame < channel->mNumScalingKeys - 1)
|
||||||
|
|
|
@ -1991,7 +1991,7 @@ int CDisplay::RenderNode (aiNode* piNode,const aiMatrix4x4& piMatrix,
|
||||||
*tempmat++ = mat.d1; *tempmat++ = mat.d2; *tempmat++ = mat.d3; *tempmat++ = mat.d4;
|
*tempmat++ = mat.d1; *tempmat++ = mat.d2; *tempmat++ = mat.d3; *tempmat++ = mat.d4;
|
||||||
//tempmat += 4;
|
//tempmat += 4;
|
||||||
}
|
}
|
||||||
helper->piEffect->SetMatrixTransposeArray( "gBoneMatrix", (D3DXMATRIX*)matrices, 60);
|
helper->piEffect->SetMatrixArray( "gBoneMatrix", (D3DXMATRIX*)matrices, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
// now setup the material
|
// now setup the material
|
||||||
|
|
|
@ -224,7 +224,7 @@ void SceneAnimator::CalculateGlobalTransform( SceneAnimNode* pInternalNode)
|
||||||
SceneAnimNode* node = pInternalNode->mParent;
|
SceneAnimNode* node = pInternalNode->mParent;
|
||||||
while( node)
|
while( node)
|
||||||
{
|
{
|
||||||
pInternalNode->mGlobalTransform = pInternalNode->mGlobalTransform * node->mLocalTransform;
|
pInternalNode->mGlobalTransform *= node->mLocalTransform;
|
||||||
node = node->mParent;
|
node = node->mParent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue