Skip to content

Commit

Permalink
#5746: Move TextureToolRotateManipulator class to textool namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Sep 17, 2021
1 parent 8e37b1f commit 94c5212
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion radiantcore/CMakeLists.txt
Expand Up @@ -248,7 +248,6 @@ add_library(radiantcore MODULE
selection/manipulators/ModelScaleManipulator.cpp
selection/manipulators/RotateManipulator.cpp
selection/manipulators/ScaleManipulator.cpp
selection/manipulators/TextureToolRotateManipulator.cpp
selection/manipulators/TranslateManipulator.cpp
selection/RadiantSelectionSystem.cpp
selection/SelectedNodeList.cpp
Expand All @@ -261,6 +260,7 @@ add_library(radiantcore MODULE
selection/shaderclipboard/ShaderClipboard.cpp
selection/shaderclipboard/Texturable.cpp
selection/textool/TextureToolManipulationPivot.cpp
selection/textool/TextureToolRotateManipulator.cpp
selection/textool/TextureToolSceneGraph.cpp
selection/textool/TextureToolSelectionSystem.cpp
selection/TransformationVisitors.cpp
Expand Down
Expand Up @@ -7,7 +7,7 @@
#include "pivot.h"
#include "math/Matrix3.h"

namespace selection
namespace textool
{

void TextureRotator::beginTransformation(const Matrix4& pivot2world, const VolumeTest& view, const Vector2& devicePoint)
Expand Down Expand Up @@ -89,12 +89,12 @@ void TextureToolRotateManipulator::setId(std::size_t id)
_id = id;
}

IManipulator::Type TextureToolRotateManipulator::getType() const
selection::IManipulator::Type TextureToolRotateManipulator::getType() const
{
return IManipulator::Rotate;
}

IManipulator::Component* TextureToolRotateManipulator::getActiveComponent()
selection::IManipulator::Component* TextureToolRotateManipulator::getActiveComponent()
{
return &_rotator;
}
Expand All @@ -111,7 +111,7 @@ bool TextureToolRotateManipulator::isSelected() const

void TextureToolRotateManipulator::testSelect(SelectionTest& test, const Matrix4& pivot2world)
{
SelectionPool selector;
selection::SelectionPool selector;

test.BeginMesh(pivot2world, false);

Expand All @@ -135,9 +135,9 @@ void TextureToolRotateManipulator::renderComponents(const Matrix4& pivot2World)
{
_shader = GlobalRenderSystem().capture("$WIRE_OVERLAY");

auto manipulatorFontStyle = registry::getValue<std::string>(RKEY_MANIPULATOR_FONTSTYLE) == "Sans" ?
auto manipulatorFontStyle = registry::getValue<std::string>(selection::RKEY_MANIPULATOR_FONTSTYLE) == "Sans" ?
IGLFont::Style::Sans : IGLFont::Style::Mono;
auto manipulatorFontSize = registry::getValue<int>(RKEY_MANIPULATOR_FONTSIZE);
auto manipulatorFontSize = registry::getValue<int>(selection::RKEY_MANIPULATOR_FONTSIZE);

_glFont = GlobalOpenGL().getFont(manipulatorFontStyle, manipulatorFontSize);
}
Expand Down
Expand Up @@ -2,15 +2,15 @@

#include "imanipulator.h"
#include "../BasicSelectable.h"
#include "ManipulatorComponents.h"
#include "selection/manipulators/ManipulatorComponents.h"
#include "../Renderables.h"
#include "selection/textool/TextureToolManipulationPivot.h"

namespace selection
namespace textool
{

class TextureRotator :
public ManipulatorComponentBase
public selection::ManipulatorComponentBase
{
private:
Vector2 _start;
Expand Down Expand Up @@ -43,14 +43,14 @@ class TextureRotator :
};

class TextureToolRotateManipulator :
public ITextureToolManipulator
public selection::ITextureToolManipulator
{
private:
textool::TextureToolManipulationPivot& _pivot;

std::size_t _id;

BasicSelectable _selectableZ;
selection::BasicSelectable _selectableZ;
TextureRotator _rotator;
RenderableCircle _renderableCircle;

Expand Down
4 changes: 2 additions & 2 deletions radiantcore/selection/textool/TextureToolSelectionSystem.cpp
Expand Up @@ -2,7 +2,7 @@

#include "itextstream.h"
#include "module/StaticModule.h"
#include "../manipulators/TextureToolRotateManipulator.h"
#include "../textool/TextureToolRotateManipulator.h"

namespace textool
{
Expand All @@ -24,7 +24,7 @@ void TextureToolSelectionSystem::initialiseModule(const IApplicationContext& ctx
rMessage() << getName() << "::initialiseModule called." << std::endl;

_manipulationPivot.setFromMatrix(Matrix4::getIdentity());
registerManipulator(std::make_shared<selection::TextureToolRotateManipulator>(_manipulationPivot));
registerManipulator(std::make_shared<TextureToolRotateManipulator>(_manipulationPivot));

_defaultManipulatorType = selection::IManipulator::Rotate;
setActiveManipulator(_defaultManipulatorType);
Expand Down
4 changes: 2 additions & 2 deletions tools/msvc/DarkRadiantCore.vcxproj
Expand Up @@ -660,7 +660,6 @@
<ClCompile Include="..\..\radiantcore\selection\manipulators\ModelScaleManipulator.cpp" />
<ClCompile Include="..\..\radiantcore\selection\manipulators\RotateManipulator.cpp" />
<ClCompile Include="..\..\radiantcore\selection\manipulators\ScaleManipulator.cpp" />
<ClCompile Include="..\..\radiantcore\selection\manipulators\TextureToolRotateManipulator.cpp" />
<ClCompile Include="..\..\radiantcore\selection\manipulators\TranslateManipulator.cpp" />
<ClCompile Include="..\..\radiantcore\selection\RadiantSelectionSystem.cpp" />
<ClCompile Include="..\..\radiantcore\selection\SceneManipulationPivot.cpp" />
Expand All @@ -674,6 +673,7 @@
<ClCompile Include="..\..\radiantcore\selection\shaderclipboard\ShaderClipboard.cpp" />
<ClCompile Include="..\..\radiantcore\selection\shaderclipboard\Texturable.cpp" />
<ClCompile Include="..\..\radiantcore\selection\textool\TextureToolManipulationPivot.cpp" />
<ClCompile Include="..\..\radiantcore\selection\textool\TextureToolRotateManipulator.cpp" />
<ClCompile Include="..\..\radiantcore\selection\textool\TextureToolSceneGraph.cpp" />
<ClCompile Include="..\..\radiantcore\selection\textool\TextureToolSelectionSystem.cpp" />
<ClCompile Include="..\..\radiantcore\selection\TransformationVisitors.cpp" />
Expand Down Expand Up @@ -1013,7 +1013,6 @@
<ClInclude Include="..\..\radiantcore\selection\manipulators\ModelScaleManipulator.h" />
<ClInclude Include="..\..\radiantcore\selection\manipulators\RotateManipulator.h" />
<ClInclude Include="..\..\radiantcore\selection\manipulators\ScaleManipulator.h" />
<ClInclude Include="..\..\radiantcore\selection\manipulators\TextureToolRotateManipulator.h" />
<ClInclude Include="..\..\radiantcore\selection\manipulators\TranslateManipulator.h" />
<ClInclude Include="..\..\radiantcore\selection\RadiantSelectionSystem.h" />
<ClInclude Include="..\..\radiantcore\selection\Remap.h" />
Expand All @@ -1032,6 +1031,7 @@
<ClInclude Include="..\..\radiantcore\selection\textool\NodeBase.h" />
<ClInclude Include="..\..\radiantcore\selection\textool\PatchNode.h" />
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolManipulationPivot.h" />
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolRotateManipulator.h" />
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolSceneGraph.h" />
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolSelectionSystem.h" />
<ClInclude Include="..\..\radiantcore\selection\TransformationVisitors.h" />
Expand Down
12 changes: 6 additions & 6 deletions tools/msvc/DarkRadiantCore.vcxproj.filters
Expand Up @@ -1087,12 +1087,12 @@
<ClCompile Include="..\..\radiantcore\selection\SceneManipulationPivot.cpp">
<Filter>src\selection</Filter>
</ClCompile>
<ClCompile Include="..\..\radiantcore\selection\manipulators\TextureToolRotateManipulator.cpp">
<Filter>src\selection\manipulators</Filter>
</ClCompile>
<ClCompile Include="..\..\radiantcore\selection\textool\TextureToolManipulationPivot.cpp">
<Filter>src\selection\textool</Filter>
</ClCompile>
<ClCompile Include="..\..\radiantcore\selection\textool\TextureToolRotateManipulator.cpp">
<Filter>src\selection\textool</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\radiantcore\modulesystem\ModuleLoader.h">
Expand Down Expand Up @@ -2208,9 +2208,6 @@
<ClInclude Include="..\..\radiantcore\map\format\Quake3Utils.h">
<Filter>src\map\format</Filter>
</ClInclude>
<ClInclude Include="..\..\radiantcore\selection\manipulators\TextureToolRotateManipulator.h">
<Filter>src\selection\manipulators</Filter>
</ClInclude>
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolSceneGraph.h">
<Filter>src\selection\textool</Filter>
</ClInclude>
Expand All @@ -2232,5 +2229,8 @@
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolManipulationPivot.h">
<Filter>src\selection\textool</Filter>
</ClInclude>
<ClInclude Include="..\..\radiantcore\selection\textool\TextureToolRotateManipulator.h">
<Filter>src\selection\textool</Filter>
</ClInclude>
</ItemGroup>
</Project>

0 comments on commit 94c5212

Please sign in to comment.