public Matrix3D(double r1c1, double r1c2, double r1c3, double r2c1, double r2c2, double r2c3, double r3c1, double r3c2, double r3c3) { Row1 = new Coordinates3D(r1c1, r1c2, r1c3); Row2 = new Coordinates3D(r2c1, r2c2, r2c3); Row3 = new Coordinates3D(r3c1, r3c2, r3c3); }
/// <summary> /// Calculate the Rotation Matrix on the Z axis for the given angle /// </summary> /// <param name="a">Angle</param> /// <returns>Return the Rotation Matrix</returns> public static Matrix3D GetZRotationMatrix(double a) { // cos a - sin a 0 // sin a cos a 0 // 0 0 1 double cos = AngleUtils.Cos(a); double sin = AngleUtils.Sin(a); Coordinates3D Row1 = new Coordinates3D(cos, -sin, 0); Coordinates3D Row2 = new Coordinates3D(sin, cos, 0); Coordinates3D Row3 = new Coordinates3D(0, 0, 1); return(new Matrix3D(Row1, Row2, Row3)); }
/// <summary> /// Calculate the Rotation Matrix on the Y axis for the given angle /// </summary> /// <param name="a">Angle</param> /// <returns>Return the Rotation Matrix</returns> public static Matrix3D GetYRotationMatrix(double a) { // cos a 0 sin a // 0 1 0 // -sin a 0 cos a double cos = AngleUtils.Cos(a); double sin = AngleUtils.Sin(a); Coordinates3D Row1 = new Coordinates3D(cos, 0, sin); Coordinates3D Row2 = new Coordinates3D(0, 1, 0); Coordinates3D Row3 = new Coordinates3D(-sin, 0, cos); return(new Matrix3D(Row1, Row2, Row3)); }
/// <summary> /// Calculate the Rotation Matrix on the X axis for the given angle /// </summary> /// <param name="a">Angle</param> /// <returns>Return the Rotation Matrix</returns> public static Matrix3D GetXRotationMatrix(double a) { // 1 0 0 // 0 cos a - sin a // 0 sin a cos a double cos = AngleUtils.Cos(a); double sin = AngleUtils.Sin(a); Coordinates3D Row1 = new Coordinates3D(1, 0, 0); Coordinates3D Row2 = new Coordinates3D(0, cos, -sin); Coordinates3D Row3 = new Coordinates3D(0, sin, cos); return(new Matrix3D(Row1, Row2, Row3)); }
public Coordinates3D(Coordinates3D cd) { X = cd.X; Y = cd.Y; Z = cd.Z; }
public Matrix3D(Matrix3D m) { Row1 = new Coordinates3D(m.Row1); Row2 = new Coordinates3D(m.Row2); Row3 = new Coordinates3D(m.Row3); }
public Matrix3D(Coordinates3D v1, Coordinates3D v2, Coordinates3D v3) { Row1 = v1; Row2 = v2; Row3 = v3; }
public Matrix3D() { Row1 = new Coordinates3D(); Row2 = new Coordinates3D(); Row3 = new Coordinates3D(); }
public Vector(Coordinates3D cd) : base(cd) { }
public Point(Coordinates3D cd) : base(cd) { }