CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
Line.hpp
1 /*
2  * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
12 #include <corsika/framework/geometry/Point.hpp>
13 #include <corsika/framework/geometry/Vector.hpp>
14 #include <corsika/framework/geometry/PhysicalGeometry.hpp>
15 
16 namespace corsika {
17 
27  class Line {
28 
29  public:
30  Line(Point const& pR0, VelocityVector const& pV0)
31  : start_point_(pR0)
32  , velocity_(pV0) {}
33 
34  Point getPosition(TimeType const t) const;
35 
36  VelocityVector const& getVelocity(TimeType const) const;
37 
38  Point getPositionFromArclength(LengthType const l) const;
39 
40  LengthType getArcLength(TimeType const t1, TimeType const t2) const;
41 
42  TimeType getTimeFromArclength(LengthType const t) const;
43 
44  Point const& getStartPoint() const;
45 
46  DirectionVector getDirection() const;
47 
48  VelocityVector const& getVelocity() const;
49 
50  private:
51  Point start_point_;
52  VelocityVector velocity_;
53  };
54 
55 } // namespace corsika
56 
57 #include <corsika/detail/framework/geometry/Line.inl>
Import and extend the phys::units package.
A Line describes a movement in three dimensional space.
Definition: Line.hpp:27
`, since they are used everywhere as integral part of the framework.