M
michael.goossens
Whats the best way to implement this:
BBox BBox::Union(const BBox &b) const{
BBox u;
u.p_min.x = min(p_min.x, b.p_min.x); u.p_min.y = min(p_min.y,
b.p_min.y); u.p_min.z = min(p_min.z, b.p_min.z);
u.p_max.x = max(p_max.x, b.p_max.x); u.p_max.y = max(p_max.y,
b.p_max.y); u.p_max.z = max(p_max.z, b.p_max.z);
return u;
}
or static with two arguments. I'm thinking of making this inline ...
but I don't know why anyone supporting this?
BBox BBox::Union(const BBox &b) const{
BBox u;
u.p_min.x = min(p_min.x, b.p_min.x); u.p_min.y = min(p_min.y,
b.p_min.y); u.p_min.z = min(p_min.z, b.p_min.z);
u.p_max.x = max(p_max.x, b.p_max.x); u.p_max.y = max(p_max.y,
b.p_max.y); u.p_max.z = max(p_max.z, b.p_max.z);
return u;
}
or static with two arguments. I'm thinking of making this inline ...
but I don't know why anyone supporting this?