7#ifndef POINTBOX_DEFINED
8#define POINTBOX_DEFINED
24 for(
MInt i = 0; i < DIM; i++)
29 for(
MInt i = 0; i < DIM; i++)
35 for(
MInt i = 0; i < DIM; i++)
36 if(
x[i] != p.x[i])
return false;
42 if(DIM > 1)
x[1] = x1;
43 if(DIM > 2)
x[2] = x2;
56 for(
MInt j = 0; j < DIM; j++) {
57 dd += std::pow(q.
x[j] - p.x[j], 2);
64 for(
MInt i = 0; i < DIM; i++) {
65 if(p.x[i] <
b.lo.x[i]) dd += std::pow(p.x[i] -
b.lo.x[i], 2);
66 if(p.x[i] >
b.hi.x[i]) dd += std::pow(p.x[i] -
b.hi.x[i], 2);
MFloat dist(const Point< DIM > &p, const Point< DIM > &q)
Box(const Point< DIM > &mylo, const Point< DIM > &myhi)
Point & operator=(const Point &p)
MBool operator==(const Point &p) const
Point(MFloat x0=0.0, MFloat x1=0.0, MFloat x2=0.0, MInt id=-1)