From 5088f3b421d63eecca6672de1961c434a2f776d7 Mon Sep 17 00:00:00 2001 From: Matthew Mott Date: Thu, 19 May 2022 20:52:44 +0100 Subject: [PATCH] Remove unused SelectionTest::TestLines() --- include/iselectiontest.h | 1 - libs/selection/SelectionVolume.h | 12 ------------ .../selection/manipulators/RotateManipulator.cpp | 3 +-- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/iselectiontest.h b/include/iselectiontest.h index 3483b854b5..b578fd0dab 100644 --- a/include/iselectiontest.h +++ b/include/iselectiontest.h @@ -231,7 +231,6 @@ class SelectionTest virtual void TestPoint(const Vector3& point, SelectionIntersection& best) = 0; virtual void TestPolygon(const VertexPointer& vertices, std::size_t count, SelectionIntersection& best) = 0; virtual void TestLineStrip(const VertexPointer& vertices, std::size_t count, SelectionIntersection& best) = 0; - virtual void TestLines(const VertexPointer& vertices, std::size_t count, SelectionIntersection& best) = 0; virtual void TestTriangles(const VertexPointer& vertices, const IndexPointer& indices, SelectionIntersection& best) = 0; virtual void TestQuads(const VertexPointer& vertices, const IndexPointer& indices, SelectionIntersection& best) = 0; virtual void TestQuadStrip(const VertexPointer& vertices, const IndexPointer& indices, SelectionIntersection& best) = 0; diff --git a/libs/selection/SelectionVolume.h b/libs/selection/SelectionVolume.h index de88ca80bc..94ba5bda11 100644 --- a/libs/selection/SelectionVolume.h +++ b/libs/selection/SelectionVolume.h @@ -90,18 +90,6 @@ class SelectionVolume : } } - void TestLines(const VertexPointer& vertices, std::size_t count, SelectionIntersection& best) override - { - if (count == 0) - return; - Vector4 clipped[9]; - for (VertexPointer::iterator i = vertices.begin(), end = i + count; i != end; i += 2) - { - BestPoint(clipLine(_local2view, *i, *(i + 1), clipped), clipped, - best, _cull); - } - } - void TestTriangles(const VertexPointer& vertices, const IndexPointer& indices, SelectionIntersection& best) override { Vector4 clipped[9]; diff --git a/radiantcore/selection/manipulators/RotateManipulator.cpp b/radiantcore/selection/manipulators/RotateManipulator.cpp index 1dcd07bf2e..354e6a6ea7 100644 --- a/radiantcore/selection/manipulators/RotateManipulator.cpp +++ b/radiantcore/selection/manipulators/RotateManipulator.cpp @@ -4,6 +4,7 @@ #include "selection/SelectionPool.h" #include "selection/BestPoint.h" #include "selection/TransformationVisitors.h" +#include "registry/registry.h" #include namespace selection @@ -198,7 +199,6 @@ void RotateManipulator::testSelect(SelectionTest& test, const Matrix4& pivot2wor } else { - { { Matrix4 local2view(test.getVolume().GetViewProjection().getMultipliedBy(_local2worldX)); @@ -222,7 +222,6 @@ void RotateManipulator::testSelect(SelectionTest& test, const Matrix4& pivot2wor LineStrip_BestPoint(local2view, &_circleZ.getRawPoints().front(), _circleZ.getRawPoints().size(), best); selector.addSelectable(best, &_selectableZ); } - } { Matrix4 local2view(test.getVolume().GetViewProjection().getMultipliedBy(_pivot2World._viewpointSpace));