This is heavily used in collision detection. It's much cheaper to do the inverse transform of a ray/support function direction vector/etc, than to transform all the vertices of a primitive/complex shape.
We've found ourselves writing: transform.inverse_transform().and_then(|inverse| Some(inverse.transform_vector(some_vec))) over and over, so we felt there was a solid use case for having this in cgmath. It is also something that specific implementations of the Transform trait can do a much better version of than doing the full inverse of the transform, since vector space has no concept of translation.
This is heavily used in collision detection. It's much cheaper to do the inverse transform of a ray/support function direction vector/etc, than to transform all the vertices of a primitive/complex shape.
We've found ourselves writing:
transform.inverse_transform().and_then(|inverse| Some(inverse.transform_vector(some_vec)))
over and over, so we felt there was a solid use case for having this in cgmath. It is also something that specific implementations of the Transform trait can do a much better version of than doing the full inverse of the transform, since vector space has no concept of translation.