示例#1
0
 /// <summary>
 /// Initializes rotation, equal to the rotation from global CS to 'coord'.
 /// </summary>
 public Rotation(Coord3d coord)
 {
     if (coord == null)
     {
         _r = Matrix3d.Identity();
     }
     else
     {
         _r = coord.Axes.Transpose();
     }
     _coord = Coord3d.GlobalCS;
 }
示例#2
0
 /// <summary>
 /// Initializes default coordinate system.
 /// </summary>
 /// <param name="name">Name of the coordinate system.</param>
 public Coord3d(string name = "")
 {
     _origin = new Point3d(0, 0, 0);
     _axes   = Matrix3d.Identity();
     if ((!string.IsNullOrEmpty(name)))
     {
         _name = name;
     }
     else
     {
         _name = "Coord " + count.ToString();
     }
     count += 1;
 }
示例#3
0
 /// <summary>
 /// Default constructor, initializes identity matrix (zero rotation).
 /// </summary>
 public Rotation()
 {
     _r     = Matrix3d.Identity();
     _coord = Coord3d.GlobalCS;
 }