bool GLCamera::Rotate(int xDelta, int yDelta, bool mod1, bool mod2) { double vRotate = AdjustDelta(xDelta, 2*M_PI/vpW, mod1, mod2); double hRotate = AdjustDelta(yDelta, M_PI/vpH, mod1, mod2); return RotateRad(hRotate, vRotate); }
void GLCamera::Configure(double fov, double dolly, double center[3], double hRotate, double vRotate) { fieldOfView = fov; if (fieldOfView > 170.0) fieldOfView = 170.0; else if (fieldOfView < 0.1) fieldOfView = 0.1; SetCenterVec(center[0], center[1], center[2]); fCamTrans.MoveLF(1, dolly); RotateRad(hRotate, vRotate); }
void MatrixStack::Rotate(float degrees, float x, float y, float z) { RotateRad(degrees * (float)M_PI / 180.0f, x, y, z); }