22 #include <pybind11/pybind11.h> 34 py::module::import(
"astshim.frame");
36 py::class_<FrameSet, std::shared_ptr<FrameSet>, Frame>
cls(mod,
"FrameSet");
38 cls.def(py::init<Frame const &, std::string const &>(),
"frame"_a,
"options"_a =
"");
39 cls.def(py::init<Frame const &, Mapping const &, Frame const &, std::string const &>(),
"baseFrame"_a,
40 "mapping"_a,
"currentFrame"_a,
"options"_a =
"");
41 cls.def(py::init<Frame const &>());
44 cls.attr(
"BASE") = py::cast(AST__BASE);
45 cls.attr(
"CURRENT") = py::cast(AST__CURRENT);
46 cls.attr(
"NOFRAME") = py::cast(AST__NOFRAME);
48 cls.def_property(
"base", &FrameSet::getBase, &FrameSet::setBase);
49 cls.def_property(
"current", &FrameSet::getCurrent, &FrameSet::setCurrent);
50 cls.def_property_readonly(
"nFrame", &FrameSet::getNFrame);
52 cls.def(
"copy", &FrameSet::copy);
53 cls.def(
"addAxes", &FrameSet::addAxes);
54 cls.def(
"addFrame", &FrameSet::addFrame,
"iframe"_a,
"map"_a,
"frame"_a);
55 cls.def(
"addVariant", &FrameSet::addVariant,
"map"_a,
"name"_a);
56 cls.def(
"getAllVariants", &FrameSet::getAllVariants);
58 cls.def(
"getMapping", &FrameSet::getMapping,
"from"_a = FrameSet::BASE,
"to"_a = FrameSet::CURRENT);
59 cls.def(
"getVariant", &FrameSet::getVariant);
60 cls.def(
"mirrorVariants", &FrameSet::mirrorVariants,
"iframe"_a);
61 cls.def(
"remapFrame", &FrameSet::remapFrame,
"iframe"_a,
"map"_a);
62 cls.def(
"removeFrame", &FrameSet::removeFrame,
"iframe"_a);
63 cls.def(
"renameVariant", &FrameSet::renameVariant,
"name"_a);
AST wrapper classes and functions.
PYBIND11_MODULE(camera, mod)