Regarding TransformVec

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

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
Points: 81040
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

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810