[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Using std::set but need to change an element
Gianfranco Berardi wrote:
I found some code at http://www.gphysics.com to do "quick and simple"
physics, but I find that the code was written in VC++. I've managed to
get it to mostly compile in g++ 4.0.4, but I'm having trouble with the
use of std::set.
Yeah - so did I.
I never did figure out what the problem was with std::set
so I just dumped the code that used std::set and wrote a
really crude replacement (*REALLY* crude!).
You can grab a working Linux version from my web site here:
http://www.sjbaker.org/Box2D/
Just type 'make' to build it - run './seqimp' to see it work.
I'll leave it up for a couple of days.
The original powerpoint presentation has also been hacked so
you can display it in OpenOffice - it used to come up in some
kind of Dingbats font so it was unreadable.
I found that you need to change the timestep at the top of main.cxx
from 1.0/60.0 to 1.0/600.0 - otherwise it runs too fast to see. However,
when you do that, demo number 9 behaves a bit strangely with all the
dominos jumping into the air on the first frame!
I've been kinda thinking about turning it into a full 3D implementation.
Are you interested in collaborating on that?
Have fun!