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

Function shiftTexture

radiantcore/selection/algorithm/Shader.cpp:509–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509void shiftTexture(const Vector2& shift)
510{
511 std::string command("shiftTexture: ");
512 command += "s=" + string::to_string(shift[0]) + ", t=" + string::to_string(shift[1]);
513
514 UndoableCommand undo(command);
515
516 GlobalSelectionSystem().foreachFace([&] (IFace& face)
517 {
518 face.shiftTexdefByPixels(static_cast<float>(shift[0]), static_cast<float>(shift[1]));
519 });
520 GlobalSelectionSystem().foreachPatch([&] (IPatch& patch)
521 {
522 patch.translateTexture(static_cast<float>(shift[0]), static_cast<float>(shift[1]));
523 });
524
525 SceneChangeNotify();
526 // Update the Texture Tools
527 radiant::TextureChangedMessage::Send();
528}
529
530void scaleTexture(const Vector2& scale)
531{

Callers 5

shiftTextureLeftFunction · 0.85
shiftTextureRightFunction · 0.85
shiftTextureUpFunction · 0.85
shiftTextureDownFunction · 0.85
shiftTextureCmdFunction · 0.85

Calls 6

SceneChangeNotifyFunction · 0.85
foreachFaceMethod · 0.80
shiftTexdefByPixelsMethod · 0.80
foreachPatchMethod · 0.80
translateTextureMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected