#ifndef id73F121AEE1EB4BA0980FAC025E5CDF05 #define id73F121AEE1EB4BA0980FAC025E5CDF05 #include "doorkeeper/components/tileiterator.hpp" #include "doorkeeper/implem/maptypes.hpp" #include #include namespace dk { template class TileIterator; template class PixelConv { public: typedef Vector coords; PixelConv ( MapTypes parType, const coords& parTileSize ); virtual coords to_pixel ( const coords& parFrom ) const = 0; MapTypes map_type ( void ) const; const coords& tile_size ( void ) const; private: const coords m_tile_size; const MapTypes m_map_type; }; template class PixelConvSquare : public PixelConv { public: using base_class = PixelConv; using typename base_class::coords; explicit PixelConvSquare ( const coords& parTileSize ); virtual ~PixelConvSquare ( void ) noexcept = default; virtual coords to_pixel ( const coords& parFrom ) const; }; class PixelConvDiamond : public PixelConv<2> { public: using base_class = PixelConv<2>; using base_class::coords; PixelConvDiamond ( const coords& parTileSize, bool parStaggered, bool parFirstReentrant ); PixelConvDiamond ( const coords& parTileSize, bool parStaggered, bool parFirstReentrant, const coords& parRatio ); virtual ~PixelConvDiamond ( void ) noexcept = default; virtual coords to_pixel ( const coords& parFrom ) const; protected: const coords m_ratio; const CoordinateScalarType m_first_reentr; const bool m_staggered; }; class PixelConvHex : public PixelConv<2> { public: using base_class = PixelConv<2>; using base_class::coords; PixelConvHex ( const coords& parTileSize, bool parFirstReentrant ); virtual ~PixelConvHex ( void ) noexcept = default; virtual coords to_pixel ( const coords& parFrom ) const; }; template Vector<2> get_diamond_coordinates ( const TileIterator& parIterator, const Vector<2>& parSize ) a_pure a_deprecated; template Vector<2> get_half_diamond_coordinates ( const TileIterator& parIterator, const Vector<2>& parSize ) a_pure a_deprecated; template Vector get_square_coordinates ( const TileIterator& parIterator, const Vector& parSize ) a_pure a_deprecated; template Vector<2> get_hex_coordinates ( const TileIterator& parIterator, const Vector<2>& parSize ) a_pure a_deprecated; } //namespace dk #include "doorkeeper/implem/pixelconv.inl" #endif