public static DecomposedMatrix[][] GetDecomposedMatricesByPart(DecomposedMatrix[][] fullmarx, int[] partIndexes) { DecomposedMatrix[][] res; res = new DecomposedMatrix[fullmarx.Length][]; for (int i = 0; i < fullmarx.Length; i++) { res[i] = new DecomposedMatrix[partIndexes.Length]; } for (int i = 0; i < partIndexes.Length; i++) { for (int j = 0; j < fullmarx.Length; j++) { res[j][i] = fullmarx[j][partIndexes[i]]; } } return res; }
public BoneFrame(float _frameNumber, Matrix _Matrix) { frameNumber = _frameNumber; frameDMatrix = new DecomposedMatrix(_Matrix); }
public static FullAnimation FullAnimationFromStream(System.IO.BinaryReader stream) { FullAnimation result = new FullAnimation(); result.BonesCount = stream.ReadInt32(); result.length = stream.ReadInt32(); DecomposedMatrix[][] res; int length = stream.ReadInt32(); res = new DecomposedMatrix[length][]; for (int i = 0; i < length; i++) { int length2 = stream.ReadInt32(); res[i] = new DecomposedMatrix[length2]; for (int j = 0; j < length2; j++) { res[i][j] = new DecomposedMatrix(); float W = stream.ReadSingle(); float X = stream.ReadSingle(); float Y = stream.ReadSingle(); float Z = stream.ReadSingle(); res[i][j].rotation = new Quaternion(X, Y, Z, W); res[i][j].translation = stream.ReadVector3(); res[i][j].scale = stream.ReadVector3(); } } result.matrices = res; result.animlength = result.matrices.Length; return result; }
public BoneFrame(float _frameNumber, DecomposedMatrix _frameDMatrix) { frameNumber = _frameNumber; frameDMatrix = _frameDMatrix; }