[Bf-python] 3DVec * 4x4Matrix issue
Gilbert, Joseph T.
jgilbert at tigr.ORG
Mon Jul 24 16:04:12 CEST 2006
Thx Ken :)
-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Ken Hughes
Sent: Monday, July 24, 2006 9:59 AM
To: Blender Foundation Python list
Subject: Re: [Bf-python] 3DVec * 4x4Matrix issue
Campbell Barton wrote:
> Just tried and assign vec.w=1 to a 3d matrix dosent work.
> Aside from that, converting to a 4d vec isnt ideal because it wont
work
> for wrapped vecs.
>
> Would changing the functionality to be like this be acceptable ( in C
> though )
>
> mtx= ob.matrixWorld
> vec= vec*mtx
> vec= vec+mtx.translationPart()
The current code always makes a copy of the vector and is checking for a
3d vect * 4x4 matrix, but then sets vecCopy[3]=0.0. I just changed this
to VecCopy[3]=1.0 and everything's fine. This is in
row_vector_multiplication() and column_vector_multiplication().
Ken
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python
More information about the Bf-python
mailing list