added constructor with center and radius
This commit is contained in:
parent
433d070691
commit
2c2b5b1319
|
@ -59,6 +59,12 @@ public:
|
|||
inline Box2( const Box2 & b ) { min=b.min; max=b.max; }
|
||||
/// Min Max constructor
|
||||
inline Box2( const Point2<BoxScalarType> & mi, const Point2<BoxScalarType> & ma ) { min = mi; max = ma; }
|
||||
|
||||
inline Box2(const Point2<BoxScalarType> & center, const BoxScalarType & radius) {
|
||||
min = center-Point2<BoxScalarType>(radius,radius);
|
||||
max = center+Point2<BoxScalarType>(radius,radius);
|
||||
}
|
||||
|
||||
/// Distructor
|
||||
inline ~Box2() { }
|
||||
/// Operator to compare two bounding box
|
||||
|
|
Loading…
Reference in New Issue