public static void Clone(P3dCommand command, int clonerIndex, int matrixIndex) { if (matrixIndex == 0) { MatrixCount = tempPosMatrices.Count; } var posMatrix = tempPosMatrices[matrixIndex]; var rotMatrix = tempRotMatrices[matrixIndex]; tempCloners[clonerIndex].Transform(ref posMatrix, ref rotMatrix); tempPosMatrices.Add(posMatrix); tempRotMatrices.Add(rotMatrix); command.Transform(posMatrix, rotMatrix); }