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

Function patchHasVertex

test/algorithm/Primitives.h:165–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165inline bool patchHasVertex(const IPatch& patch, const Vector3& position)
166{
167 for (std::size_t col = 0; col < patch.getWidth(); ++col)
168 {
169 for (std::size_t row = 0; row < patch.getHeight(); ++row)
170 {
171 if (math::isNear(patch.ctrlAt(row, col).vertex, position, 0.01))
172 {
173 return true;
174 }
175 }
176 }
177
178 return false;
179}
180
181inline bool patchHasVertices(const IPatch& patch, const std::vector<Vector3>& positions)
182{

Callers 2

TEST_FFunction · 0.85
patchHasVerticesFunction · 0.85

Calls 3

isNearFunction · 0.50
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected