koide3 / iridescence

3D visualization library for rapid prototyping of 3D algorithms
https://koide3.github.io/iridescence/
MIT License
298 stars 32 forks source link

Avoid ambiguity of GridMap #39

Closed Tomoya-Sato closed 1 year ago

Tomoya-Sato commented 1 year ago

Hi, thank you for your great repository!

I plan to make a PR about GridMap to add new constructor with that we can set RGBA independently and directly. The statement is here and the definition is here. As you can see, I added a extra bool argument to avoid ambiguity, but it's not smart I think. Then, what do you think is the best way to avoid this ambiguity?

koide3 commented 1 year ago

Hi @Tomoya-Sato ,

I would be happy to receive a PR for this. In this case, it may be good to add a new color mode like RGBA and let the first constructor handle raw RGBA data.

Tomoya-Sato commented 1 year ago

Thank you @koide3 I'll follow your advice. Look forward to PR!