Re: irrBullet 0.1.71 - Bullet physics wrapper
Posted: Tue Jan 17, 2012 7:43 pm
from what i understand bullet use the aabb to filter the more precise collision code and avoid making some per triangle cheq on every shape every time
Official forum of the Irrlicht Engine
https://irrlicht.sourceforge.io/forum/
serengeor wrote:Didn't he just say that?mubashar wrote:@polylux looks valid to you ?
I'm pretty sure bullet does not really do any real collision calculations based on AABB. (is that even bullet's AABB?)wikipedia wrote:In geometry, an axis-aligned object (axis-parallel, axis-oriented) is an object in n-dimensional space whose shape is aligned with the coordinate axes of the space.
http://en.wikipedia.org/wiki/Bounding_volume wrote:In collision detection, when two bounding volumes do not intersect, then the contained objects cannot collide, either.
That applies to transformed bounding boxes or even up-scaled bounding boxes that can contain the full object. While with AABB the object can sometimes leave it,mubashar wrote:serengeor wrote:Didn't he just say that?mubashar wrote:@polylux looks valid to you ?
I'm pretty sure bullet does not really do any real collision calculations based on AABB. (is that even bullet's AABB?)wikipedia wrote:In geometry, an axis-aligned object (axis-parallel, axis-oriented) is an object in n-dimensional space whose shape is aligned with the coordinate axes of the space.
http://en.wikipedia.org/wiki/Bounding_volume wrote:In collision detection, when two bounding volumes do not intersect, then the contained objects cannot collide, either.
Scene node?? if you transform scene node instead of bullet body it wont update itself. Unless you're already using irrBullet, in that case it would reset scene node to bullet's body's position. Anyways you shouldn't do that as will make you need to update the body itself to the scene nodes transform. Better transform bullet's bodies and scene nodes will follow them (if you're using irrBullet ofc.).mubashar wrote:@serengeor can you identify from my post (screenshots) which bounding Box is this ... actually my question is is it possible to transform this when object when scene node transforms... as it is happening in plain bullet demo ... but not in my case using Irrbullet
Wicked. I told you. serengeor told you. The one in the second screenshot is the axis-aligned bounding box. It's the one that encloses your geometry given its bounding axes are parallel to your x, y and z axis in world space. So once the geometry (mesh) is rotated, the AABB will only change in size, not in orientation. The other part of your question is perfectly answered in serengeor's post.mubashar wrote:@serengeor can you identify from my post (screenshots) which bounding Box is this ... actually my question is is it possible to transform this when object when scene node transforms... as it is happening in plain bullet demo ... but not in my case using Irrbullet
@serengeor can you identify from my post (screenshots) which bounding Box is this ... actually my question is is it possible to transform this when object when scene node transforms... as it is happening in plain bullet demo ... but not in my case using Irrbullet
Take a look in the irrBullet code, which box is drawn.mubashar wrote:@serengeor yes i am using Irrbullet Rigidbody as cars Chassi and now my question is now same
@serengeor can you identify from my post (screenshots) which bounding Box is this ... actually my question is is it possible to transform this when object when scene node transforms... as it is happening in plain bullet demo ... but not in my case using Irrbullet
Code: Select all
if(collID)
delete collID;
i think it makes no sense at the end because the var pTriMesh is used before. if it is really necessary put it before the loopif(pTriMesh)
return pTriMesh;
4)if(!pTriMesh)
return nullptr
Code: Select all
IGImpactMeshShape(ISceneNode *n, IMesh *collMesh, f32 m, s32 id = -1)
Code: Select all
for(int i=0; i < world->getNumManifolds(); i++)
{
ICollisionCallbackInformation *info = world->getCollisionCallback(i);
bool hasCollideAttribute = (info->getBody0()->getAttributes()->existsAttribute("collide")); // <-2.1 is an obj that is non static only gets the colide attribute?
ICollisionObject* obj = (hasCollideAttribute) ? info->getBody0() : info->getBody1();
((IRigidBody*)info->getBody0())->applyForce(core::vector3df(0,10000,0), core::vector3df(0,1,0), ERBTS_LOCAL); //<-2.2 is this the right way to bounce the body away from the sec? is a effektor here better?
info->getPointer()->clearManifold(); //<-2.3 is this the right way to clear & delete the info?
delete info;
}
Code: Select all
SManifoldPoint point = info->getContactPoint(i);
irr::f32 speed = 10.0f;
static_cast<IRigidBody*>(info->getBody0())->internalApplyImpulse(point.getNormalWorldOnB().normalize()*speed, ERBTS_WORLD);
Take a look at this post: http://irrlicht.sourceforge.net/forum/v ... 30#p260684BenT wrote:Thank you for irrBullet. It was easy to set up and looks really usefull. This is the first time I have really tried to understand and use it. I can't for the life of me figure out how to create terrain that works with irrbullet. Could you post an example of how to do this given an ITerrainSceneNode?
Code: Select all
*** No rule to make target `Bullet/btBulletDynamicsCommon.h', needed by `../source/trianglemeshshape.cpp'. Stop.
Code: Select all
MYUSERNAME@ubuntu:~/Downloads/irrBullet-0.1.71/build$ make
make: Circular ../source/trianglemeshshape.cpp <- ../source/trianglemeshshape.cpp dependency dropped.
make: *** No rule to make target `Bullet/btBulletDynamicsCommon.h', needed by `../source/trianglemeshshape.cpp'. Stop.