[ODE] multiple box-box contacts

David McClurg dmcclurg at pandemicstudios.com.au
Sun Nov 24 19:15:02 2002


very nice Russ!  just a minor thing that my VC7 compiler doesn't like...

collision_std.cpp
collision_std.cpp(460) : error C2057: expected constant expression
collision_std.cpp(460) : error C2466: cannot allocate an array of constant size 0
collision_std.cpp(460) : error C2133: 'avail' : unknown size

if you could change

  int avail[n];

to

  int* avail = (int*)alloca(n*sizeof(int));

that would fix it.

-----Original Message-----
From: Russ Smith [mailto:russ@q12.org]
Sent: Monday, 25 November 2002 6:41 AM
To: ode@q12.org
Subject: [ODE] multiple box-box contacts



i have just finished an update to the box-box contact generation code.
now up to 8 contacts can be generated per box-box collision, although in
practice a limit of 3 or 4 is more useful. the test_boxstack demo has
been updated to show box stacking in action: press 'r' to drop boxes in
a stack, then press b multiple times. press 't' to show the contact
points that are generated. you can play with different numbers of
contacts by changing the 3rd argument to dCollide() - the default is 4.

note that you have to compile ODE *without* ODE_OLD_COLLISION in
user-settings to get the new code.

be careful in your own code to generate as few box-box contacts as you
actually need, as each extra contact point will slow down the simulation
some more.

this new code contains a number of heuristics that should result in good
contact choices - but these algorithms need some more real-world
testing. please report any problems you come across.

russ.

-- 
Russell Smith
http://www.q12.org
_______________________________________________
ODE mailing list
ODE@q12.org
http://q12.org/mailman/listinfo/ode