| 150 | }; |
| 151 | |
| 152 | void validateVertex(const SceneBuilder::Mesh::Vertex& v, size_t& invalidCount, size_t& zeroCount) |
| 153 | { |
| 154 | auto isInvalid = [](const auto& x) |
| 155 | { |
| 156 | return any(isinf(x) || isnan(x)); |
| 157 | }; |
| 158 | auto isZero = [](const auto& x) |
| 159 | { |
| 160 | return length(x) < 1e-6f; |
| 161 | }; |
| 162 | |
| 163 | if (isInvalid(v.position) || isInvalid(v.normal) || isInvalid(v.tangent) || isInvalid(v.texCrd) || isInvalid(v.boneWeights)) invalidCount++; |
| 164 | if (isZero(v.normal) || isZero(v.tangent.xyz())) zeroCount++; |
| 165 | } |
| 166 | |
| 167 | bool compareVertices(const SceneBuilder::Mesh::Vertex& lhs, const SceneBuilder::Mesh::Vertex& rhs, float threshold = 1e-6f) |
| 168 | { |
no test coverage detected