From 883b0e15bc495c4df193282e18152b0bcabf3c5b Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Tue, 2 Apr 2019 11:23:01 +0200
Subject: [PATCH] some getters -> style

---
 Framework/Geometry/Point.h          | 3 +++
 Framework/Geometry/QuantityVector.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/Framework/Geometry/Point.h b/Framework/Geometry/Point.h
index f05bd31d..55dfa295 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 2712c188..c606a293 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());
     }
-- 
GitLab