[Bf-python] mathutils

models at paposo.com models at paposo.com
Wed Nov 12 20:23:25 CET 2003


Good point. Also I can't import random either from the python libs for some
reason. Don't know why. I think it would make a good addition to a mathutils
too. (There's only like 5 functions in the whole file!) Definately not the
stuff that python can do already though on it's own though. I guess it
doesn't have to MATLIB part II but maybe enough where we can easily add new
math utils to a module easily when they seem relavant to the community i
guess :) Things like quats, eulers, dot, crosses, vector stuff if you pass
it the items.
I guess you could create objects like:
  myQ = newQuat(1,0,0,1,1,1,0,0,1.3,3,3,3) or something and then just pass
the quat around:
  myE = quatToEuler(myQ)
Just an idea....
We already have a vector.c in the python libs for working with vectors
(thanks willian!) and it looks like a matrix object is defined there. Maybe
these could be used as classes for the math module. Maybe some additional
classes to the vector module such as Matrix3 and Matrix4 to supplement the
athrib.c functions.




More information about the Bf-python mailing list