Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/py color support osg viewer #1398

Merged
merged 8 commits into from
Aug 17, 2019
5 changes: 5 additions & 0 deletions python/dartpy/gui/osg/ImGuiViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ void ImGuiViewer(py::module& m)
dart::gui::osg::Viewer,
osg::ref_ptr<dart::gui::osg::ImGuiViewer>>(m, "ImGuiViewer")
.def(::py::init<>())
.def(
::py::init([](const Eigen::Vector4d& clearColor) {
return new ::dart::gui::osg::ImGuiViewer(eigToOsgVec4f(clearColor));
}),
::py::arg("clearColor"))
.def(::py::init<const osg::Vec4&>(), ::py::arg("clearColor"))
.def(
"getImGuiHandler",
Expand Down
5 changes: 5 additions & 0 deletions python/dartpy/gui/osg/Viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ void Viewer(py::module& m)
dart::common::Subject,
::osg::ref_ptr<dart::gui::osg::Viewer>>(m, "Viewer")
.def(::py::init<>())
.def(
::py::init([](const Eigen::Vector4f& clearColor) {
return new ::dart::gui::osg::Viewer(eigToOsgVec4d(clearColor));
}),
::py::arg("clearColor"))
.def(::py::init<const osg::Vec4&>(), ::py::arg("clearColor"))
.def(
"captureScreen",
Expand Down