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

Method snapComponents

radiantcore/selection/textool/PatchNode.cpp:163–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void PatchNode::snapComponents(float snap)
164{
165 for (auto& vertex : _vertices)
166 {
167 if (vertex.isSelected())
168 {
169 auto& texcoord = vertex.getTexcoord();
170 texcoord.x() = float_snapped(texcoord.x(), snap);
171 texcoord.y() = float_snapped(texcoord.y(), snap);
172 }
173 }
174
175 _patch.updateTesselation(true);
176}
177
178void PatchNode::mergeComponentsWith(const Vector2& center)
179{

Callers

nothing calls this directly

Calls 6

float_snappedFunction · 0.85
getTexcoordMethod · 0.80
xMethod · 0.80
yMethod · 0.80
updateTesselationMethod · 0.80
isSelectedMethod · 0.45

Tested by

no test coverage detected