2014-09-02 14:41:21 +00:00
|
|
|
#ifndef id6FB3FC97331449038D42AAAB4C01ABA1
|
|
|
|
#define id6FB3FC97331449038D42AAAB4C01ABA1
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
#include "primitivetypes.hpp"
|
|
|
|
#include "components/tilestreamer.hpp"
|
2014-09-02 14:41:21 +00:00
|
|
|
#include <vector>
|
2014-12-09 21:30:06 +00:00
|
|
|
#include <cassert>
|
|
|
|
#include <ciso646>
|
2014-09-02 14:41:21 +00:00
|
|
|
|
|
|
|
namespace dk {
|
2014-12-09 21:30:06 +00:00
|
|
|
template <size_t D>
|
2014-09-02 14:41:21 +00:00
|
|
|
class Viewport;
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
template <typename T, size_t D, typename S=TileStreamer<T, D> >
|
2014-09-02 14:41:21 +00:00
|
|
|
class Tyler {
|
|
|
|
public:
|
2014-12-09 21:30:06 +00:00
|
|
|
typedef S streamer_type;
|
|
|
|
typedef Vector<CoordinateScalarType, D> coords;
|
|
|
|
|
|
|
|
Tyler ( void ) = delete;
|
|
|
|
Tyler ( const coords& parSize, streamer_type&& );
|
2014-09-02 14:41:21 +00:00
|
|
|
virtual ~Tyler ( void ) noexcept = default;
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
virtual bool batch_load ( const std::vector<T>& parLoad ) = 0;
|
|
|
|
virtual bool single_load ( const T& parLoad ) = 0;
|
|
|
|
|
|
|
|
size_t tiles_count ( void ) const { return m_tiles.size(); }
|
2014-09-02 14:41:21 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
const coords m_size;
|
|
|
|
std::vector<T> m_tiles;
|
2014-12-09 21:30:06 +00:00
|
|
|
streamer_type m_streamer;
|
2014-09-02 14:41:21 +00:00
|
|
|
};
|
|
|
|
} //namespace dk
|
|
|
|
|
2014-12-09 21:30:06 +00:00
|
|
|
#include "implem/tyler.inl"
|
|
|
|
|
2014-09-02 14:41:21 +00:00
|
|
|
#endif
|