12 #include <corsika/framework/geometry/BaseVector.hpp> 13 #include <corsika/framework/geometry/QuantityVector.hpp> 29 template <
typename TDimension>
30 class Vector :
public BaseVector<TDimension> {
33 using quantity_square_type =
34 decltype(std::declval<quantity_type>() * std::declval<quantity_type>());
37 : BaseVector<TDimension>(pCS, pQVector) {}
40 quantity_type
const z)
41 : BaseVector<TDimension>(cs, QuantityVector<TDimension>(x, y, z)) {}
109 template <
typename TDimension2>
112 template <
typename TDimension2>
115 Vector operator+(Vector<TDimension>
const& pVec)
const;
117 Vector operator-(Vector<TDimension>
const& pVec)
const;
119 auto& operator*=(
double const p);
121 template <
typename TScalarDim>
123 template <
typename TScalarDim>
126 auto operator*(
double const p)
const;
128 auto operator/(
double const p)
const;
130 auto& operator+=(Vector<TDimension>
const& pVec);
132 auto& operator-=(Vector<TDimension>
const& pVec);
134 auto operator-()
const;
136 auto normalized()
const;
138 template <
typename TDimension2>
139 auto cross(Vector<TDimension2>
const& pV)
const;
141 template <
typename TDimension2>
142 auto dot(Vector<TDimension2>
const& pV)
const;
147 #include <corsika/detail/framework/geometry/Vector.inl> void rebase(CoordinateSystemPtr const &pCS)
Import and extend the phys::units package.
class "quantity" is the heart of the library.
The cascade namespace assembles all objects needed to simulate full particles cascades.
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
quantity_type getNorm() const
auto getParallelProjectionOnto(Vector< TDimension2 > const &pVec, CoordinateSystemPtr const &pCS) const
QuantityVector< TDimension > const & getComponents() const
quantity_square_type getSquaredNorm() const