void Camera::RotateAroundAxisAtPoint(const double theta, const double vx, const double vy, const double vz, const double px, const double py, const double pz) { const double d = 1.0 / sqrt(vx * vx + vy * vy + vz * vz); const double x = vx * d; const double y = vy * d; const double z = vz * d; const double c = cos(theta); const double s = sin(theta); const double t = 1 - c; RotateAtPoint(t * x * x + c, t * x * y - z * s, t * x * z + y * s, t * x * y + z * s, t * y * y + c, t * y * z - x * s, t * x * z - y * s, t * z * y + x * s, t * z * z + c, px, py, pz); }
void RotateAtPoint(const double * const R, const double px, const double py, const double pz) { RotateAtPoint(R[0], R[1], R[2], R[3], R[4], R[5], R[6], R[7], R[8], px, py, pz); }
void RotateAtCenter(const double r0, const double r1, const double r2, const double r3, const double r4, const double r5, const double r6, const double r7, const double r8) { RotateAtPoint(r0, r1, r2, r3, r4, r5, r6, r7, r8, m_center[0], m_center[1], m_center[2]); }