private void UpdateWorldTransformation()
{
/*this._localScaleMatrix.MultiplyM2(this._localRotationMatrix, this._localTransformMatrix);
this._localTransformMatrix.MultiplyM2(this._localTranslationMatrix, this._localTransformMatrix);*/
if (this.Animation != null) {
this._localTranslationMatrix.SetTranslate3(
this.Animation.TranslateX[this.Animation.CurrentFrame] + this.LocalTranslation.Elements[0],
this.Animation.TranslateY[this.Animation.CurrentFrame] + this.LocalTranslation.Elements[1],
this.Animation.TranslateZ[this.Animation.CurrentFrame] + this.LocalTranslation.Elements[2]);
this._localScaleMatrix.SetScale3(
this.Animation.ScaleX[this.Animation.CurrentFrame] + this.LocalScale.Elements[0],
this.Animation.ScaleY[this.Animation.CurrentFrame] + this.LocalScale.Elements[1],
this.Animation.ScaleZ[this.Animation.CurrentFrame] + this.LocalScale.Elements[2]);
this._localRotationMatrix.SetRotation3(
this.Animation.RotateX[this.Animation.CurrentFrame] + this.LocalRotation.Elements[0],
this.Animation.RotateY[this.Animation.CurrentFrame] + this.LocalRotation.Elements[1],
this.Animation.RotateZ[this.Animation.CurrentFrame] + this.LocalRotation.Elements[2]
);
}
this._localTranslationMatrix.Copy(this._localTransformMatrix);
this._localTransformMatrix.MultiplyM2(this._pivotMatrix, this._localTransformMatrix);
this._localTransformMatrix.MultiplyM2(this._localRotationMatrix, this._localTransformMatrix);
this._localTransformMatrix.MultiplyM2(this._inversePivotMatrix, this._localTransformMatrix);
this._localTransformMatrix.MultiplyM2(this._localScaleMatrix, this._localTransformMatrix);
if (this.Parent != null)
//this._localTransformMatrix.MultiplyM2(this.Parent.World, this._worldTransformation);
this.Parent.World.MultiplyM2(this._localTransformMatrix, this._worldTransformation);
else
this._worldTransformation = this._localTransformMatrix;
this._needWordUpdate = false;
}