@@ -10,21 +10,17 @@ const AABB AABB::ZERO(0, 0, 0, 0, 0, 0);
1010
1111
1212AABB ::AABB ()
13- : mMinimum (Vector3::ZERO ), mMaximum (Vector3::UNIT_SCALE ), mCorners (0 ) {
14- setMinimum ( -0.5 , -0.5 , -0.5 );
15- setMaximum ( 0.5 , 0.5 , 0.5 );
13+ : mMinimum (Vector3(0 , 0 , 0 )), mMaximum (Vector3(0 , 0 , 0 )), mCorners (0 ) {
1614 mBoxType = BOXTYPE_NULL ;
1715}
1816
1917AABB ::AABB (BoxType bt)
20- : mMinimum (Vector3::ZERO ), mMaximum (Vector3::UNIT_SCALE ), mCorners (0 ) {
21- setMinimum ( -0.5 , -0.5 , -0.5 );
22- setMaximum ( 0.5 , 0.5 , 0.5 );
18+ : mMinimum (Vector3(0 , 0 , 0 )), mMaximum (Vector3(0 , 0 , 0 )), mCorners (0 ) {
2319 mBoxType = bt;
2420}
2521
2622AABB ::AABB (const AABB & rkBox)
27- : mMinimum (Vector3:: ZERO ) , mMaximum (Vector3:: UNIT_SCALE ), mCorners (0 ) {
23+ : mMinimum (Vector3( 0 , 0 , 0 )) , mMaximum (Vector3( 0 , 0 , 0 ) ), mCorners (0 ) {
2824 if (rkBox.isNull ())
2925 setNull ();
3026 else if (rkBox.isInfinite ())
@@ -34,12 +30,12 @@ AABB::AABB(const AABB & rkBox)
3430}
3531
3632AABB ::AABB ( const Vector3& min, const Vector3& max )
37- : mMinimum (Vector3:: ZERO ) , mMaximum (Vector3:: UNIT_SCALE ), mCorners (0 ) {
33+ : mMinimum (Vector3( 0 , 0 , 0 )) , mMaximum (Vector3( 0 , 0 , 0 ) ), mCorners (0 ) {
3834 setExtents ( min, max );
3935}
4036
4137AABB ::AABB (float mx, float my, float mz, float Mx, float My, float Mz )
42- : mMinimum (Vector3:: ZERO ) , mMaximum (Vector3:: UNIT_SCALE ), mCorners (0 ) {
38+ : mMinimum (Vector3( 0 , 0 , 0 )) , mMaximum (Vector3( 0 , 0 , 0 ) ), mCorners (0 ) {
4339 setExtents ( mx, my, mz, Mx, My, Mz );
4440}
4541
@@ -317,10 +313,6 @@ bool AABB::isNull(void) const {
317313 return (mBoxType == BOXTYPE_NULL );
318314}
319315
320- bool AABB::isFinite (void ) const {
321- return (mBoxType == BOXTYPE_FINITE );
322- }
323-
324316void AABB::setInfinite () {
325317 mBoxType = BOXTYPE_INFINITE ;
326318}
@@ -329,6 +321,14 @@ bool AABB::isInfinite(void) const {
329321 return (mBoxType == BOXTYPE_INFINITE );
330322}
331323
324+ void AABB::setFinite () {
325+ mBoxType = BOXTYPE_FINITE ;
326+ }
327+
328+ bool AABB::isFinite (void ) const {
329+ return (mBoxType == BOXTYPE_FINITE );
330+ }
331+
332332bool AABB::intersects (const AABB & b2) const {
333333 if (this ->isNull () || b2.isNull ())
334334 return false ;
0 commit comments