35 lines
629 B
C++
35 lines
629 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
class DiscretePoint
|
|
{
|
|
unsigned mX;
|
|
unsigned mY;
|
|
|
|
public:
|
|
|
|
DiscretePoint(unsigned x, unsigned y);
|
|
|
|
~DiscretePoint();
|
|
|
|
std::shared_ptr<DiscretePoint> Create(unsigned x, unsigned y);
|
|
|
|
unsigned GetX() const;
|
|
|
|
unsigned GetY() const;
|
|
|
|
bool operator==(const DiscretePoint& rhs) const
|
|
{
|
|
return (mX == rhs.mX)
|
|
&& (mY == rhs.mY);
|
|
}
|
|
bool operator!=(const DiscretePoint& rhs) const
|
|
{
|
|
return !operator==(rhs);
|
|
}
|
|
};
|
|
|
|
using Pixel = DiscretePoint;
|
|
using DiscretePointPtr = std::shared_ptr<DiscretePoint>;
|
|
using PixelPtr = DiscretePointPtr;
|