Closed adbrown85 closed 12 years ago
The rotate method should probably just be rotate(Quaternion) instead of rotate(Vec3, float).
Not sure if the default constructor should be setting the scalar component to zero or not, since a quaternion doesn't necessarily have to be a rotation. Which also brings up whether there should really be a separate class for rotations. It could be called either Rotation or maybe Versor. It would keep the components normalized, which also means keeping them private. This might be a little overkill though.
If Quaternion isn't necessarily a rotation, we should probably replace rotated with operator* and operator*=. That also makes it a little easier to specify the order of the operation, although it's backwards from what one might expect so that might be a little confusing.
Also want magnitude, normalize, and conjugate.
We need a quaternion implementation to support smooth rotations.
The core methods we will need right away are:
We may want to make rotate a top-level function though.
In the future it would also be nice to have: