1#ifndef OSMSCOUT_PIXEL_H
2#define OSMSCOUT_PIXEL_H
64 return x==other.x &&
y==other.y;
69 return y!=other.y ||
x!=other.x;
74 return std::tie(
y,
x) < std::tie(other.y, other.x);
104 std::array<double,2> coords;
139 return coords[0]==other.coords[0] &&
140 coords[1]==other.coords[1];
145 return std::tie(
coords[1],
coords[0]) < std::tie(other.coords[1], other.coords[0]);
149 double xDiff =
coords[0] - other.coords[0];
150 double yDiff =
coords[1] - other.coords[1];
151 return sqrt(xDiff*xDiff + yDiff*yDiff);
162 static_assert(std::is_trivially_copyable_v<Vertex2D>);
163 static_assert(std::is_trivially_assignable_v<Vertex2D,Vertex2D>);
249 return std::tie(
x,
y, z) < std::tie(other.x, other.y, other.z);
#define CLASS_FINAL
Definition Compiler.h:26
#define OSMSCOUT_API
Definition CoreImportExport.h:45
bool operator<(const Vertex3D &other) const
Definition Pixel.h:247
Vertex2D & operator=(Vertex2D &&other)=default
Vertex2D(double x, double y)
Definition Pixel.h:114
bool operator==(const Pixel &other) const
Definition Pixel.h:62
Vertex2D(const Vertex2D &other)=default
double GetY() const
Definition Pixel.h:132
bool operator!=(const Pixel &other) const
Definition Pixel.h:67
Pixel(uint32_t x, uint32_t y)
Definition Pixel.h:56
std::vector< Coord > coords
Optional coordinates for coastline.
Definition GroundTile.h:99
Vertex3D(const Vertex3D &other)=default
uint64_t GetId() const
Definition Pixel.h:82
bool operator<(const Pixel &other) const
Definition Pixel.h:72
bool operator==(const Vertex2D &other) const
Definition Pixel.h:137
std::ostream & operator<<(std::ostream &stream) const
Definition Pixel.h:89
Vertex2D(Vertex2D &&other)=default
Vertex3D(double x, double y)
Definition Pixel.h:185
static const Vertex2D ZERO
Definition Pixel.h:107
Vertex2D & operator=(const Vertex2D &other)=default
uint32_t x
Definition Pixel.h:48
uint32_t y
Definition Pixel.h:49
bool operator<(const Vertex2D &other) const
Definition Pixel.h:143
double DistanceTo(const Vertex2D &other) const
Definition Pixel.h:148
void Set(double x, double y)
Definition Pixel.h:223
void SetY(double y)
Definition Pixel.h:213
double GetX() const
Definition Pixel.h:127
double GetZ() const
Definition Pixel.h:203
void Set(double x, double y, double z)
Definition Pixel.h:231
void SetX(double x)
Definition Pixel.h:208
void SetZ(double z)
Definition Pixel.h:218
bool operator==(const Vertex3D &other) const
Definition Pixel.h:240
std::string GetDisplayText() const
OSMSCOUT_API uint64_t InterleaveNumbers(uint32_t a, uint32_t b)
OSMSCOUT_API Vertex2D operator-(const Vertex2D &a, const Vertex2D &b)
OSMSCOUT_API Vertex2D operator+(const Vertex2D &a, const Vertex2D &b)
OSMSCOUT_API Vertex2D operator*(const Vertex2D &a, double scale)