Esempio n. 1
0
        public static Vector3f Add(Vector3f vectorA, float x_0, float y_1, float z_2)
        {
            vectorA.x += x_0;
            vectorA.y += y_1;
            vectorA.z += z_2;

            return vectorA;
        }
Esempio n. 2
0
        public static Vector3f Add(Vector3f vectorA, Vector3f vectorB)
        {
            vectorA.x += vectorB.x;
            vectorA.y += vectorB.y;
            vectorA.z += vectorB.z;

            return vectorA;
        }
Esempio n. 3
0
		public float Dst(Vector3f vector) {
			float a = vector.x - x;
			float b = vector.y - y;
			float c = vector.z - z;
	
			a *= a;
			b *= b;
			c *= c;
	
			return MathUtils.Sqrt(a + b + c);
		}
Esempio n. 4
0
        public static Vector3f Sub(Vector3f vectorA, float x_0, float y_1, float z_2)
        {
            vectorA.x -= x_0;
            vectorA.y -= y_1;
            vectorA.z -= z_2;

            return vectorA;
        }
Esempio n. 5
0
        public static Vector3f Sub(Vector3f vectorA, float value_ren)
        {
            vectorA.x -= value_ren;
            vectorA.y -= value_ren;
            vectorA.z -= value_ren;

            return vectorA;
        }
Esempio n. 6
0
 public Vector3f(Vector3f vector)
 {
     this.Set(vector);
 }
Esempio n. 7
0
        public static float Dst2(Vector3f vectorA, float x_0, float y_1, float z_2)
        {
            float a = x_0 - vectorA.x;
            float b = y_1 - vectorA.y;
            float c = z_2 - vectorA.z;

            a *= a;
            b *= b;
            c *= c;

            return a + b + c;
        }
Esempio n. 8
0
        public float Dst2(Vector3f point)
        {
            float a = point.x - x;
            float b = point.y - y;
            float c = point.z - z;

            a *= a;
            b *= b;
            c *= c;

            return a + b + c;
        }
Esempio n. 9
0
 public Vector3f Set(Vector3f vector)
 {
     return this.Set(vector.x, vector.y, vector.z);
 }
Esempio n. 10
0
        public static Vector3f Mul(Vector3f vectorA, float value_ren)
        {
            vectorA.x = value_ren * vectorA.x;
            vectorA.y = value_ren * vectorA.y;
            vectorA.z = value_ren * vectorA.z;

            return vectorA;
        }
Esempio n. 11
0
 public Vector3f Crs(Vector3f vector)
 {
     return this.Set(y * vector.z - z * vector.y, z * vector.x - x
             * vector.z, x * vector.y - y * vector.x);
 }
Esempio n. 12
0
 public static float Len2(Vector3f vectorA)
 {
     return vectorA.x * vectorA.x + vectorA.y * vectorA.y + vectorA.z
             * vectorA.z;
 }
Esempio n. 13
0
        public static Vector3f Lerp(Vector3f vectorA, Vector3f target, float alpha)
        {
            Vector3f r = Mul(vectorA, 1.0f - alpha);
            Add(r, Mul(Cpy(vectorA), alpha));

            return r;
        }
Esempio n. 14
0
 public static float Len(Vector3f vectorA)
 {
     return MathUtils.Sqrt(vectorA.x * vectorA.x + vectorA.y * vectorA.y
             + vectorA.z * vectorA.z);
 }
Esempio n. 15
0
 public static bool IsZero(Vector3f vectorA)
 {
     return vectorA.x == 0 && vectorA.y == 0 && vectorA.z == 0;
 }
Esempio n. 16
0
 public static bool Idt(Vector3f vectorA, Vector3f vectorB)
 {
     return vectorA.x == vectorB.x && vectorA.y == vectorB.y
             && vectorA.z == vectorB.z;
 }
Esempio n. 17
0
 public static float[] ToArray(Vector3f vectorA)
 {
     return new float[] { vectorA.x, vectorA.y, vectorA.z };
 }
Esempio n. 18
0
        public static Vector3f Scale(Vector3f vectorA, float scalarX,
				float scalarY, float scalarZ)
        {
            vectorA.x *= scalarX;
            vectorA.y *= scalarY;
            vectorA.z *= scalarZ;
            return vectorA;
        }
Esempio n. 19
0
 public Vector3f Add(Vector3f vector)
 {
     return this.Add(vector.x, vector.y, vector.z);
 }
Esempio n. 20
0
 public static Vector3f Set(Vector3f vectorA, float x_0, float y_1, float z_2)
 {
     vectorA.x = x_0;
     vectorA.y = y_1;
     vectorA.z = z_2;
     return vectorA;
 }
Esempio n. 21
0
 public float Dot(Vector3f vector)
 {
     return x * vector.x + y * vector.y + z * vector.z;
 }
Esempio n. 22
0
 public static Vector3f Set(Vector3f vectorA, Vector3f vectorB)
 {
     return Set(vectorA, vectorB.x, vectorB.y, vectorB.z);
 }
Esempio n. 23
0
 public bool Idt(Vector3f vector)
 {
     return x == vector.x && y == vector.y && z == vector.z;
 }
Esempio n. 24
0
        public static float Dst(Vector3f vectorA, float x_0, float y_1, float z_2)
        {
            float a = x_0 - vectorA.x;
            float b = y_1 - vectorA.y;
            float c = z_2 - vectorA.z;

            a *= a;
            b *= b;
            c *= c;

            return MathUtils.Sqrt(a + b + c);
        }
Esempio n. 25
0
 public Vector3f Sub(Vector3f a_vec)
 {
     return this.Sub(a_vec.x, a_vec.y, a_vec.z);
 }
Esempio n. 26
0
        public static float Dst(Vector3f vectorA, Vector3f vectorB)
        {
            float a = vectorB.x - vectorA.x;
            float b = vectorB.y - vectorA.y;
            float c = vectorB.z - vectorA.z;

            a *= a;
            b *= b;
            c *= c;

            return MathUtils.Sqrt(a + b + c);
        }
Esempio n. 27
0
 public static Vector3f Set(Vector3f vectorA, float[] values)
 {
     return Set(vectorA, values[0], values[1], values[2]);
 }
Esempio n. 28
0
        public static float Dst2(Vector3f vectorA, Vector3f vectorB)
        {
            float a = vectorB.x - vectorA.x;
            float b = vectorB.y - vectorA.y;
            float c = vectorB.z - vectorA.z;

            a *= a;
            b *= b;
            c *= c;

            return a + b + c;
        }
Esempio n. 29
0
        public static Vector3f Add(Vector3f vectorA, float value_ren)
        {
            vectorA.x += value_ren;
            vectorA.y += value_ren;
            vectorA.z += value_ren;

            return vectorA;
        }
Esempio n. 30
0
        public static Vector3f Sub(Vector3f vectorA, Vector3f vectorB)
        {
            vectorA.x -= vectorB.x;
            vectorA.y -= vectorB.y;
            vectorA.z -= vectorB.z;

            return vectorA;
        }