16 #include <corsika/framework/geometry/QuantityVector.hpp> 19 #include <Eigen/Dense> 25 typedef Eigen::Transform<double, 3, Eigen::Affine> EigenTransform;
26 typedef Eigen::Translation<double, 3> EigenTranslation;
50 template <
typename TDim>
57 template <
typename TDim>
65 template <
typename TDim>
100 : referenceCS_(referenceCS)
107 : referenceCS_(
nullptr)
108 , transf_(EigenTransform::Identity()) {}
121 bool isRoot()
const {
return !referenceCS_; }
125 EigenTransform
const& getTransform()
const;
141 template <
typename TDim>
144 template <
typename TDim>
148 template <
typename TDim>
157 EigenTransform transf_;
176 #include <corsika/detail/framework/geometry/CoordinateSystem.inl> friend CoordinateSystemPtr const & get_root_CoordinateSystem()
this is the only way to create ONE unique root CS
Import and extend the phys::units package.
CoordinateSystemPtr make_translation(CoordinateSystemPtr const &cs, QuantityVector< length_d > const &vector)
Creates new CoordinateSystemPtr by translation along vector.
friend CoordinateSystemPtr make_rotation(CoordinateSystemPtr const &cs, QuantityVector< TDim > const &axis, double const angle)
creates a new CoordinateSystem, rotated around axis by angle.
friend CoordinateSystemPtr make_translationAndRotation(CoordinateSystemPtr const &cs, QuantityVector< length_d > const &translation, QuantityVector< TDim > const &axis, double const angle)
creates a new CoordinateSystem, translated by translation and rotated around axis by angle...
friend CoordinateSystemPtr make_translation(CoordinateSystemPtr const &cs, QuantityVector< length_d > const &vector)
Creates new CoordinateSystemPtr by translation along vector.
CoordinateSystemPtr const & get_root_CoordinateSystem()
this is the only way to create ONE unique root CS
CORSIKA8 logging utilities.
CoordinateSystemPtr make_translationAndRotation(CoordinateSystemPtr const &cs, QuantityVector< length_d > const &translation, QuantityVector< TDim > const &axis, double const angle)
creates a new CoordinateSystem, translated by translation and rotated around axis by angle...
bool isRoot() const
Checks, if this is the unique ROOT CS.
`, since they are used everywhere as integral part of the framework.
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
A class to store the reference coordinate system for a geometric object.
CoordinateSystemPtr make_rotation(CoordinateSystemPtr const &cs, QuantityVector< TDim > const &axis, double const angle)
creates a new CoordinateSystem, rotated around axis by angle.
friend CoordinateSystemPtr make_rotationToZ(CoordinateSystemPtr const &cs, Vector< TDim > const &vVec)
creates a new CoordinateSystem in which vVec points in direction of the new z-axis, vVec
CoordinateSystemPtr make_rotationToZ(CoordinateSystemPtr const &cs, Vector< TDim > const &vVec)
creates a new CoordinateSystem in which vVec points in direction of the new z-axis, vVec
EigenTransform get_transformation(CoordinateSystem const &c1, CoordinateSystem const &c2)
Transformation matrix from one reference system to another.