kpreid/cubes — Issue #6: Implement inversion of rotations
Author: kpreid
Created: 2012-01-20 03:37:12+00:00
State: open

Subcube collision for rotated blocks requires transforming the player's AABB into the block world's coordinate system, then inversely transforming the subcubes' AABBs, but we have no algorithm to invert arbitrary rotation codes.

The approaches I have thought of are:

* The elegant way: work out and implement the bit-twiddling to perform an arbitrary inversion.
* Brute-force determine the inverses, such as by composing all pairs of rotations and noting which ones result in the identity. (This procedure could also build a table of composition of rotations, as well as building lookup tables for potentially increasing the efficiency of rotations.)