-
Notifications
You must be signed in to change notification settings - Fork 24
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
Should caches be compared in the equality operator for the world? #553
Comments
Hmm... this requires some thinking. At least for me. Caches shouldn't be part of equality, no. But, are the fields you're specifying exactly caches? Seems like they are, but I'm reluctant to agree on this without thinking carefully about it. It's occurred to me before that Incidentally, this relates to why there isn't a Another way I think about dealing with the lack of a The downside of course as you realize is not having the OTOH, there are the I'll continue thinking about the cache aspect of this and update this comment as time/decisions occurs. |
Thanks for being so open about your reasoning, it's very interesting to follow. I wouldn't say this in itself is too much of an issue for me personally right now, but since I currently use this operator as a reference for the correctness of the serialization, it will eventually matter a lot before I can call it "complete". Issue #555 is much more of a staller right now, because we need to use contacts in our game. |
This is how the equality operator for the
AabbTreeWorld
is implemented:Why are
m_bodyContacts
,m_bodyJoints
,m_bodyProxies
,m_proxiesForContacts
,m_fixturesForProxies
,m_bodiesForSync
compared here, since they are only caches? My reasoning is that two worlds should still be considered equal despite having different caches, as long as all the bodies and shapes and so on are equal.I'm wondering the same for Islanded, is this also some type of cache? Does two worlds with different values in Islanded behave differently? If so, I can't find a method to get these values so I can't copy them to another world.
The text was updated successfully, but these errors were encountered: