MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / TEST

Function TEST

tests/cplusplus/Util/Projection.cpp:133–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133TEST(ParameterizedProjectionTest, MatchesUnparameterized) {
134 using namespace osvr::util;
135 namespace opts = osvr::util::projection_options;
136 double near = 0.1;
137 double far = 100;
138 auto rect = computeSymmetricFOVRect(50. * degrees, 40. * degrees, near);
139 auto paramMat = parameterizedCreateProjectionMatrix<opts::RightHandedInput |
140 opts::ZOutputSigned>(
141 rect, near, far);
142 auto unparamMat = createProjectionMatrix(rect, near, far);
143
144 for (int i = 0; i < 4; ++i) {
145 for (int j = 0; j < 4; ++j) {
146 ASSERT_EQ(paramMat(i, j), unparamMat(i, j));
147 }
148 }
149}

Callers

nothing calls this directly

Calls 2

computeSymmetricFOVRectFunction · 0.85
createProjectionMatrixFunction · 0.85

Tested by

no test coverage detected