
Matrices in assembler 

andrew (09:52 8/2/2001) (12:07 8/2/2001) (13:33 8/2/2001) (13:52 8/2/2001) (18:08 8/2/2001)


andrew 
Message #4737, posted at 09:52, 8/2/2001 
Unregistered user

Does anybody have any tips in implementing matrices in assembler? Is it something anybody has done? 

[ Log in to reply ] 

johnstlr 
Message #4738, posted at 12:07, 8/2/2001, in reply to message #4737 
Unregistered user

Not in raw assembler. I guess you mean matrix transformations rather than just matrices as building up translation, scaling and rotation matrices isn't that difficult. The obvious advice is to hand code the routine in BASIC or C first and then put it into ARM. You will probably find that you don't quite have enough registers to do it comfortably though. 

[ Log in to reply ] 

andrew 
Message #4739, posted at 13:33, 8/2/2001, in reply to message #4738 
Unregistered user

Well you need matrix transformations for rotation of say a set of vertices don't you? I'm thinking I would make the transformation values in a lookup table and then convert some kind of equivalent to matrices to multiply them with the values passed to the routine. 

[ Log in to reply ] 

johnstlr 
Message #4740, posted at 13:52, 8/2/2001, in reply to message #4739 
Unregistered user

Well you need matrix transformations for rotation of say a set of vertices don't you? Well yes but if you note I said that transformation isn't the same as simply creating the matrices (although to create a matrix capable of rotating around all axis then you do need matrix multiplication) I'm thinking I would make the transformation values in a lookup table and then convert some kind of equivalent to matrices to multiply them with the values passed to the routine. I don't see how the transformation values can be stored in a lookup table, unless you mean a lookup table for fixed point versions of rotation angles, as the transformation values will depend on the objects position, scale and rotation which can all change at runtime. Of course the camera can move as well. 

[ Log in to reply ] 

andrew 
Message #4741, posted at 18:08, 8/2/2001, in reply to message #4740 
Unregistered user

Yes that's what I mean  a lookup of fixed point values for each rotation angle. So as you recommend I'll have to do the transformation code itself in assembler. 

[ Log in to reply ] 

