Today I started finally to implement the "real" physics engine, which will be based on rigid bodies with a size and support for rotations.
I started by creating the RigidBody class, which is similar to the Particle class in many aspects, but requires additional information...like the inertia tensor, which is a 3x3 matrix that holds info about the inertia of a rigidbody.
I had to change quite a lot of things compared to the book I'm following, because my engine is deeply connected to the other parts of the engine. For instance I don't need to calculate the transform matrix for a rigidbody because it is already generated by the transform component.
Nessun commento:
Posta un commento