You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
In DART, the background color of an dart::gui::osg::Viewer can be set in the constructor with a ::osg::Vec4 vector. This behaviour is also exposed in the python bindings, but the type ::osg::Vec4 is not defined. As far as I see, there is curently no possibility to set a background color.
Solution
Adding an __init__ function binding for dartpy.gui.osg.Viewer and dartpy.gui.osg.ImGuiViewer with an Eigen::Vector4f would allow to set the color either with a numpy array or even via a list with 4 entries.
I already wrote a solution for myself (see master...chhinze:fix/pyColorSupportOsgViewer) and would like to merge it, if desired.
Alternatives
There may be some OSG python binding projects, but I would prefer reducing the number of required Python packages.
The text was updated successfully, but these errors were encountered:
Indeed, I'd prefer minimizing the third-party library APIs to the public DART APIs for both C++ and Python. In that sense, I'd add a new constructor of dart::gui::osg::Viewer taking Eigen::Vector4f (and setClearColor(const Eigen::Vector4f), and update the Python bindings accordingly.
There may be some OSG python binding projects, but I would prefer reducing the number of required Python packages.
Problem
In DART, the background color of an
dart::gui::osg::Viewer
can be set in the constructor with a::osg::Vec4
vector. This behaviour is also exposed in the python bindings, but the type::osg::Vec4
is not defined. As far as I see, there is curently no possibility to set a background color.Solution
Adding an
__init__
function binding fordartpy.gui.osg.Viewer
anddartpy.gui.osg.ImGuiViewer
with anEigen::Vector4f
would allow to set the color either with a numpy array or even via a list with 4 entries.I already wrote a solution for myself (see master...chhinze:fix/pyColorSupportOsgViewer) and would like to merge it, if desired.
Alternatives
There may be some OSG python binding projects, but I would prefer reducing the number of required Python packages.
The text was updated successfully, but these errors were encountered: