irrBullet 0.1.8 - Bullet physics wrapper
Sorry about the extra post, but I wanted all irrBullet users to know that I forgot to tell everybody that I've figured out why simulation was so slow before. (I fixed this a few months ago).
It was the convex-convex multi-point iteration, which I created the irrBullet world with.
I removed this and it's much faster.
I might make a struct for creation of the irrBullet world so that the developer has more control over the simulation techniques.
Also, I've been working on irrBullet AngelScript bindings for my own game. Once I clean them up, I'll be including them with the irrBullet library. With these I will be including the Irrlicht bindings found in irrExt (if I remember correctly) since the bindings rely on this for the irrlicht data types.
It was the convex-convex multi-point iteration, which I created the irrBullet world with.
I removed this and it's much faster.
I might make a struct for creation of the irrBullet world so that the developer has more control over the simulation techniques.
Also, I've been working on irrBullet AngelScript bindings for my own game. Once I clean them up, I'll be including them with the irrBullet library. With these I will be including the Irrlicht bindings found in irrExt (if I remember correctly) since the bindings rely on this for the irrlicht data types.
-
- Posts: 17
- Joined: Fri Jan 29, 2010 8:54 am
- Contact:
irrBullet + load .irr scene in action
Thanks for your wrapper: it's simple and clean.
Nice work.
Here you can find a little video of my experiment about irrBullet and Irrlicht.
The example code, loads an .irr scene, creates a collision management and uses irrBullet to manage the collisions with the cubes.
So, go on with it !!!
silver.slade
Nice work.
Here you can find a little video of my experiment about irrBullet and Irrlicht.
The example code, loads an .irr scene, creates a collision management and uses irrBullet to manage the collisions with the cubes.
So, go on with it !!!
silver.slade
Hi silver.slade.
Thanks for your support, and thanks very much for the video! It's cool to see others using it.
Perhaps I could include this in the irrBullet examples? People have been asking how to use it with the .irr format, and I've not had the time to do this.
I'll be working more on it soon, and there should be lots more cool stuff coming up! Keep checking in.
Thanks.
Also: I've decided not to create an interface for constraints in irrBullet. I've already done them in my own game, and it's not difficult at all to get them working (especially using the helper functions that I include with irrBullet)! I will, however, include a constraints example.
- Josiah
Thanks for your support, and thanks very much for the video! It's cool to see others using it.
Perhaps I could include this in the irrBullet examples? People have been asking how to use it with the .irr format, and I've not had the time to do this.
I'll be working more on it soon, and there should be lots more cool stuff coming up! Keep checking in.
Thanks.
Also: I've decided not to create an interface for constraints in irrBullet. I've already done them in my own game, and it's not difficult at all to get them working (especially using the helper functions that I include with irrBullet)! I will, however, include a constraints example.
- Josiah
Hello cobra,
I can't compile irrBullet 0.1.6 with the latest Codeblock 10.05 because of these errors:
..\..\include\collisionshape.h|76|error: extra qualification 'ICollisionShape::' on member 'getMargin'|
..\..\include\collisionobject.h|41|error: extra qualification 'SCollisionObjectIdentification::' on member 'SCollisionObjectIdentification'|
..\..\include\rigidbody.h|196|error: extra qualification 'IRigidBody::' on member 'isInWorld'|
I think the new CB now use newer g++ version and treat it as error.
http://womble.decadent.org.uk/c++/syntax-errors.html
I can't compile irrBullet 0.1.6 with the latest Codeblock 10.05 because of these errors:
..\..\include\collisionshape.h|76|error: extra qualification 'ICollisionShape::' on member 'getMargin'|
..\..\include\collisionobject.h|41|error: extra qualification 'SCollisionObjectIdentification::' on member 'SCollisionObjectIdentification'|
..\..\include\rigidbody.h|196|error: extra qualification 'IRigidBody::' on member 'isInWorld'|
I think the new CB now use newer g++ version and treat it as error.
http://womble.decadent.org.uk/c++/syntax-errors.html
I had the same problem when compiling this. I don't know if you've resolved the problem or not, but all you have to do is delete the specified bit of bit that is listed in the error. The extra qualification would happen like this:
Code: Select all
class Classical
{
public:
Classical();
void Classical::otherFunction();
};
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
"I'll find out if what I deleted was vital here shortly..." -d3jake
-
- Posts: 23
- Joined: Sat Apr 03, 2010 3:44 am
Thanks for the feedback.
It does not yet have a character controller.
You can use all of irrBullet's features and still use the Bullet character controller, however.
irrBullet exposes all underlaying Bullet pointers and provides helper functions to make it even easier to use unimplemented features.
I'm not sure what other physics wrappers have the character controllers.
It does not yet have a character controller.
You can use all of irrBullet's features and still use the Bullet character controller, however.
irrBullet exposes all underlaying Bullet pointers and provides helper functions to make it even easier to use unimplemented features.
I'm not sure what other physics wrappers have the character controllers.
Thanks for the report! I'll check this out.
Here is the code supposedly causing a memory leak:
I'll have to look through it more when I have time, unless you can find it.
You're positive that it's a leak?
Here is the code supposedly causing a memory leak:
Code: Select all
if(event.KeyInput.Key == KEY_KEY_R && event.KeyInput.PressedDown == false)
{
// The removal feature is still pretty rough. If you'd like to help, please feel
// free to submit some patches.
// This function is basically just here as a place holder to test
// upcoming removal fixes.
for(u32 i=0; i < (world->getPointer()->getNumCollisionObjects() - 1); i++)
{
ICollisionObject *obj = 0;
obj = world->getCollisionObject(i);
if(obj != 0 && obj->getObjectType() == ECOT_RIGID_BODY)
{
printf("RIGID BODY: %i\n", i);
world->removeCollisionObject(obj);
}
}
createGround();
createBoxes();
return true;
}
You're positive that it's a leak?
Yes I'm pretty sure thats the leak you have to delete motion states and collision Shapes (I'm assuming that they are ?dynamically'? allocated with new)
So you should use get methods to get and delete them.
So you should use get methods to get and delete them.
Working on game: Marrbles (Currently stopped).
Here's a code that I used in my project
Code: Select all
void Physics::ClearObjects() {
for(irr::core::list<btRigidBody *>::Iterator Iterator = Objects.begin(); Iterator != Objects.end(); ++Iterator) {
btRigidBody *Object = *Iterator;
// Delete irrlicht node
irr::scene::IMeshSceneNode *Node = static_cast<irr::scene::IMeshSceneNode *>(Object->getUserPointer());
Node->remove();
// Remove the object from the world
World->removeRigidBody(Object);
// Free memory
delete Object->getMotionState();
delete Object->getCollisionShape();
delete Object;
Object = 0;
std::cout<<"Node removed"<<std::endl;
}
delete CPhysicsObjectMgr::instance()->trimesh;
Objects.clear();
}
Working on game: Marrbles (Currently stopped).
Crash/Assert in irrBullet
I get an assert in the following function that then stops the program i.e. cannot continue.
...this is the line that causes it, this is straight from the comments example of how to setup an example so it should work...any help would be welcomed.
ICollisionShape *shape = new IBvhTriangleMeshShape(Node, g_pApp->GetSceneManager()->getMesh("terrainMain.b3d"), 0.0);
Code: Select all
void btTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
{
(void)mass;
//moving concave objects not supported
btAssert(0);
inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
}
...this is the line that causes it, this is straight from the comments example of how to setup an example so it should work...any help would be welcomed.
ICollisionShape *shape = new IBvhTriangleMeshShape(Node, g_pApp->GetSceneManager()->getMesh("terrainMain.b3d"), 0.0);