Initial commit.

This commit is contained in:
jmsgrogan 2020-05-02 08:31:03 +01:00
commit 59c6161fdb
134 changed files with 4751 additions and 0 deletions

View file

@ -0,0 +1,7 @@
list(APPEND geometry_LIB_INCLUDES
DiscretePoint.cpp
Point.cpp)
# add the library
add_library(geometry SHARED ${geometry_LIB_INCLUDES})

View file

@ -0,0 +1,28 @@
#include "DiscretePoint.h"
DiscretePoint::DiscretePoint(unsigned x, unsigned y)
: mX(x),
mY(y)
{
}
DiscretePoint::~DiscretePoint()
{
};
std::shared_ptr<DiscretePoint> DiscretePoint::Create(unsigned x, unsigned y)
{
return std::make_shared<DiscretePoint>(x, y);
}
unsigned DiscretePoint::GetX() const
{
return mX;
}
unsigned DiscretePoint::GetY() const
{
return mY;
}

View file

@ -0,0 +1,25 @@
#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;
};
using Pixel = DiscretePoint;
using DiscretePointPtr = std::shared_ptr<DiscretePoint>;
using PixelPtr = DiscretePointPtr;

18
src/geometry/Point.cpp Normal file
View file

@ -0,0 +1,18 @@
#include "Point.h"
Point::Point(double x, double y)
: mX(x),
mY(y)
{
}
Point::~Point()
{
};
std::shared_ptr<Point> Point::Create(double x, double y)
{
return std::make_shared<Point>(x, y);
}

19
src/geometry/Point.h Normal file
View file

@ -0,0 +1,19 @@
#pragma once
#include <memory>
class Point
{
double mX;
double mY;
public:
Point(double x, double y);
~Point();
std::shared_ptr<Point> Create(double x, double y);
};
using PointPtr = std::shared_ptr<Point>;

View file

7
src/geometry/Rectangle.h Normal file
View file

@ -0,0 +1,7 @@
#pragma once
class Rectangle
{
};