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); }
public AwPoint(AwVector v) { x = v.x; y = v.y; z = v.z; w = 1.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; }
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); }
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); }
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); }
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)); } }
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)); } }
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; }
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); }
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); }
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; }