示例#1
0
        public AwPoint cartesianAdd(AwVector v)
        {
            AwPoint pt   = cartesian();
            AwPoint temp = new AwPoint(pt.x + v.x, pt.y + v.y, pt.z + v.z, 1.0);

            return(temp);
        }
示例#2
0
 public AwPoint(AwVector v)
 {
     x = v.x;
     y = v.y;
     z = v.z;
     w = 1.0;
 }
示例#3
0
        public AwVector cartesianSub( AwPoint otherPt) 
        {
	        AwPoint ptA = cartesian();
	        AwPoint ptB = otherPt.cartesian();
            AwVector v = new AwVector(ptA.x - ptB.x, ptA.y - ptB.y, ptA.z - ptB.z);
	        return v;
        }
示例#4
0
        public AwPoint cartesianSub(AwVector v)
        {
            AwPoint ptA = cartesian();
            AwPoint p   = new AwPoint(ptA.x - v.x, ptA.y - v.y, ptA.z - v.z, 1.0);

            return(p);
        }
示例#5
0
 public AwPoint(AwVector v)
 {
     x = v.x;
     y = v.y;
     z = v.z;
     w = 1.0;
 }
示例#6
0
        public AwVector cartesianSub(AwPoint otherPt)
        {
            AwPoint  ptA = cartesian();
            AwPoint  ptB = otherPt.cartesian();
            AwVector v   = new AwVector(ptA.x - ptB.x, ptA.y - ptB.y, ptA.z - ptB.z);

            return(v);
        }
示例#7
0
 public AwPoint add( AwVector v)
 {
     if ( w == 1.0)
     {
         AwPoint p = new AwPoint( x+v.x, y+v.y, z+v.z, 1.0 );
         return p;
     }
     else
         return cartesianAdd(v);
 }
示例#8
0
 public AwVector sub(AwPoint v)
 {
     if (w == 1.0)
     {
         AwVector p = new AwVector(x - v.x, y - v.y, z - v.z);
         return(p);
     }
     else
     {
         return(cartesianSub(v));
     }
 }
示例#9
0
 public AwPoint add(AwVector v)
 {
     if (w == 1.0)
     {
         AwPoint p = new AwPoint(x + v.x, y + v.y, z + v.z, 1.0);
         return(p);
     }
     else
     {
         return(cartesianAdd(v));
     }
 }
示例#10
0
 public AwPoint cartesianAdd(AwVector v)
 {
     AwPoint pt = cartesian();
     AwPoint temp = new AwPoint(pt.x + v.x, pt.y + v.y, pt.z + v.z, 1.0);
     return temp;
 }
示例#11
0
 public AwVector sub(AwPoint v)
 {
     if (w == 1.0)
     {
         AwVector p = new AwVector(x - v.x, y - v.y, z - v.z);
         return p;
     }
     else
         return cartesianSub(v);
 }
示例#12
0
 public AwPoint sub(AwVector v)
 {
     if (w == 1.0)
     {
         AwPoint p = new AwPoint(x - v.x, y - v.y, z -v.z, 1.0);
         return p;
     }
     else
         return cartesianSub(v);
 }
示例#13
0
 public AwPoint cartesianSub(AwVector v)
 {
     AwPoint ptA = cartesian();
     AwPoint p = new AwPoint(ptA.x - v.x, ptA.y - v.y, ptA.z - v.z, 1.0);
     return p;
 }