public bool GetBounds(out RPoint min, out RPoint max) { min = new RPoint(-1.5, -1.5, -1.5); max = new RPoint(1.5, 1.5, 1.5); return(true); }
public static Vector3 RPoint2D3DVECTOR(RPoint rp) { return(new Vector3((float)rp.X, (float)rp.Y, (float)rp.Z)); }
public void Add(ref RPoint pt) { X += pt.X; Y += pt.Y; Z += pt.Z; }
public void Add(ref RPoint pt, double v) { X += pt.X * v; Y += pt.Y * v; Z += pt.Z * v; }
// public Axis(RPoint pt, RPoint vec) { PT = pt; Debug.Assert(vec.Dist() > 0); VC = vec; VC.Norm(); }
// public bool Equals(RPoint pt) { return(this == pt); }
public static void FromCart(out RPoint pt, double u, double v, double z) { pt.X = u; pt.Y = v; pt.Z = z; }
// public bool InVBox(ref RPoint ptMin, ref RPoint ptMax) { return(ptMin.X <= X && X <= ptMax.X && ptMin.Y <= Y && Y <= ptMax.Y && ptMin.Z <= Z && Z <= ptMax.Z); }
public double Dist(ref RPoint pt) { return(Math.Sqrt(this.Dist2(ref pt))); }
public static void FromProj(out RPoint pt, double u, double v, double z) { pt.X = -u * z; pt.Y = -v * z; pt.Z = z; }
public double Dist2(ref RPoint pt) { return(sqr(X - pt.X) + sqr(Y - pt.Y) + sqr(Z - pt.Z)); }
// non destructive public double SMul(ref RPoint p) { return(X * p.X + Y * p.Y + Z * p.Z); }
// public RPoint CrProd(ref RPoint pt) // res = [this, pt] { return(new RPoint(Y * pt.Z - Z * pt.Y, Z * pt.X - X * pt.Z, X * pt.Y - Y * pt.X)); }
public void Sub(ref RPoint pt) { X -= pt.X; Y -= pt.Y; Z -= pt.Z; }
// public QPoint(RPoint pt, double r) { PT = pt; R = r; }