Author Topic: Rotate SimpleVector around arbitrary axis  (Read 2232 times)

Offline Dinin

  • byte
  • *
  • Posts: 28
    • View Profile
Rotate SimpleVector around arbitrary axis
« on: May 09, 2012, 03:10:57 pm »
Hi !

I want to rotate a SimpleVector around a arbitrary axis.
Matrix and Object3D has already a Rotate with a parameter SimpleVector for a arbitrary axis, but SimpleVector not.
So i tried to get Rotationmatrix from the Vector to rotate, rotate the matrix around my axis and then ...

SimpleVector has no SetRotationMatrix and so i dont know how to get the rotationmatrix back to SimpleVector.
Perhaps i can use SimpleVector.Rotate(Matrix), but for that i need a 'differenz Matrix' of the old and new (after Rotation of matrix) Matrix, and i dont know how to get.
A simple minus of the 2 Matrix did not work.

Any suggestions how to solve this ?

Thanks and greeds
Dinin

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Rotate SimpleVector around arbitrary axis
« Reply #1 on: May 09, 2012, 08:45:46 pm »
Just matMul the SimpleVector with a rotated Matrix.

Offline Dinin

  • byte
  • *
  • Posts: 28
    • View Profile
Re: Rotate SimpleVector around arbitrary axis
« Reply #2 on: May 19, 2012, 07:35:02 pm »
 :) thanks for help.