private void SetBone(H3DAnimQuatTransform Transform, Bone Bone, int Frame, float Weight) { if (Transform.HasScale) { Bone.Scale = Vector3.Lerp( Transform.GetScaleValue(Frame + 0).ToVector3(), Transform.GetScaleValue(Frame + 1).ToVector3(), Weight); } if (Transform.HasRotation) { Bone.Rotation = Quaternion.Slerp( Transform.GetRotationValue(Frame + 0).ToQuaternion(), Transform.GetRotationValue(Frame + 1).ToQuaternion(), Weight); } if (Transform.HasTranslation) { Bone.Translation = Vector3.Lerp( Transform.GetTranslationValue(Frame + 0).ToVector3(), Transform.GetTranslationValue(Frame + 1).ToVector3(), Weight); } }
private void SetBone(H3DAnimQuatTransform Transform, Bone Bone, int Frame) { if (Transform.HasScale) { Bone.Scale = Transform.GetScaleValue(Frame).ToVector3(); } if (Transform.HasRotation) { Bone.Rotation = Transform.GetRotationValue(Frame).ToQuaternion(); } if (Transform.HasTranslation) { Bone.Translation = Transform.GetTranslationValue(Frame).ToVector3(); } }