libosmscout  0.1
osmscout::Pixel Struct Referencefinal

#include <Pixel.h>

Public Member Functions

std::string GetDisplayText () const
 
uint64_t GetId () const
 Returns a unique number based on the coordinates of the pixel. More...
 
bool operator!= (const Pixel &other) const
 
bool operator< (const Pixel &other) const
 
std::ostream & operator<< (std::ostream &stream) const
 
bool operator== (const Pixel &other) const
 
 Pixel ()=default
 The default constructor creates an uninitialized instance (for performance reasons). More...
 
 Pixel (uint32_t x, uint32_t y)
 

Public Attributes

uint32_t x
 
uint32_t y
 

Detailed Description

Representation of a pixel on a display or a plane. Coordinates are non-negative, values are decimal.

Constructor & Destructor Documentation

◆ Pixel() [1/2]

osmscout::Pixel::Pixel ( )
inlinedefault

The default constructor creates an uninitialized instance (for performance reasons).

◆ Pixel() [2/2]

osmscout::Pixel::Pixel ( uint32_t  x,
uint32_t  y 
)
inline

Member Function Documentation

◆ GetDisplayText()

std::string osmscout::Pixel::GetDisplayText ( ) const

References x, and y.

◆ GetId()

uint64_t osmscout::Pixel::GetId ( ) const
inline

Returns a unique number based on the coordinates of the pixel.

The bits of the coordinates are projected onto one number by interleaving the bits of the coordinates. Coordinates close in 2D space are thus likely clos ein one dimensional space, too.

References osmscout::InterleaveNumbers().

◆ operator!=()

bool osmscout::Pixel::operator!= ( const Pixel other) const
inline

References x, and y.

◆ operator<()

bool osmscout::Pixel::operator< ( const Pixel other) const
inline

References x, and y.

◆ operator<<()

std::ostream& osmscout::Pixel::operator<< ( std::ostream &  stream) const
inline

◆ operator==()

bool osmscout::Pixel::operator== ( const Pixel other) const
inline

References x, and y.

Member Data Documentation

◆ x

◆ y


The documentation for this struct was generated from the following files: