23 #include "pybind11/pybind11.h" 29 namespace py = pybind11;
37 using PyColor = py::class_<Color, std::shared_ptr<Color>>;
40 py::module mod(
"color");
43 PyColor
cls(mod,
"Color");
46 cls.def(py::init<double>(),
"g_r"_a = std::numeric_limits<double>::quiet_NaN());
49 cls.def(
"__eq__", [](Color
const&
self, Color
const& other) {
return self == other; }, py::is_operator());
50 cls.def(
"__ne__", [](Color
const&
self, Color
const& other) {
return self != other; }, py::is_operator());
53 cls.def(
"isIndeterminate", &Color::isIndeterminate);
54 cls.def(
"getLambdaEff", &Color::getLambdaEff,
"filter"_a);
PYBIND11_PLUGIN(_cameraPoint)
A base class for image defects.