- 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-9d2fd5bffc1f
pull/1/head
ulfjorensen 2008-10-31 23:17:43 +00:00
parent a7088d6263
commit 6b02833561
5 changed files with 6 additions and 6 deletions

View File

@ -663,7 +663,7 @@ private:
// MSVC debugger complains here about loss of data ...
// todo ... I temporarily disabled the check in the build config
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;
TextSize = sizeWithoutHeader;

View File

@ -77,7 +77,7 @@ void AnimEvaluator::Evaluate( double pTime)
// ******** Position *****
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
// Should be much quicker than always looking from start for the average use case.
@ -96,7 +96,7 @@ void AnimEvaluator::Evaluate( double pTime)
// ******** Rotation *********
aiQuaternion presentRotation( 1, 0, 0, 0);
if( channel->mRotationKeys > 0)
if( channel->mNumRotationKeys > 0)
{
unsigned int frame = (time >= mLastTime) ? mLastPositions[a].get<1>() : 0;
while( frame < channel->mNumRotationKeys - 1)
@ -113,7 +113,7 @@ void AnimEvaluator::Evaluate( double pTime)
// ******** Scaling **********
aiVector3D presentScaling( 0, 0, 0);
if( channel->mScalingKeys > 0)
if( channel->mNumScalingKeys > 0)
{
unsigned int frame = (time >= mLastTime) ? mLastPositions[a].get<2>() : 0;
while( frame < channel->mNumScalingKeys - 1)

View File

@ -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 += 4;
}
helper->piEffect->SetMatrixTransposeArray( "gBoneMatrix", (D3DXMATRIX*)matrices, 60);
helper->piEffect->SetMatrixArray( "gBoneMatrix", (D3DXMATRIX*)matrices, 60);
}
// now setup the material

View File

@ -224,7 +224,7 @@ void SceneAnimator::CalculateGlobalTransform( SceneAnimNode* pInternalNode)
SceneAnimNode* node = pInternalNode->mParent;
while( node)
{
pInternalNode->mGlobalTransform = pInternalNode->mGlobalTransform * node->mLocalTransform;
pInternalNode->mGlobalTransform *= node->mLocalTransform;
node = node->mParent;
}
}