This project has moved and is read-only. For the latest updates, please go here.

Issue with Body copy constructor

May 17, 2009 at 1:16 AM
Edited May 17, 2009 at 1:18 AM

Hi all,

I've been trying to abstract away body creation using a clone method, but I've been having issues with the Body class copy constructor. Apparently, this constructor only copies the bodies mass, moment of inertia and drag coefficients, but leaves out other important semantic properties like IsStatic or IgnoreGravity.

Shouldn't the copy constructor copy everything? I have no problem with doing the full copy by hand in my abstraction, but I thought I'd ask to see whether this was a known issue. Copy semantics has always been a hotly debated topic, and the conclusion so far is that it can be done however one wants, provided that it's well documented.

Thanks very much!


May 17, 2009 at 3:24 AM

hmm odd... i'm not sure about this, genbox would know more if that is the way it is supposed to be.

May 17, 2009 at 10:49 AM

I've just uploaded changeset #50739 that contains more properties to be copied on cloning. Thanks for informing me about this.
Be sure to let me know if anything is missing.