From 9a85a4842f4e674dd72d582778363faa5dcffc67 Mon Sep 17 00:00:00 2001 From: Moritz Kiehn <msmk@cern.ch> Date: Thu, 6 Apr 2017 16:10:37 +0000 Subject: [PATCH] Surfaces/PlanarBounds: simplify interface --- Core/include/ACTS/Surfaces/DiamondBounds.hpp | 2 +- Core/include/ACTS/Surfaces/EllipseBounds.hpp | 2 +- Core/include/ACTS/Surfaces/PlanarBounds.hpp | 19 +++++-------------- .../include/ACTS/Surfaces/RectangleBounds.hpp | 2 +- .../include/ACTS/Surfaces/TrapezoidBounds.hpp | 2 +- Core/include/ACTS/Surfaces/TriangleBounds.hpp | 2 +- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/Core/include/ACTS/Surfaces/DiamondBounds.hpp b/Core/include/ACTS/Surfaces/DiamondBounds.hpp index ac6ade05f..025a22625 100644 --- a/Core/include/ACTS/Surfaces/DiamondBounds.hpp +++ b/Core/include/ACTS/Surfaces/DiamondBounds.hpp @@ -163,7 +163,7 @@ public: distanceToBoundary(const Vector2D& lpos) const final override; /// Return the vertices - or, the points of the extremas - virtual const std::vector<Vector2D> + virtual std::vector<Vector2D> vertices() const final override; // Bounding box representation diff --git a/Core/include/ACTS/Surfaces/EllipseBounds.hpp b/Core/include/ACTS/Surfaces/EllipseBounds.hpp index 3de77084b..f31857609 100644 --- a/Core/include/ACTS/Surfaces/EllipseBounds.hpp +++ b/Core/include/ACTS/Surfaces/EllipseBounds.hpp @@ -156,7 +156,7 @@ public: averagePhi() const; /// Return the vertices - or, the points of the extremas - virtual const std::vector<Vector2D> + virtual std::vector<Vector2D> vertices() const final override; // Bounding box representation diff --git a/Core/include/ACTS/Surfaces/PlanarBounds.hpp b/Core/include/ACTS/Surfaces/PlanarBounds.hpp index 589cdbf80..3db6616d4 100644 --- a/Core/include/ACTS/Surfaces/PlanarBounds.hpp +++ b/Core/include/ACTS/Surfaces/PlanarBounds.hpp @@ -1,6 +1,6 @@ // This file is part of the ACTS project. // -// Copyright (C) 2016 ACTS project team +// Copyright (C) 2016-2017 ACTS project team // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -13,12 +13,15 @@ #ifndef ACTS_SURFACES_PLANARBOUNDS_H #define ACTS_SURFACES_PLANARBOUNDS_H 1 +#include <vector> + #include "ACTS/Surfaces/SurfaceBounds.hpp" namespace Acts { /// forward declare rectangle bounds as boundary box class RectangleBounds; + /// /// @class PlanarBounds /// @@ -28,20 +31,8 @@ class RectangleBounds; class PlanarBounds : public SurfaceBounds { public: - /// Default Constructor - /// - /// @param sStore is the store size for the initialisation - PlanarBounds(size_t sStore = 0) : SurfaceBounds(sStore) {} - - /// Destructor - virtual ~PlanarBounds() {} - - /// Virtual Constructor - virtual PlanarBounds* - clone() const = 0; - /// Return the vertices - or, the points of the extremas - virtual const std::vector<Vector2D> + virtual std::vector<Vector2D> vertices() const = 0; // Bounding box parameters diff --git a/Core/include/ACTS/Surfaces/RectangleBounds.hpp b/Core/include/ACTS/Surfaces/RectangleBounds.hpp index 5a5fe73d1..9a8590b87 100644 --- a/Core/include/ACTS/Surfaces/RectangleBounds.hpp +++ b/Core/include/ACTS/Surfaces/RectangleBounds.hpp @@ -117,7 +117,7 @@ public: halflengthY() const; /// Return the vertices - or, the points of the extremas - virtual const std::vector<Vector2D> + virtual std::vector<Vector2D> vertices() const final override; // Bounding box representation diff --git a/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp b/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp index ff087d09d..3453d8a39 100644 --- a/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp +++ b/Core/include/ACTS/Surfaces/TrapezoidBounds.hpp @@ -191,7 +191,7 @@ public: distanceToBoundary(const Vector2D& lpos) const final override; /// Return the vertices - or, the points of the extremas - virtual const std::vector<Vector2D> + virtual std::vector<Vector2D> vertices() const final override; // Bounding box representation diff --git a/Core/include/ACTS/Surfaces/TriangleBounds.hpp b/Core/include/ACTS/Surfaces/TriangleBounds.hpp index 7aa19da0a..a27f32739 100644 --- a/Core/include/ACTS/Surfaces/TriangleBounds.hpp +++ b/Core/include/ACTS/Surfaces/TriangleBounds.hpp @@ -117,7 +117,7 @@ public: distanceToBoundary(const Vector2D& lpos) const final override; /// This method returns the coordinates of vertices - const std::vector<Vector2D> + std::vector<Vector2D> vertices() const final override; // Bounding box representation -- GitLab