public Transformation() { rotationMatrix = rotation.ToRotationMatrices(); hasEuler = true; hasMatrix = true; }
public Transformation(object[] transformationArrayObj) { var transformationArray = transformationArrayObj.Cast <double>().ToArray(); var matrix = Matrix <double> .Build.Dense(3, 3); // { 0, 3, 6 } // { 1, 4, 7 } // { 2, 5, 8 } matrix[0, 0] = transformationArray[0]; matrix[1, 0] = transformationArray[1]; matrix[2, 0] = transformationArray[2]; matrix[0, 1] = transformationArray[3]; matrix[1, 1] = transformationArray[4]; matrix[2, 1] = transformationArray[5]; matrix[0, 2] = transformationArray[6]; matrix[1, 2] = transformationArray[7]; matrix[2, 2] = transformationArray[8]; position.X = transformationArray[9]; position.Y = transformationArray[10]; position.Z = transformationArray[11]; rotationMatrix = new RotationMatrix(matrix); hasMatrix = true; }
public Transformation(ATN.Utils.MathExt.Numerical.Coordinate pos, Rotation rm, string order = "xyz") { position = pos; rotationMatrix = rm.ToRotationMatrices(order); hasMatrix = true; }
public Transformation(ATN.Utils.MathExt.Numerical.Coordinate pos, RotationMatrix rm) { position = pos; rotationMatrix = rm; hasMatrix = true; }
public Transformation(double X, double Y, double Z, double Phi, double Teta, double Psi, string order = "xyz") { position = new ATN.Utils.MathExt.Numerical.Coordinate(X, Y, Z); rotation = new ATN.Utils.MathExt.Numerical.Rotation(Phi, Teta, Psi); rotationMatrix = new RotationMatrix(rotation, order); hasEuler = true; hasMatrix = true; }
public Transformation NewOrder(string order = "xyz") { if (!hasEuler) { throw new ArgumentException("No Euler availible"); } rotationMatrix = rotation.ToRotationMatrices(order); return(this); }