# RigidBody questions... force vs torque

I am working on hydrodynamic modeling of a ship in an animated sea, and contemplating using Bullet for this.

My first inclination is the following design:

1. The ship will have a single RigidBody
2. Buoyancy will be modeled by having an invisible, simplified hull mesh whose triangles will each be sampled to find the depth of their centroid below the local water surface. Each will have a normal water pressure vector calculated, and this will be a force through its location relative to the ship’s Rigidbody, acting upon it
3. The mass of the ship, and its gravity effect will be divided into 4 point masses: two on the centerline about 1/4 and 3/4 along the length of the ship, and 2 athwart its center of gravity about 1/4th the beam outboard. Each of these masses will be 1/4 the mass of the total vessel. The intent of this model is that these will mimic the effect of rotational inertia: the ship is not a point mass.

My questions are these:

4. Why does Bullet treat torque as separate from force? Isn’t torque simply an effect of force being applied to a lever that is constrained by a fixed rotational axis?
5. What mass should I assign my single Rigidbody? Zero?
6. Am I not thinking properly of how to use Bullet components to model this ship? Is it a system of 4 RigidBodies with masses of 1/4 the ship’s mass and not a single Rigidbody?

tone
1. no its not, they are different
2. just use a ghostobject with a box shape to check for overlaps of physics objects to apply buoyancy to, similar to the BombControl in the examples
3. there is no “properly”, you write the game, how should we know?

I guess in seeing what of Bullet you’ve ported to JME, I’d want their CompositeShape, I think.

I might try rolling my own or seeing how the provided objects work.

tone

You mean the (already wrapped) CompoundShape I guess.

Possibly. I confess I find these very difficult to understand as offered.

For instance, I don’t see why CompoundShape is derived from CollisionShape is derived from Object, but PhysicsRigidBody (the one that has the nice means of applying forces at different points and which has mass, although it appears to be treated as a point mass) is derived from PhysicsCollisionObject which is derived from Object. Therefore, I do not see how I am going to get my ship to have rotational momentum in pitch and roll, which I was aspring to do by having it be a rigid assembly of point masses.

I have, however, written a bunch of code to calculate the forces.

I am going to first try treating the hull as a single RigidBody. I will apply gravitational forces through the offsets for those quarter-weights and try to separately calculate continued motion attributable to rotational inertia. I am not sure how it fits with the JME3/Bullet tools available.

I might be able to share my findings if/when I complete this. The idea of using water pressure on the faces of a hull mesh is a good alternative, I hope, to volumetric methods of calculating buoyancy.

tone

Reading the tutorials and documentation as well as the javadoc helps with these problems.