diff --git a/Framework/Geometry/CoordinateSystem.h b/Framework/Geometry/CoordinateSystem.h index 64e51167e9425c43cd727a3ec332417382710554..0f4e007eb937a778e890921fb486ffd00b104a4a 100644 --- a/Framework/Geometry/CoordinateSystem.h +++ b/Framework/Geometry/CoordinateSystem.h @@ -31,10 +31,6 @@ namespace corsika::geometry { CoordinateSystem const* reference = nullptr; EigenTransform transf; - CoordinateSystem(CoordinateSystem const& reference, EigenTransform const& transf) - : reference(&reference) - , transf(transf) {} - CoordinateSystem() : // for creating the root CS transf(EigenTransform::Identity()) {} @@ -48,6 +44,10 @@ namespace corsika::geometry { static EigenTransform GetTransformation(CoordinateSystem const& c1, CoordinateSystem const& c2); + CoordinateSystem(CoordinateSystem const& reference, EigenTransform const& transf) + : reference(&reference) + , transf(transf) {} + auto& operator=(const CoordinateSystem& pCS) { reference = pCS.reference; transf = pCS.transf; @@ -60,6 +60,9 @@ namespace corsika::geometry { return CoordinateSystem(*this, translation); } + /** + * creates a new CS in which vVec points in direction of the new z-axis + */ template <typename TDim> auto RotateToZ(Vector<TDim> vVec) const { auto const a = vVec.normalized().GetComponents(*this).eVector;