Beispiel #1
0
 public NuGenTrafo3D(NuGenTrafo2D t)
 {
     _x     = new double[16];
     _x[0]  = t[0, 0]; _x[1] = t[0, 1]; _x[2] = 0.0; _x[3] = t[0, 2];
     _x[4]  = t[1, 0]; _x[5] = t[1, 1]; _x[6] = 0.0; _x[7] = t[1, 2];
     _x[8]  = 0.0; _x[9] = 0.0; _x[10] = 1.0; _x[11] = 0.0;
     _x[12] = t[2, 0]; _x[13] = t[2, 1]; _x[14] = 0.0; _x[15] = t[2, 2];
 }
Beispiel #2
0
		public NuGenTrafo3D(NuGenTrafo2D t)
		{
			_x = new double[16];
			_x[ 0] = t[0,0]; _x[ 1] = t[0,1]; _x[ 2] = 0.0; _x[ 3] = t[0,2];
			_x[ 4] = t[1,0]; _x[ 5] = t[1,1]; _x[ 6] = 0.0; _x[ 7] = t[1,2];
			_x[ 8] = 0.0; _x[ 9] = 0.0; _x[10] = 1.0; _x[11] = 0.0;
			_x[12] = t[2,0]; _x[13] = t[2,1]; _x[14] = 0.0; _x[15] = t[2,2];
		}
Beispiel #3
0
 public static bool ApproxEquals(NuGenTrafo2D a, NuGenTrafo2D b)
 {
     for (int i = 0; i < 9; i++)
     {
         if (Math.Abs(a._x[0] - b._x[0]) > NuGenVector.TINY_DOUBLE)
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #4
0
		public static bool ApproxEquals(NuGenTrafo2D a, NuGenTrafo2D b)
		{
						
			for (int i = 0; i < 9; i++)
			{

				if (Math.Abs(a._x[0] - b._x[0]) > NuGenVector.TINY_DOUBLE) return false;
			}
			return true;
		}