Example #1
0
 public double Dot(Vector3D v)
 {
     return x*v.x + y*v.y + z*v.z;
 }
Example #2
0
 public void ScaleAdd(double s, Vector3D t1, Vector3D t2)
 {
     x = s*t1.x + t2.x;
     y = s*t1.y + t2.y;
     z = s*t1.z + t2.z;
 }
Example #3
0
 public void Add(Vector3D t1)
 {
     x += t1.x;
     y += t1.y;
     z += t1.z;
 }
Example #4
0
 public void Cross(Vector3D v1, Vector3D v2)
 {
     Set(v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x);
 }
Example #5
0
 public void Add(Vector3D t1, Vector3D t2)
 {
     x = t1.x + t2.x;
     y = t1.y + t2.y;
     z = t1.z + t2.z;
 }
Example #6
0
 protected bool Equals(Vector3D other)
 {
     return x.Equals(other.x) && y.Equals(other.y) && z.Equals(other.z);
 }
Example #7
0
 public void Subtract(Vector3D t1)
 {
     x -= t1.x;
     y -= t1.y;
     z -= t1.z;
 }
Example #8
0
 public void Subtract(Vector3D t1, Vector3D t2)
 {
     x = t1.x - t2.x;
     y = t1.y - t2.y;
     z = t1.z - t2.z;
 }
Example #9
0
 public void Set(Vector3D t1)
 {
     x = t1.x;
     y = t1.y;
     z = t1.z;
 }