DoorKeeper/include/components/tyler.hpp

39 lines
888 B
C++
Raw Normal View History

2014-09-02 14:41:21 +00:00
#ifndef id6FB3FC97331449038D42AAAB4C01ABA1
#define id6FB3FC97331449038D42AAAB4C01ABA1
#include "primitivetypes.hpp"
#include "components/tilestreamer.hpp"
2014-09-02 14:41:21 +00:00
#include <vector>
#include <cassert>
#include <ciso646>
2014-09-02 14:41:21 +00:00
namespace dk {
template <size_t D>
2014-09-02 14:41:21 +00:00
class Viewport;
template <typename T, size_t D, typename S=TileStreamer<T, D> >
2014-09-02 14:41:21 +00:00
class Tyler {
public:
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;
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;
streamer_type m_streamer;
2014-09-02 14:41:21 +00:00
};
} //namespace dk
#include "implem/tyler.inl"
2014-09-02 14:41:21 +00:00
#endif