Browse Source

Math/Geometry: improve assertion message.

pull/226/head
Vladimír Vondruš 8 years ago
parent
commit
be3dcc6fa0
  1. 2
      src/Magnum/Math/Geometry/Intersection.h
  2. 2
      src/Magnum/Math/Geometry/Test/IntersectionTest.cpp

2
src/Magnum/Math/Geometry/Intersection.h

@ -525,7 +525,7 @@ template<class T> bool sphereConeView(
const Vector3<T>& sphereCenter, const T sphereRadius, const Matrix4<T>& coneView, const Vector3<T>& sphereCenter, const T sphereRadius, const Matrix4<T>& coneView,
const T sinAngle, const T cosAngle, const T tanAngle) const T sinAngle, const T cosAngle, const T tanAngle)
{ {
CORRADE_ASSERT(coneView.isRigidTransformation(), "Math::Geometry::Intersection::sphereConeView(): coneView must be rigid", false); CORRADE_ASSERT(coneView.isRigidTransformation(), "Math::Geometry::Intersection::sphereConeView(): coneView does not represent a rigid transformation", false);
/* Transform the sphere so that we can test against Z axis aligned origin /* Transform the sphere so that we can test against Z axis aligned origin
cone instead */ cone instead */

2
src/Magnum/Math/Geometry/Test/IntersectionTest.cpp

@ -369,7 +369,7 @@ void IntersectionTest::sphereConeView() {
Error redirectError{&out}; Error redirectError{&out};
CORRADE_VERIFY(!Intersection::sphereConeView(center, 1.0f, Matrix4{ZeroInit}, angle)); CORRADE_VERIFY(!Intersection::sphereConeView(center, 1.0f, Matrix4{ZeroInit}, angle));
CORRADE_COMPARE(out.str(), "Math::Geometry::Intersection::sphereConeView(): coneView must be rigid\n"); CORRADE_COMPARE(out.str(), "Math::Geometry::Intersection::sphereConeView(): coneView does not represent a rigid transformation\n");
} }
void IntersectionTest::rangeCone() { void IntersectionTest::rangeCone() {

Loading…
Cancel
Save