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

Function scaleTexture

radiantcore/selection/algorithm/Shader.cpp:530–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530void scaleTexture(const Vector2& scale)
531{
532 std::string command("scaleTexture: ");
533 command += "sScale=" + string::to_string(scale[0]) + ", tScale=" + string::to_string(scale[1]);
534
535 UndoableCommand undo(command);
536
537 // Prepare the 1.0-based scale value (incoming values are relative to 0)
538 Vector2 patchScale = scale + Vector2(1, 1);
539
540 // Flip every node about its own center point
541 GlobalSelectionSystem().foreachFace([&](IFace& face) { TextureScaler::ScaleFace(face, patchScale); });
542 GlobalSelectionSystem().foreachPatch([&](IPatch& patch) { TextureScaler::ScalePatch(patch, patchScale); });
543}
544
545void rotateTexture(const float angle)
546{

Callers 4

scaleTextureLeftFunction · 0.85
scaleTextureRightFunction · 0.85
scaleTextureUpFunction · 0.85
scaleTextureDownFunction · 0.85

Calls 12

rMessageFunction · 0.85
to_lower_copyFunction · 0.85
scaleTextureUpFunction · 0.85
scaleTextureDownFunction · 0.85
scaleTextureLeftFunction · 0.85
scaleTextureRightFunction · 0.85
foreachFaceMethod · 0.80
foreachPatchMethod · 0.80
getVector2Method · 0.80
to_stringFunction · 0.50
sizeMethod · 0.45
getStringMethod · 0.45

Tested by

no test coverage detected