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

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