FD, all rotations are a one-dimensional rotation around an arbitrary three dimensional axis. The axis direction is defined by the x,y,z component which actually is just a direction vector showing where the axis is pointed. The angle is the rotation speed in radians. That's why quaternions are so useful for rotations, because they are set up just like that.
q = rotation speed in radians
x = direction vector component x (normalized)
y = direction vector component y (normalized)
z = direction vector component z (normalized)
Once you get your head around the fact that an object can only spin on one axis and that the axis is a direction vector, it all falls into place nicely.
Here's linear movement (simplified):
force = 0
acceleration = force / mass
velocity :+ acceleration * dt
position :+ velocity * dt
Rotation has equivalent components:
torque = 0
angularAcceleration = torque / inverseMass
angularVelocity :+ angularAcceleration * dt
orientation = 0.5 * Quaternion(0, angularVelocity.x, angularVelocity.y, angularVelocity.z) * orientation
I may be slightly off on the rotation and I'm still identifying the correction sequence and terminology.
q = rotation speed in radians
x = direction vector component x (normalized)
y = direction vector component y (normalized)
z = direction vector component z (normalized)
Once you get your head around the fact that an object can only spin on one axis and that the axis is a direction vector, it all falls into place nicely.
Here's linear movement (simplified):
force = 0
acceleration = force / mass
velocity :+ acceleration * dt
position :+ velocity * dt
Rotation has equivalent components:
torque = 0
angularAcceleration = torque / inverseMass
angularVelocity :+ angularAcceleration * dt
orientation = 0.5 * Quaternion(0, angularVelocity.x, angularVelocity.y, angularVelocity.z) * orientation
I may be slightly off on the rotation and I'm still identifying the correction sequence and terminology.