Much ado about guMtxRotAxisDeg(....) February 07, 2011 10:48AM | Registered: 13 years ago Posts: 2 |
f32 camXRot = -45; f32 camYRot = 0; guVector aboutXAxis = {1,0,0}; guVector aboutYAxis = {0,1,0};
guMtxIdentity(model); guMtxRotAxisDeg(model, &aboutXAxis, camXRot); guMtxRotAxisDeg(model, &aboutYAxis, camYRot); guMtxTransApply(model, model, 0.0f, 0.0f, -8.0f); guMtxConcat(view,model,modelview); // load the modelview matrix into matrix memory GX_LoadPosMtxImm(modelview, GX_PNMTX0);
Re: Much ado about guMtxRotAxisDeg(....) February 07, 2011 06:07PM | Registered: 14 years ago Posts: 379 |
Mtx model, modelview; Mtx model2, model3; Mtx mrx, mry,mrz; guMtxIdentity(model); guMtxIdentity(model2); guMtxRotAxisDeg(model, &pitchAxis, pitch); guMtxTransApply(model, model, x, y, z); guMtxRotAxisDeg(mrx, &yawAxis, yaw2); guMtxRotAxisDeg(mry, &pitchAxis, pitch2); guMtxRotAxisDeg(mrz, &rollAxis, roll2); guMtxConcat(mrx,mry,mry); guMtxConcat(mry,mrz,model2); guMtxTransApply(model2, model2, x2, y2, z2); guMtxConcat(model,model2,model3); guMtxConcat(view,model3,modelview); // load the modelview matrix into matrix memory GX_LoadPosMtxImm(modelview, GX_PNMTX0);
Re: Much ado about guMtxRotAxisDeg(....) February 09, 2011 02:12AM | Registered: 15 years ago Posts: 62 |
Re: Much ado about guMtxRotAxisDeg(....) February 09, 2011 05:18AM | Registered: 13 years ago Posts: 2 |
Re: Much ado about guMtxRotAxisDeg(....) February 09, 2011 12:32PM | Registered: 14 years ago Posts: 379 |
I hardly use the doxygen from libogc. I found out how to work with gu/gx by looking at sources from different projects on wiibrew.orgQuote
glennxserge
I was assuming that gu would have a wrapper for a glRotate type function, and the libogc doxygen documentation site only has a couple of these matrix functions listed so it is hard to know what they do. In any case you've just made my day.
Re: Much ado about guMtxRotAxisDeg(....) February 11, 2011 12:37AM | Registered: 13 years ago Posts: 363 |
Re: Much ado about guMtxRotAxisDeg(....) February 11, 2011 10:30AM | Registered: 14 years ago Posts: 379 |