wip setup core
This commit is contained in:
@@ -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':
|
||||
// // ...
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //...
|
||||
// }
|
||||
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
class ImageMatcher{
|
||||
public:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
18
src/core/Picker.cpp
Normal file
18
src/core/Picker.cpp
Normal 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
15
src/core/Picker.h
Normal 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);
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
class ImageMatcher{
|
||||
public:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
12
src/core/matchers/Matcher.h
Normal file
12
src/core/matchers/Matcher.h
Normal 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) ;
|
||||
};
|
||||
}
|
||||
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user