Add CAABox::booleanIntersection

This commit is contained in:
2017-01-20 21:57:34 -08:00
parent caff50dfa5
commit e7a72d02b1
7 changed files with 80 additions and 20 deletions

View File

@@ -33,6 +33,16 @@ int main()
CVector3f point(-90, 67, -105);
CVector3f closestPoint = test.closestPointAlongVector(point);
CVector3d doubleVec(100, -100, -200);
zeus::CAABox aabb1{208.9f, -83.9f, 17.7f, 211.9f, -80.9f, 25.7f};
zeus::CVector3f center1 = aabb1.center();
zeus::CVector3f extents1 = aabb1.extents() * 2.f;
zeus::CAABox aabb2{211.8f, -81.4f, 22.3f, 212.8, -80.4f, 25.0f};
zeus::CVector3f center2 = aabb2.center();
zeus::CVector3f extents2 = aabb2.extents() * 2.f;
zeus::CAABox diffAABB = aabb1.booleanIntersection(aabb2);
zeus::CVector3f centerDiff = aabb2.center();
zeus::CVector3f extentsDiff = aabb2.extents() * 2.f;
assert(t.isEqu(t));
assert(test.inside(test));