Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:49

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
0004 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
0005 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
0006 
0007 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
0008 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
0009 
0010 // Use, modification and distribution is subject to the Boost Software License,
0011 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0012 // http://www.boost.org/LICENSE_1_0.txt)
0013 
0014 #ifndef BOOST_GEOMETRY_STRATEGIES_TRANSFORM_INVERSE_TRANSFORMER_HPP
0015 #define BOOST_GEOMETRY_STRATEGIES_TRANSFORM_INVERSE_TRANSFORMER_HPP
0016 
0017 #include <boost/qvm/mat.hpp>
0018 #include <boost/qvm/mat_operations.hpp>
0019 
0020 #include <boost/geometry/strategies/transform/matrix_transformers.hpp>
0021 
0022 
0023 namespace boost { namespace geometry
0024 {
0025 
0026 namespace strategy { namespace transform
0027 {
0028 
0029 /*!
0030 \brief Transformation strategy to do an inverse transformation in a Cartesian coordinate system
0031 \ingroup strategies
0032  */
0033 template
0034 <
0035     typename CalculationType,
0036     std::size_t Dimension1,
0037     std::size_t Dimension2
0038 >
0039 class inverse_transformer
0040     : public matrix_transformer<CalculationType, Dimension1, Dimension2>
0041 {
0042 public :
0043     template <typename Transformer>
0044     inline inverse_transformer(Transformer const& input)
0045     {
0046         this->m_matrix = boost::qvm::inverse(input.matrix());
0047     }
0048 
0049 };
0050 
0051 
0052 }} // namespace strategy::transform
0053 
0054 
0055 }} // namespace boost::geometry
0056 
0057 #endif // BOOST_GEOMETRY_STRATEGIES_TRANSFORM_INVERSE_TRANSFORMER_HPP