HomeWildfire Games

Adds Camera test for frustum.
AuditedrP22319

Description

Adds Camera test for frustum.

Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1927

Details

Auditors
Angen
Committed
vladislavbelovMay 29 2019, 10:12 PM
Reviewer
wraitii
Differential Revision
D1927: Adds Camera test for correct frustum
Parents
rP22318: Re-upload the uncompressed PNG files for the previous commits.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 7670
Build 12503: Post-Commit BuildJenkins

Event Timeline

Angen added a subscriber: Angen.May 30 2019, 7:38 AM

looks like build on linux is broken

Yep, can't build either:

Generating test_Camera.cpp
test_Camera.cpp
In file included from ../../../source/graphics/tests/test_Camera.cpp:17:0:
/home/<name>/0ad/source/graphics/tests/test_Camera.h: In member function ‘bool TestCamera::EqualPlanes(const CPlane&, const CPlane&) const’:
/home/<name>/0ad/source/graphics/tests/test_Camera.h:86:12: error: ‘fabsf’ is not a member of ‘std’
   if (std::fabsf(p1.m_Dist - p2.m_Dist) >= EPS)
            ^~~~~
/home/<name>/0ad/source/graphics/tests/test_Camera.h:86:12: note: suggested alternative: ‘fabs’
   if (std::fabsf(p1.m_Dist - p2.m_Dist) >= EPS)
            ^~~~~
            fabs
/home/<name>/0ad/source/graphics/tests/test_Camera.h:89:9: error: ‘fabsf’ is not a member of ‘std’
    std::fabsf(p1.m_Norm.X - p2.m_Norm.X) < EPS &&
         ^~~~~
/home/<name>/0ad/source/graphics/tests/test_Camera.h:89:9: note: suggested alternative: ‘fabs’
    std::fabsf(p1.m_Norm.X - p2.m_Norm.X) < EPS &&
         ^~~~~
         fabs
/home/<name>/0ad/source/graphics/tests/test_Camera.h:90:9: error: ‘fabsf’ is not a member of ‘std’
    std::fabsf(p1.m_Norm.Y - p2.m_Norm.Y) < EPS &&
         ^~~~~
/home/<name>/0ad/source/graphics/tests/test_Camera.h:90:9: note: suggested alternative: ‘fabs’
    std::fabsf(p1.m_Norm.Y - p2.m_Norm.Y) < EPS &&
         ^~~~~
         fabs
/home/<name>/0ad/source/graphics/tests/test_Camera.h:91:9: error: ‘fabsf’ is not a member of ‘std’
    std::fabsf(p1.m_Norm.Z - p2.m_Norm.Z) < EPS;
         ^~~~~
/home/<name>/0ad/source/graphics/tests/test_Camera.h:91:9: note: suggested alternative: ‘fabs’
    std::fabsf(p1.m_Norm.Z - p2.m_Norm.Z) < EPS;
         ^~~~~
         fabs
test.make:369: recipe for target 'obj/test_Release/test_Camera.o' failed
make[1]: *** [obj/test_Release/test_Camera.o] Error 1
Makefile:188: recipe for target 'test' failed
make: *** [test] Error 2
Angen raised a concern with this commit.May 30 2019, 10:35 AM

all jenkins builds are now broken :)

This commit now has outstanding concerns.May 30 2019, 10:35 AM
vladislavbelov added a comment.EditedMay 30 2019, 12:03 PM
In rP22319#33628, @Stan wrote:

Nope, I was wrong, I thought std::fasbf already presents in C++11. But it doesn't. The include can be added too (though it already presents in the include tree). Also it shouldn't break compilation of the pyrogenesis binary, only tests.

I'll fix it today. Thank you for testing!

Stan added a comment.EditedMay 30 2019, 12:06 PM
In rP22319#33628, @Stan wrote:

Nope, I was wrong, I thought std::fasbf already presents in C++11. But it doesn't. The include can be added too (though it already presents in the include tree). Also it shouldn't break compilation of the pyrogenesis binary, only tests.
I'll fix it today. Thank you for testing!

Well the bottom comment in the stackoverflow post says it is...

vladislavbelov added a comment.EditedMay 30 2019, 6:22 PM

Created a fix in D1937. Fixed in rP22321.

vladislavbelov requested verification of this commit.May 30 2019, 7:29 PM
This commit now requires verification by auditors.May 30 2019, 7:29 PM
Angen accepted this commit.May 30 2019, 8:02 PM
All concerns with this commit have now been addressed.May 30 2019, 8:02 PM