Add tilecoords and unit test.
Disable most projects because the build is broken. A lot.
This commit is contained in:
parent
5b027914d5
commit
6aa4d15381
6 changed files with 165 additions and 4 deletions
38
include/doorkeeper/components/tilecoords.hpp
Normal file
38
include/doorkeeper/components/tilecoords.hpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef id753CAC41D3AE48A1A1D1EC399FD3DADF
|
||||
#define id753CAC41D3AE48A1A1D1EC399FD3DADF
|
||||
|
||||
#include "doorkeeper/primitivetypes.hpp"
|
||||
#include "doorkeeper/implem/vector.hpp"
|
||||
#include <cstdint>
|
||||
#include <cassert>
|
||||
|
||||
namespace dk {
|
||||
template <uint32_t D>
|
||||
class TileCoords {
|
||||
public:
|
||||
typedef Vector<D> coords;
|
||||
|
||||
TileCoords ( void ) = default;
|
||||
TileCoords ( const TileCoords& ) = default;
|
||||
explicit TileCoords ( const coords& parSize );
|
||||
TileCoords ( const coords& parValue, const coords& parSize );
|
||||
|
||||
TileCoords& operator++ ( void ); //pre
|
||||
TileCoords operator++ ( int ); //post
|
||||
TileCoords& operator-- ( void ); //pre
|
||||
TileCoords operator-- ( int ); //post
|
||||
const TileCoords& operator+= ( CoordinateScalarType parValue );
|
||||
const TileCoords& operator-= ( CoordinateScalarType parValue );
|
||||
bool operator== ( const TileCoords& parOther ) const;
|
||||
bool operator!= ( const TileCoords& parOther ) const;
|
||||
TileCoords& operator= ( const TileCoords& ) = default;
|
||||
|
||||
private:
|
||||
coords m_pos;
|
||||
coords m_size;
|
||||
};
|
||||
} //namespace dk
|
||||
|
||||
#include "doorkeeper/implem/tilecoords.inl"
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue