Closed opera-aberglund closed 11 months ago
I like the idea.
Unfortunately, I can't use a C++ standard container type like std::vector
to hold these in BodyConf
. That's because modifiers like push_back
aren't constexpr
until C++20. This prevents BodyConf
from being a literal type anymore in C++17 - i.e. can't use it with constexpr
then.
I may be able to make BodyConf
take a view type, like Span
, but its data would have to stay in scope until Body
got the configuration. Looking into this.
I didn't like the possible semantics of the BodyConf::Use(ShapeID)
when BodyConf
held a view. So decided to use a constexpr
enhanced container instead. Which in C++17 meant I had to use playrho::ArrayList
. And it turned out that type needed some work too which rippled into other code. Anyways, the commit I'm working on merging into master, which you can take an early look at, is commit https://github.com/louis-langholtz/PlayRho/pull/551/commits/3571e96bd0a68e74c778680e90aea176b7946387.
Addressed with PR: https://github.com/louis-langholtz/PlayRho/pull/551
Desired Behavior:
I want to be able to write something like this to use multiple shapes for a
BodyConf
just like how I can call
.SetShapes
on aBody
object. So that would need a new method:Actual Behavior:
I have to write it like this
which does not spark joy.