void Window::close () { if (hDC() == NULL) throw Uninitialized (); // deselect rendering context and delete it //wglMakeCurrent(hDC_, NULL); //This causes a crash! //wglDeleteContext(hRC_); //So does this! // send WM_QUIT to message queue PostQuitMessage(0); }
static SE2 exp(const AbstractVector<V>& uw) { assert_size_is<3>(uw); Scalar A,B; compute_coef(uw[2], A, B); SE2<Scalar> exp_uw((Uninitialized())); SO2<Scalar>::compute_exp_matrix(uw[2], exp_uw.R.R); exp_uw.translation()[0] = A*uw[0] - B*uw[1]; exp_uw.translation()[1] = B*uw[0] + A*uw[1]; return exp_uw; }