Bullet convexsweeptest documentation and demo

thegeneralsolution
Posts: 16
Joined: Sun Jul 05, 2015 12:55 am

Bullet convexsweeptest documentation and demo

Post by thegeneralsolution »

I have been trying to understand how to use btCollisionWorld::convexSweepTest.

I can't find any example code for how to use it on the wiki.

The user manual refers to the "Gjk Convex Cast / Sweep Demo " for how to do a sweep test. So I downloaded the latest bullet src code (On Windows). I followed the instructions in the readme: "Click on build3/vs2010.bat and open build3/vs2010/0MySolution.sln"

The solution is created but does not seem to contain a Gjk Convex Cast / Sweep Demo. Unless I am looking in the wrong place for it, or it was renamed.

This is not going so well! :(

(edit)

Really my question is only about the following though. This is the convexsweeptest function signature:

Code: Select all

 	convexSweepTest (const btConvexShape *castShape, const btTransform &from, const btTransform &to, ConvexResultCallback &resultCallback, btScalar allowedCcdPenetration=btScalar(0.)) const
I can guess that 'from' and 'to' are the initial and final transforms that the sweeptest is performed along. Don't know what allowedCcdPenetration does though.

and this is the ClosestConvexResultCallback constructor:

Code: Select all

btCollisionWorld::ClosestConvexResultCallback::ClosestConvexResultCallback	(	const btVector3 & 	convexFromWorld,
const btVector3 & 	convexToWorld )	
What are the "convexToWorld" and "convexFromWorld" parameters for?
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland

Re: Bullet convexsweeptest documentation and demo

Post by benelot »

Hello thegeneralsolution,

The problem about the demo is that is has not yet been ported to the Bullet Example Browser, and therefore resides in the old_demos branch. Here it is:

https://github.com/bulletphysics/bullet ... exCastDemo

I hope it helps!