[Bf-python] Coordinatesystem problem

Yann Vernier yann at algonet.se
Fri Jan 14 07:13:53 CET 2005


On Wed, Jan 12, 2005 at 05:30:38PM -0400, wim van hoydonck wrote:
> # matrix(4x3) vector multiplication
> def mulmatvec4x3(a, b):
> 	# a is vector, b is matrix
> 	r = [0, 0, 0]
> 	r[0] = a[0]*b[0][0] + a[1]*b[1][0] + a[2]*b[2][0] + b[3][0]
> 	r[1] = a[0]*b[0][1] + a[1]*b[1][1] + a[2]*b[2][1] + b[3][1]
> 	r[2] = a[0]*b[0][2] + a[1]*b[1][2] + a[2]*b[2][2] + b[3][2]
> 	return r

I think this would be a lot faster if you would just use Mathutils.
The downside is you currently need to do vector.resize4D() first. 



More information about the Bf-python mailing list