CORSIKA
@c8_version@
The framework to simulate particle cascades for astroparticle physics
Point.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
11
#include <
corsika/framework/core/PhysicalUnits.hpp
>
12
#include <corsika/framework/geometry/BaseVector.hpp>
13
#include <corsika/framework/geometry/QuantityVector.hpp>
14
#include <corsika/framework/geometry/Vector.hpp>
15
16
namespace
corsika
{
17
22
class
Point
:
public
BaseVector
<length_d> {
23
24
public
:
25
Point
(
CoordinateSystemPtr
const
& pCS,
QuantityVector<length_d>
const
& pQVector)
26
:
BaseVector<length_d>
(pCS, pQVector) {}
27
28
Point
(
CoordinateSystemPtr
const
& cs,
LengthType
x,
LengthType
y,
LengthType
z)
29
:
BaseVector<length_d>
(cs, {x, y, z}) {}
30
34
inline
QuantityVector<length_d>
const
&
getCoordinates
()
const
;
35
inline
QuantityVector<length_d>
&
getCoordinates
();
36
43
inline
QuantityVector<length_d>
getCoordinates
(
CoordinateSystemPtr
const
& pCS)
const
;
44
52
inline
QuantityVector<length_d>
&
getCoordinates
(
CoordinateSystemPtr
const
& pCS);
53
63
inline
LengthType
getX(
CoordinateSystemPtr
const
& pCS)
const
;
64
inline
LengthType
getY(
CoordinateSystemPtr
const
& pCS)
const
;
65
inline
LengthType
getZ(
CoordinateSystemPtr
const
& pCS)
const
;
72
inline
void
rebase
(
CoordinateSystemPtr
const
& pCS);
73
74
inline
Point
operator+(
Vector<length_d>
const
& pVec)
const
;
75
inline
Point
operator-(
Vector<length_d>
const
& pVec)
const
;
76
80
inline
Vector<length_d>
operator-(
Point
const
& pB)
const
;
81
};
82
83
/*
84
* calculates the distance between two points
85
*/
86
inline
LengthType
distance(
Point
const
& p1,
Point
const
& p2);
87
88
}
// namespace corsika
89
90
#include <corsika/detail/framework/geometry/Point.inl>
corsika::Point
Definition:
Point.hpp:22
PhysicalUnits.hpp
Import and extend the phys::units package.
corsika::BaseVector
Definition:
BaseVector.hpp:26
corsika::QuantityVector< length_d >
phys::units::quantity< phys::units::length_d, double >
corsika::Point::rebase
void rebase(CoordinateSystemPtr const &pCS)
corsika
`, since they are used everywhere as integral part of the framework.
Definition:
BoundaryCrossingProcess.hpp:14
corsika::CoordinateSystemPtr
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
Definition:
CoordinateSystem.hpp:35
corsika::Vector< length_d >
corsika::Point::getCoordinates
QuantityVector< length_d > const & getCoordinates() const
corsika
framework
geometry
Point.hpp
Generated by
1.8.13