C++ customIceNode rotation

Discussions concerning programming of SOFTIMAGE©
jujut
Posts: 23
Joined: 28 Feb 2011, 00:26

C++ customIceNode rotation

Post by jujut » 14 May 2013, 20:08

Hello,

I'm building building a custom ice node in c++, and i 've a problem, i don't know how to do a rotation by matrix

How can i do something like this :

Code: Select all

axis = 1,0,0
angle = 90
matrix (identity)

rotation (Matrix, angle, axis)

newPointPosition = pointposition * Matrix
Thanks in advance for your help

scaron
Posts: 119
Joined: 08 Jul 2009, 03:16

Re: C++ customIceNode rotation

Post by scaron » 16 May 2013, 00:52


Ahmidou
Posts: 106
Joined: 04 Jan 2010, 13:00

Re: C++ customIceNode rotation

Post by Ahmidou » 16 May 2013, 06:23

unfortunatly the CRotationf class don't have the GetMatrix3() function like the CRotation one.
There is maybe an easier way, but I'm using this function:

https://www.si-community.com/forum/v ... 694#p32694

jujut
Posts: 23
Joined: 28 Feb 2011, 00:26

Re: C++ customIceNode rotation

Post by jujut » 17 May 2013, 22:01

Thanks for the reply

@Ahmidou : Thanks it's work now, i just have to convert the angle into radians and to invert the result matrix.

Below a picture of the compound on which i am working
Image

Ahmidou
Posts: 106
Joined: 04 Jan 2010, 13:00

Re: C++ customIceNode rotation

Post by Ahmidou » 17 May 2013, 23:51

Nice, I'm glad it helped!