14 #include <corsika/framework/geometry/Point.hpp> 28 using iterator = std::deque<Point>::iterator;
29 using const_iterator = std::deque<Point>::const_iterator;
40 Path(std::deque<Point>
const& points);
75 inline const_iterator
begin()
const;
80 inline const_iterator
end()
const;
85 inline iterator
begin();
90 inline iterator
end();
103 #include <corsika/detail/framework/geometry/Path.inl> int getNSegments() const
Get the number of steps in the path.
void addToEnd(Point const &point)
Add a new Point to the end of the path.
void removeFromEnd()
Remove a point from the end of the path.
Import and extend the phys::units package.
LengthType getLength() const
Get the total length of the path.
Point const & getPoint(std::size_t const index) const
Get a specific point of the path.
Path(Point const &point)
Create a Path with a given starting Point.
const_iterator end() const
Return an iterator to the end of the Path.
`, since they are used everywhere as integral part of the framework.
static constexpr quantity zero()
We need a "zero" of each type – for comparisons, to initialize running totals, etc.
const_iterator begin() const
Return an iterator to the start of the Path.
std::deque< Point > points_
The points that make up this path.
Point const & getEnd() const
Get the end point of the path.
LengthType length_
The length of the path.
Point const & getStart() const
Get the starting point of the path.
This class represents a (potentially) curved path between two points using N >= 1 straight-line segme...