scatter 0.1.0
Arrow.hpp
1/*
2 * Copyright (C) Tobias Löw (tobi.loew@protonmail.ch)
3 *
4 * This file is part of Scatter
5 *
6 * Scatter is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Scatter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Scatter. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <array>
23#include <scatter/Point.hpp>
24
25namespace scatter
26{
31 class Arrow
32 {
33 public:
41 Arrow(const Point &p1, const Point &p2);
42
51 Arrow(const Point &p1, const double &length, const double &angle);
52
57 virtual ~Arrow();
58
64 const std::array<Point, 4> &getPoints() const;
65
66 protected:
67 private:
69 std::array<Point, 4> points_;
70 };
71
72} // namespace scatter
[brief description]
Definition Arrow.hpp:32
Arrow(const Point &p1, const Point &p2)
constructor from two Point
Arrow(const Point &p1, const double &length, const double &angle)
constructor from start Point, angle and length
virtual ~Arrow()
destructor
const std::array< Point, 4 > & getPoints() const
access the Point array representing the Arrow
[brief description]
Definition Point.hpp:29