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

Grouping drawables #100

Open
koide3 opened this issue Apr 7, 2024 · 7 comments
Open

Grouping drawables #100

koide3 opened this issue Apr 7, 2024 · 7 comments

Comments

@koide3
Copy link
Owner

koide3 commented Apr 7, 2024

#84 (comment)

@Seekerzero
Copy link
Contributor

Hi Koide, I was finally settling down after coming back from the Japan (It is nice to meet with you in person :). Please let me know if there is any features I can help you to test with. Thanks.

@koide3
Copy link
Owner Author

koide3 commented Jun 8, 2024

It was really nice to meet you too! It was one of the big moments at ICRA for me :)

Last a few weeks, I didn't have enough time to work on Iridescence because I had another domestic conference and many tasks (and my ubuntu PC at home got some troubles :( ) after ICRA. But, I'm getting back to my usual daily life, and will soon bring some improvements. At that time I'll ask you for help testing new features.

@koide3
Copy link
Owner Author

koide3 commented Jun 20, 2024

@Seekerzero
Sorry for making you wait for a while. I just updated DrawableTree in the grouping branch. This class enables grouping drawables in a tree structure. The basic usage is as follows. I would be glad if you could test it and tell me if there are some features to be added.

#include <guik/drawable_tree.hpp>

auto tree = std::make_shared<DrawableTree>();
// Register drawables to the tree.
tree->update_drawable("parent/child/node1", drawable1, guik::VertexColor(node1_matrix));
tree->update_drawable("parent/child/node2", drawable2, guik::VertexColor(node2_matrix));
// Update shader settings. This matrix is applied to both "node1" and "node2".
tree->update_setting("parent/child", guik::ShaderSetting(child_matrix));

// Overwrite the color settings of all children of "parent/child".
tree->update_tree_color_mode("parent/child", guik::ColorMode::FLAT_COLOR);
tree->update_tree_color("parent/child", Eigen::Vector4f(0.0f, 0.0f, 1.0f, 1.0f));

// Overwrite the point scale of all children of "parent/child".
tree->update_tree_setting("parent/child", "point_scale", 2.0f);

// Output the tree structure to stdout for debugging.
tree->print_tree();

viewer->update_drawable("tree", tree);

@Seekerzero
Copy link
Contributor

Seekerzero commented Jun 20, 2024

Thank you! Sure, I will test them and let you know.

@Seekerzero
Copy link
Contributor

Hi Koide,
I was refactoring my code and am ready to test the grouping drawable feature. Could you help me merge the current master branch into the grouping branch? So I don't need to revert the settings to the older branches.
Thanks!

@koide3
Copy link
Owner Author

koide3 commented Sep 21, 2024

Hi @Seekerzero , It's been a while!
Sorry for the late response. I was occupied by a paper deadline last a few weeks. I fixed some conflicts and merged master into grouping branch: #106

@Seekerzero
Copy link
Contributor

Seekerzero commented Sep 21, 2024

I totally understand that it was the ICRA due day. I know it :) Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants