🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Matrix math

Started by
-1 comments, last by ankan666 23 years, 11 months ago
hi, I have a question. If I have a point in 3d-space which I rotate with glRotate() and then multiply the points coordinates with the current MODELVIEW matrix, will I get the new rotated coordinates? I use this overloaded * operator to do the multiplies. (code taken from nate millers matrix code, it''s great) inline vec3_t matrix_t::operator*(vec3_t vec) { return vec3_t( vec.X() * m[0] + vec.Y() * m[4] + vec.Z() * m[8] + m[12], vec.X() * m[1] + vec.Y() * m[5] + vec.Z() * m[9] + m[13], vec.X() * m[2] + vec.Y() * m[6] + vec.Z() * m[10] + m[14]); }

This topic is closed to new replies.

Advertisement