Added Center-Radius Constructor
This commit is contained in:
parent
730c9a68bd
commit
4086ccd28b
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.8 2004/07/20 23:10:01 cignoni
|
||||||
|
Uncommented Add of matrix transformed bbox
|
||||||
|
|
||||||
Revision 1.7 2004/07/15 09:47:55 ganovelli
|
Revision 1.7 2004/07/15 09:47:55 ganovelli
|
||||||
added function P(int i) to list the box's vertices
|
added function P(int i) to list the box's vertices
|
||||||
|
|
||||||
|
|
@ -83,6 +86,11 @@ public:
|
||||||
inline Box3( const Box3 & b ) { min=b.min; max=b.max; }
|
inline Box3( const Box3 & b ) { min=b.min; max=b.max; }
|
||||||
/// Min Max constructor
|
/// Min Max constructor
|
||||||
inline Box3( const Point3<BoxScalarType> & mi, const Point3<BoxScalarType> & ma ) { min = mi; max = ma; }
|
inline Box3( const Point3<BoxScalarType> & mi, const Point3<BoxScalarType> & ma ) { min = mi; max = ma; }
|
||||||
|
/// Point Radius Constructor
|
||||||
|
inline Box3(const Point3<BoxScalarType> & center, const BoxScalarType & radius) {
|
||||||
|
min = center-Point3<BoxScalarType>(radius,radius,radius);
|
||||||
|
max = center+Point3<BoxScalarType>(radius,radius,radius);
|
||||||
|
}
|
||||||
/// The bounding box distructor
|
/// The bounding box distructor
|
||||||
inline ~Box3() { }
|
inline ~Box3() { }
|
||||||
/// Operator to compare two bounding box
|
/// Operator to compare two bounding box
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue