Newbie in Bullet - Some basic questions

aurelius
Posts: 1
Joined: Tue May 06, 2008 9:30 am

Newbie in Bullet - Some basic questions

Post by aurelius »

Hello everyone.

I want to implement a system, in which there are some rigid bodies. Those bodies are connected, like parts of a hand. I want to know if those parts collide each other and if they do, to compute the penetration depth. Those bodies do not have to move, I just want them in 3D space, in a specific place. For example, given the 3D space, I want to place two cylinders, the first one in (0, 0, 0) with a specific direction and height and the second one in (5,10,4) with a different height and direction. I make the test for collision detection and penetration estimation. In the next frame, I want to move those cylinders from inside the program and make the test again. Bullet provides such functionality? I think it does(and much more), but I want to be sure.

If it does, could you help me for my first steps? The manual does not help practically too much. It gives information about how to do some stuff, but not how to do the basic ones.

Firstly, the

btTransform g_rhpp;
g_rhpp.setIdentity();
g_rhpp.setOrigin(btVector3(10, 0, 0)) ;

for example gives the absolute position in 3D euclidean space?

I have run the Basic Demo and Collision Interface Demo and experimented with them. Since, I want to move the objects only in specific places, without any physical laws, the rigid bodies should it be kinematic or static but not dynamic? Given a specific rigid body, how do I move it? Translate function does this operation? Or do I have to use applyForce function?


Thank you for your help. :D
User avatar
shotgunnutter
Posts: 17
Joined: Thu Nov 01, 2007 2:13 am

Re: Newbie in Bullet - Some basic questions

Post by shotgunnutter »

The above example that you gave is correct, that is the absolute position in euclidean space. For the very basic stuff, check out the helloworld demo; this does not have any graphics, thus simplifying it greatly, and it simple creates a bunch of spheres and bounces them off of a large cube.


[edit: misspelled mr euclid's name]