Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/orange/surf/detail/SurfaceTransformer.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file orange/surf/detail/SurfaceTransformer.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include "geocel/Types.hh"
0010 #include "orange/transform/Transformation.hh"
0011 
0012 #include "../SurfaceFwd.hh"
0013 
0014 namespace celeritas
0015 {
0016 namespace detail
0017 {
0018 //---------------------------------------------------------------------------//
0019 /*!
0020  * Apply a transformation to a surface to get another surface.
0021  *
0022  * The transform gives the new origin and rotation for the surface: rotation is
0023  * applied first, then translation.
0024  */
0025 class SurfaceTransformer
0026 {
0027   public:
0028     //! Construct with the transformation to apply
0029     explicit SurfaceTransformer(Transformation const& trans) : tr_{trans} {}
0030 
0031     //// SURFACE FUNCTIONS ////
0032 
0033     template<Axis T>
0034     Plane operator()(PlaneAligned<T> const&) const;
0035 
0036     template<Axis T>
0037     GeneralQuadric operator()(CylCentered<T> const&) const;
0038 
0039     Sphere operator()(SphereCentered const&) const;
0040 
0041     template<Axis T>
0042     GeneralQuadric operator()(CylAligned<T> const&) const;
0043 
0044     Plane operator()(Plane const&) const;
0045 
0046     Sphere operator()(Sphere const&) const;
0047 
0048     template<Axis T>
0049     GeneralQuadric operator()(ConeAligned<T> const&) const;
0050 
0051     GeneralQuadric operator()(SimpleQuadric const&) const;
0052 
0053     GeneralQuadric operator()(GeneralQuadric const&) const;
0054 
0055     Involute operator()(Involute const&) const;
0056 
0057   private:
0058     Transformation tr_;
0059 };
0060 
0061 //---------------------------------------------------------------------------//
0062 }  // namespace detail
0063 }  // namespace celeritas