Add missing findRayIntersection arguments

This commit is contained in:
Dale Glass 2022-06-06 23:25:30 +02:00
parent c4ecd39d70
commit f285cb4259

View file

@ -27,8 +27,9 @@ void AABoxCubeTests::raycastOutHitsXMinFace() {
float distance;
BoxFace face;
glm::vec3 surfaceNormal;
glm::vec3 invDirection; //FIXME -- what should this be set to?
bool intersects = box.findRayIntersection(origin, direction, distance, face, surfaceNormal);
bool intersects = box.findRayIntersection(origin, direction, invDirection, distance, face, surfaceNormal);
QCOMPARE(intersects, true);
QCOMPARE(distance, 0.5f);
@ -46,8 +47,10 @@ void AABoxCubeTests::raycastOutHitsXMaxFace () {
float distance;
BoxFace face;
glm::vec3 surfaceNormal;
glm::vec3 invDirection; //FIXME -- what should this be set to?
bool intersects = box.findRayIntersection(origin, direction, distance, face, surfaceNormal);
bool intersects = box.findRayIntersection(origin, direction, invDirection, distance, face, surfaceNormal);
QCOMPARE(intersects, true);
QCOMPARE(distance, 0.5f);
@ -64,8 +67,9 @@ void AABoxCubeTests::raycastInHitsXMinFace () {
float distance;
BoxFace face;
glm::vec3 surfaceNormal;
glm::vec3 invDirection; //FIXME -- what should this be set to?
bool intersects = box.findRayIntersection(origin, direction, distance, face, surfaceNormal);
bool intersects = box.findRayIntersection(origin, direction, invDirection, distance, face, surfaceNormal);
QCOMPARE(intersects, true);
QCOMPARE(distance, 0.25f);