MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / expectVertexWithNormal

Function expectVertexWithNormal

test/Models.cpp:254–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254void expectVertexWithNormal(const model::IModelSurface& surface, const Vertex3& vertex, const Normal3& normal)
255{
256 EXPECT_TRUE(surfaceHasVertexWith(surface, [&](const MeshVertex& v)->bool
257 {
258 return math::isNear(v.vertex, vertex, render::VertexEpsilon) && v.normal.dot(normal) > 1.0 - render::NormalEpsilon;
259 })) << "Could not find a vertex with xyz = " << vertex << " and normal " << normal;
260}
261
262TEST_F(AseImportTest, VertexNormals)
263{

Callers 1

TEST_FFunction · 0.85

Calls 3

surfaceHasVertexWithFunction · 0.85
isNearFunction · 0.50
dotMethod · 0.45

Tested by

no test coverage detected