Regarding TransformVec

Home / Forums / Marmalade Archive / IwGraphics / Regarding TransformVec
1 reply [Last post]
by: proteinbeer
Status: Offline
Joined: 2010-12-27

I'm trying to manipulate look and right vector using matrix that has been already rotated.

double rad = acos(vLook.Dot(vDir)); // get the radian

CIwMat matrix(CIwMat::g_Identity);
matrix.SetAxisAngle(CIwVec3(0, 1, 0).GetNormalised(), rad); // rotate it and store its rotation data

// upuntil now it works.

CIwVec3 temp;
temp = matrix.TransformVec(vLook); // but here I keep getting zero no matter what matrix is used

Any ideas?

ps. I can't use float type to rotate matrix? SetAxisAngle keeps mentioning iwangle type but it is integer. what if I want to use float instead?

by: Mark S
Status: Offline
Joined: 2009-10-23
What does the matrix look

What does the matrix look like?

You can convert from a float to iwangle using IW_ANGLE_FROM_DEGREES or IW_ANGLE_FROM_RADIANS.

Latest Posts

Latest Comments

Top Contributors

  • amanda
  • riaan
  • alexand3
  • alexand4
  • alexand7
  • alexand889
  • alexand12191
  • remote9991
  • remote9992
  • test