GImpactMeshShape usage question

WhirledPeas
Posts: 1
Joined: Fri Mar 25, 2011 8:17 am

GImpactMeshShape usage question

Post by WhirledPeas »

Hi, been working with bullet in Ogre. I'm using the btOgre wrapper which directly connects to bullet. I am trying to use GImpact meshes as I was quite happy with how they worked in irrbullet(irrlicht). Unfortunately GImpact isn't as easy to use straight from the bullet library, and I'm having some confusion over how to use it exactly. Can someone help me figure out how to create an object as a GImpactMeshShape?

I gather that it needs to be this:

Code: Select all

btGImpactMeshShape::btGImpactMeshShape 	( 	btStridingMeshInterface *  	meshInterface 	 )  


but I'm not sure how to create an instance of a btStridingMeshInterface.

Any help would be greatly appreciated, thanks.


EDIT: oopse, this is the wrong forum I believe, I'm gonna see if I can get a mod to move it.
User avatar
dphil
Posts: 237
Joined: Tue Jun 29, 2010 10:27 pm

Re: GImpactMeshShape usage question

Post by dphil »

So you're using btOgre? If so, once you have an ogre entity representing your mesh you can just do:

BtOgre::StaticMeshToShapeConverter converter(entity);
btGImpactMeshShape * gimpact = converter.createGImpactMeshShape();