irrBullet 0.1.8 - Bullet physics wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

That's awesome. It will be even cooler when the wheeled phyics are implentmented.
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

Updated to 0.1.6.

There are lots of new features and bug fixes; however, some are not listed.
I really recommend updating from 0.1.4 to this version if you're using my wrapper.

Please check my first post to see the new features.
Josiah Hartzell
Image
kh_
Posts: 78
Joined: Fri May 19, 2006 4:29 pm

Post by kh_ »

Hey,nice work. I've been checking it out and noticed your problem with GImpactMeshShape

// For some reason, updateBound only works the first time.
// All times after the first have no effect at all. Must fix this.

Have you tried calling postUpdate()?
from btGImpactShape.h

Code: Select all

//! performs refit operation
	/*!
	Updates the entire Box set of this shape.
	\pre postUpdate() must be called for attemps to calculating the box set, else this function
		will does nothing.
	\post if m_needs_update == true, then it calls calcLocalAABB();
void IGImpactMeshShape::updateBound()
    {
    	if(!m_needs_update) return;
    	calcLocalAABB();
    	m_needs_update  = false;
    }

 //! Tells to this object that is needed to refit the box set
    virtual void postUpdate()
    {
    	m_needs_update = true;
    }
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

KH:Thanks :)

And yes, but it had no effect. Maybe you can check in ICollisionShape.cpp; I think I have it commented out there.

I think it's very strange that it doesn't work, but I'll try more later, or maybe somebody else will find a fix for it.


I hope you find good use for this wrapper!
Josiah Hartzell
Image
kamikaze942
Posts: 52
Joined: Wed Mar 03, 2010 7:11 pm

Post by kamikaze942 »

dumb question

it says add files to your linker. how do i do that and where? i've never seen .A file extensions. i also get a fatal error when trying to compile, it's not able to find bullet/btbulletdynamicscommon.h. Although i referenced it in the additional include directories. I've also seen alot about using CMAKE for linker settings with bullet. What are your thoughts on that?
Kamikaze
kh_
Posts: 78
Joined: Fri May 19, 2006 4:29 pm

Post by kh_ »

my bad,I see now that shape->setLocalScaling() calls postupdate() internally.
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

kamikaze942 wrote:it says add files to your linker. how do i do that and where? i've never seen .A file extensions.
What IDE are you using? "i've never seen .A file extensions" leads me to think that you're using MSVC. irrBullet doesn't have support for MSVC currently; however, I recently installed it, so I will end up supporting MSVC soon here. Maybe in the next release. Until then, you'll have to compile Bullet on your own, and then re-build irrBullet to use the newly built, non-GCC, .lib files.
kamikaze942 wrote:i also get a fatal error when trying to compile, it's not able to find bullet/btbulletdynamicscommon.h. Although i referenced it in the additional include directories.
The file this error is referring to is "*irrBullet Directory*/include/bheaders/Bullet/btBulletDynamicsCommon.h"

You must also add a search directory in your project, and also in the irrBullet project (it's already added, but somehow not working for you, or maybe you made your own project) for "include/bheaders"


Your last question about CMake: I don't really know. I haven't done it.

I hope you figure out your problem! Maybe read over readme.txt once more to make sure you didn't skip a step. ;)

If you need any more help, just ask here. Thanks!

PS: I've also been informed by d3jake that irrBullet won't compile on Linux without first correcting the file name cases; for instance, I include "irrbullet.h" and not "irrBullet.h", which is proper. I will fix that for the next release.
Josiah Hartzell
Image
kamikaze942
Posts: 52
Joined: Wed Mar 03, 2010 7:11 pm

Post by kamikaze942 »

thanks man, yes im using visual studio 2008. Is irrbullet workable for it? I'm going to go back into doing the bullet/irrlicht thing for the next 4 days and could use any help.
Kamikaze
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

irrBullet will work with MSVC, yes. But first you must re-compile it to use the Bullet libraries that you compiled with MSVC.
Josiah Hartzell
Image
kamikaze942
Posts: 52
Joined: Wed Mar 03, 2010 7:11 pm

Post by kamikaze942 »

umm...how do i do that?
Kamikaze
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

irrBullet provides a Code::Blocks project to build it with GCC. It also comes with all pre-built Bullet .a libraries:

libbulletcollision.a
libbulletdynamics.a
libbulletmath.a
libbulletmultithreaded.a
libbulletsoftbody.a
libconvexdecomposition.a
libGIMPACTUtils.a

You said you built Bullet (not irrBullet) with MSVC, right? So you should have, at the least, these libraries to use irrBullet:

libbulletcollision.lib
libbulletdynamics.lib
libbulletmath.lib
libbulletsoftbody.lib
libconvexdecomposition.lib
libGIMPACTUtils.lib


Also, I forgot.. you only need to recompile irrBullet under MSVC. You need only the MSVC-built bullet libs to run any of your projects that use it.

So you'll need to create a project file for MSVC called irrBullet, link to libIrrlicht.lib, build irrBullet.

Start your example project, link to irrBullet.lib (the one you built), link to your MSVC-built Bullet libraries, and build the example.


I haven't tried this yet, but it should work. After school I'll work on irrBullet MSVC support. :)


EDIT:
Alright, I did it sooner than I said.
I got irrBullet built and working with MSVC 2010.
irrBullet 0.1.7 will come with an MSVC workspace, examples, and pre-built libraries for both irrBullet and Bullet. :)
Josiah Hartzell
Image
kamikaze942
Posts: 52
Joined: Wed Mar 03, 2010 7:11 pm

Post by kamikaze942 »

i've got the following libs (also noob question for you, where do i link them, under dependencies? and is that all i have to do or in the code do i need to write a comment for lib?)

bulletcollision.lib
bulletdynamics.lib
linearmath.lib
openglsupport.lib
glui.lib
bulletsoftbody.lib

i've been using cmake to compile bullet, and as a standalone computer it's been working 'alright' but when i transfer to svn, i'm coming up with alot of problems, seems cmake automatically sets a local path..... guess i'll be trying to solve this issue tonight. is there another way to solve this problem?
Kamikaze
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

Well, Bullet provides project files for MSVC to build it. Why don't you just use those?

In MSVC 2010 you do this to add a linker search directory:

Click on Project in the menu bar, click *projectname* Properties, click Configuration Properties -> VC++ Directories, under Library Directories click on the drop-down box, click on Edit, click the folder at the top right of the new window that has the tooltip "Add Line", click the new button beside the new line that is labeled "..." to select the directory.


Also, can you wait for irrBullet 0.1.7? It provides everything you need for MSVC support. Then you can just link against those and be happy. :)
Josiah Hartzell
Image
Dan911
Posts: 21
Joined: Tue Dec 16, 2008 11:28 pm

Post by Dan911 »

so how about that irrBullet 0.1.7? :)
BTW, thanks for the good code and documentation :)
cobra
Posts: 371
Joined: Fri Jan 23, 2009 2:56 am
Location: United States
Contact:

Post by cobra »

Hello. I just finished last week with school for the year, so I haven't been able to work on it too much.

I have irrBullet 0.1.7 in the works. It has some new features as well as MSVC++ 2010 support!


It's still not close to being done, but I'll try to get it out as soon as possible.

I appreciate all the support for the project.

- Josiah
Josiah Hartzell
Image
Post Reply