fantastic :) but how would i get the 3x3 rotation matrix

On Sat, May 15, 2010 at 8:17 PM, Adam Mechtley <[email protected]>wrote:

> tMatrix.eulerRotation() is returning an MEulerRotation object, not a 3x3
> matrix. Thus, temp[0] is rotation around the x-axis, temp[1] is rotation
> around the y-axis, and temp[2] is rotation around z. Not sure why trying to
> access the higher indices doesn't just give you an OOB error.
>
> If you want Euler rotation as a matrix for some reason, then you need to do
> something like:
>
> temp=tMatrix.eulerRotation().asMatrix() # note: this is a 4x4 matrix
>
>
> On Sat, May 15, 2010 at 5:33 AM, matthew evans <
> [email protected]> wrote:
>
>> hey guys, im still playing around with matrices. iv created a node to
>> deal with geometry matrices, when the world matrix is plugged into the
>> node it appears perfect in the attribute editor, but when i try to use
>> the eulerRotation of the matrix, the values become completely
>> different.
>>
>> can anyone explain why this code does not work:
>>
>> inputMatrix=block.inputValue(RigidBody.objWorldMatrix).asMatrix()
>> tMatrix=om.MTransformationMatrix(inputMatrix)
>> temp=tMatrix.eulerRotation()
>>
>> rot=[temp[0],temp[1],temp[2],temp[3],temp[4],temp[5],temp[6],temp[7],temp[8]]
>>
>>
>> from this rot =[1.5707963267949066, -1.5706444258003933,
>> 3.1415926535897931, 3.1415926535897931, 3.1415926535897931,
>> 3.1415926535897931, 3.1415926535897931, 3.1415926535897931,
>> 3.1415926535897931]
>>
>> thanks for any help :)
>>
>> --
>> http://groups.google.com/group/python_inside_maya
>
>
>  --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to