remove kmMat4 in Armature

This commit is contained in:
Huabing.Xu 2014-04-11 17:25:28 +08:00
parent 7af4d558c6
commit 866c4ad735
2 changed files with 7 additions and 7 deletions

View File

@ -113,11 +113,11 @@ void DisplayFactory::updateDisplay(Bone *bone, float dt, bool dirty)
CC_BREAK_IF(!detector->getBody());
#endif
kmMat4 displayTransform = display->getNodeToParentTransform();
Matrix displayTransform = display->getNodeToParentTransform();
Point anchorPoint = display->getAnchorPointInPoints();
anchorPoint = PointApplyTransform(anchorPoint, displayTransform);
displayTransform.mat[12] = anchorPoint.x;
displayTransform.mat[13] = anchorPoint.y;
displayTransform.m[12] = anchorPoint.x;
displayTransform.m[13] = anchorPoint.y;
Matrix t = TransformConcat( bone->getArmature()->getNodeToParentTransform(),displayTransform);
detector->updateTransform(t);
}

View File

@ -208,20 +208,20 @@ Matrix Skin::getNodeToWorldTransform() const
Matrix Skin::getNodeToWorldTransformAR() const
{
kmMat4 displayTransform = _transform;
Matrix displayTransform = _transform;
Point anchorPoint = _anchorPointInPoints;
anchorPoint = PointApplyTransform(anchorPoint, displayTransform);
displayTransform.mat[12] = anchorPoint.x;
displayTransform.mat[13] = anchorPoint.y;
displayTransform.m[12] = anchorPoint.x;
displayTransform.m[13] = anchorPoint.y;
return TransformConcat( _bone->getArmature()->getNodeToWorldTransform(),displayTransform);
}
void Skin::draw(Renderer *renderer, const Matrix &transform, bool transformUpdated)
{
kmMat4 mv = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
Matrix mv = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
//TODO implement z order
_quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, &_quad, 1, mv);