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

Method transform

radiantcore/patch/Patch.cpp:212–230  ·  view source on GitHub ↗

Transform this patch as defined by the transformation matrix

Source from the content-addressed store, hash-verified

210
211// Transform this patch as defined by the transformation matrix <matrix>
212void Patch::transform(const Matrix4& matrix)
213{
214 // Cycle through all the patch control vertices and transform the points
215 for (PatchControlIter i = _ctrlTransformed.begin();
216 i != _ctrlTransformed.end();
217 ++i)
218 {
219 i->vertex = matrix.transformPoint(i->vertex);
220 }
221
222 // Check the handedness of the matrix and invert it if needed
223 if(matrix.getHandedness() == Matrix4::LEFTHANDED)
224 {
225 PatchControlArray_invert(_ctrlTransformed, _width, _height);
226 }
227
228 // Mark this patch as changed
229 transformChanged();
230}
231
232// Called if the patch has changed, so that the dirty flags are set
233void Patch::transformChanged()

Callers 2

evaluateTransformMethod · 0.45
transformComponentsMethod · 0.45

Calls 5

PatchControlArray_invertFunction · 0.85
getHandednessMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
transformPointMethod · 0.45

Tested by

no test coverage detected