wip setup core

This commit is contained in:
2025-02-10 13:36:12 +01:00
parent 355448297c
commit 75f909c2f7
12 changed files with 57 additions and 20 deletions

View File

View File

View File

@@ -1,25 +0,0 @@
// #include <cstddef>
// #include <getopt.h>
// int main(int argc, char* argv[]) {
// // CLI parsing code. TODO: move to core somewhere
// option longopts[] = {
// {"number", optional_argument, NULL, 'n'},
// {"show-ends", optional_argument, NULL, 'E'}, {0}};
//
// while (1) {
// const int opt = getopt_long(argc, argv, "nE::", longopts, 0);
//
// if (opt == -1) {
// break;
// }
//
// switch (opt) {
// case 'n':
// // ...
// case 'E':
// // ...
// }
// }
//
// //...
// }

View File

View File

@@ -1,10 +0,0 @@
#pragma once
class ImageMatcher{
public:
private:
};

18
src/core/Picker.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include "Picker.h"
using namespace core;
Picker::Picker() {}
Picker::~Picker() {}
Colour Picker::match(Colour obj, Colour* picks) {
// TODO: matching code
return Colour(0.0f, 0.0f, 0.0f);
}
std::vector<Colour> match_multi(Colour* obj, Colour* picks) {
// TODO: idem ditto
return std::vector<Colour>();
}

15
src/core/Picker.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include "Colour.h"
#include <vector>
namespace core {
class Picker{
public:
Picker();
~Picker();
Colour match(Colour obj, Colour* picks);
std::vector<Colour> match_multi(Colour* obj, Colour* picks);
};
}

View File

View File

@@ -1,10 +0,0 @@
#pragma once
class ImageMatcher{
public:
private:
};

View File

@@ -0,0 +1,12 @@
#pragma once
#include "../Colour.h"
namespace core {
class Matcher {
public:
virtual float distance(const Colour a, const Colour b) ;
virtual float luminance(const Colour a) ;
};
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Matcher.h"
namespace core {
class RGBMatcher : Matcher {
float distance(const Colour a, const Colour b);
float luminance(const Colour a);
};
}