I have the need to rotate the data in a bidimensional square byte matrix in any degree (0~359)
My matrix is composed by a 16x16 byte square like this:
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][7F][7F][7F][7F][7F][7F][7F][7F][00][00]
[00][00][00][00][00][00][7F][7F][7F][7F][7F][7F][7F][7F][00][00]
[00][00][00][00][00][00][7F][7F][7F][7F][7F][7F][7F][7F][00][00]
[00][00][00][00][00][00][7F][7F][7F][7F][7F][7F][7F][7F][00][00]
[00][00][00][00][00][00][7F][7F][7F][7F][7F][7F][7F][7F][00][00]
[00][00][00][00][00][00][00][00][7F][7F][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
This matrix represents a collision map of an item in a game. The numbers in the matrix represents the height of each position in the game world to be used to determine collision with other objects in the game.
I need to be able to rotate this collision map (the matrix data), as the object in the game can be rotated.
Does anyone have any idea how I could accomplish this?
Thank you very much!