[Bf-python] rotation matrices

Jonathan Merritt j.merritt at pgrad.unimelb.edu.au
Sun Sep 26 15:36:06 CEST 2004


Yann Vernier wrote:

>On Sat, Sep 25, 2004 at 12:01:50AM +0000, Tom Musgrove wrote:
>
>>rotatedmat = Blender.Mathutils.XYZRotationMatrix(AngleX,AngleY,AngleZ,4)
>>
>>http://skal.planet-d.net/demo/matrixfaq.htm#Q36
>>
>>This is needed for things like doing BVH import and export efficiently.
>>    
>>
>
>This sounds an awful lot like Euler.toMatrix().
>

I think it's almost identical!  Euler.toMatrix() is essentially a 
wrapper for the C function EulToMat3(), which is defined in:
    source/blender/blenlib/intern/arithb.c

If you take a look at the source code, EulToMat3() appears to use very 
similar optimisations to those listed on the website.

Jonathan Merritt.




More information about the Bf-python mailing list