diff --git a/Framework/Geometry/Point.h b/Framework/Geometry/Point.h index f05bd31d1ca628f1f32834a9e6d6300e6ef2578c..55dfa2950a1d5452bb9065ca4a814d4ee7562dee 100644 --- a/Framework/Geometry/Point.h +++ b/Framework/Geometry/Point.h @@ -37,6 +37,9 @@ namespace corsika::geometry { // TODO: this should be private or protected, we don NOT want to expose numbers // without reference to outside: auto GetCoordinates() const { return BaseVector<length_d>::qVector; } + auto GetX() const { return BaseVector<length_d>::qVector.GetX(); } + auto GetY() const { return BaseVector<length_d>::qVector.GetY(); } + auto GetZ() const { return BaseVector<length_d>::qVector.GetZ(); } /// this always returns a QuantityVector as triple auto GetCoordinates(CoordinateSystem const& pCS) const { diff --git a/Framework/Geometry/QuantityVector.h b/Framework/Geometry/QuantityVector.h index ab57a994db6cba3cce60ab3acdb028b69de4c3b1..d27b7d08dafab1daeb5eabbe91bab88f4e074c63 100644 --- a/Framework/Geometry/QuantityVector.h +++ b/Framework/Geometry/QuantityVector.h @@ -55,6 +55,12 @@ namespace corsika::geometry { return Quantity(phys::units::detail::magnitude_tag, eVector[index]); } + auto GetX() const { return Quantity(phys::units::detail::magnitude_tag, eVector[0]); } + + auto GetY() const { return Quantity(phys::units::detail::magnitude_tag, eVector[1]); } + + auto GetZ() const { return Quantity(phys::units::detail::magnitude_tag, eVector[2]); } + auto norm() const { return Quantity(phys::units::detail::magnitude_tag, eVector.norm()); }