Some questions and comments inspired an update of the orientation matrix tutorial (so the previous version was not the final one, and this one is probably not either!):
- I have improved the layout. It is now one column, which makes it easier to copy the code.
- There are a few new sections:[LIST]
- rotating children and non-children (root objects);
- determining whether an object is upright or not;
- determining in which wind direction (North, South, …) an object is facing; and
- determining on which side of a plane a point lies. [/LIST]The usual disclaimer: it is math and code heavy…
http://www.luma.co.za/labs/tutorials/rotation.zip (250 KB)
PS If you are interested in image / game programming, you might also check out some of the other items on the luma/labs page!