Esempio n. 1
0
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;
}
Esempio n. 2
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;
}