Bullet Version

aboeing
Posts: 33
Joined: Tue Jul 26, 2005 2:28 pm

Bullet Version

Post by aboeing »

Hi,

Is there a way to read the current version of bullet library? (some kind of #define or GetVersion() function?)

If not, would it be possible to include this in the next release?

Thanks!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet Version

Post by Erwin Coumans »

Good idea. It has been added:

#include "LinearMath/btScalar.h"

int btGetVersion(); //264 means 2.64

You can check it out in Bullet 2.64 RC2

Hope this helps,
Erwin
rTi
Posts: 9
Joined: Fri Nov 02, 2007 10:45 pm

Re: Bullet Version

Post by rTi »

Hello.

I want to run the same bullet using code on different bullet versions, so I just got a problem with a api change in the recent version.
Therefor it would be very useful to have the bullet version defined in a preprocessor variable.

Is that available too?

Like:

Code: Select all

#if (BULLET_VERSION < 264)
  // do the old stuff
#else 
  // do the cool new stuff
#endif 
Greetings, rTi
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bullet Version

Post by Erwin Coumans »

good idea, there is a new define

#define BT_BULLET_VERSION 265

inline int btGetVersion()
{
return BT_BULLET_VERSION;
}

It will make it into version 2.65

Thanks for the feedback,
Erwin
rTi
Posts: 9
Joined: Fri Nov 02, 2007 10:45 pm

Re: Bullet Version

Post by rTi »

Thanks for adding this.

And thanks for the great library :)
Keep up the good work.

Greetings,
rTi