rt_centroid_sphere::rt_centroid_sphere(const rt_point& p) : rt_sphere(p.dim(), new double[rt_centroid_sphere::dim2size(p.dim())/sizeof(double)]), rank(p.dim(), coord + (rt_sphere::dim2size(p.dim())/sizeof(double))) { dealloc = true; _init(p, 0.0, 1.0); }
rt_rrect::rt_rrect(const rt_point& p) : rt_rect(p.dim(), new double[rt_rrect::dim2size(p.dim())/sizeof(double)]), rank(p.dim(), coord + (rt_rect::dim2size(p.dim())/sizeof(double))) { dealloc = true; for (int i = 0; i < dimension; i++) { hi(i) = lo(i) = p.co(i); } rank.nrec() = 1; }
void rt_centroid_sphere::_init(const rt_point& p, double r, double n) { for (int i = 0; i < dimension; ++i) { center.co(i) = p.co(i); } radius() = r; rank.nrec() = n; }