[Bf-python] 3DVec * 4x4Matrix issue
Campbell Barton
cbarton at metavr.com
Wed Jul 26 12:14:54 CEST 2006
Any reason not to commit this change now the CVS's unfrozen
Ken Hughes wrote:
> 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
>
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
More information about the Bf-python
mailing list