void CMSSM_spectrum_generator<T>::write_running_couplings(const std::string& filename) const { CMSSM<T> tmp_model(model); tmp_model.run_to(low_scale); MSSM_parameter_getter parameter_getter; Coupling_monitor<CMSSM<T>, MSSM_parameter_getter> coupling_monitor(tmp_model, parameter_getter); coupling_monitor.run(low_scale, high_scale, 100, true); coupling_monitor.write_to_file(filename); }
bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model) { if (isAgentAvatarValid() && gAgentAvatarp->hasHUDAttachment()) { F32 zoom_level = gAgentCamera.mHUDCurZoom; LLBBox hud_bbox = gAgentAvatarp->getHUDBBox(); F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f); proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth); proj.element(2,2) = -0.01f; F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect(); glh::matrix4f mat; F32 scale_x = (F32)gViewerWindow->getWorldViewWidthScaled() / (F32)screen_region.getWidth(); F32 scale_y = (F32)gViewerWindow->getWorldViewHeightScaled() / (F32)screen_region.getHeight(); mat.set_scale(glh::vec3f(scale_x, scale_y, 1.f)); mat.set_translate( glh::vec3f(clamp_rescale((F32)(screen_region.getCenterX() - screen_region.mLeft), 0.f, (F32)gViewerWindow->getWorldViewWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio), clamp_rescale((F32)(screen_region.getCenterY() - screen_region.mBottom), 0.f, (F32)gViewerWindow->getWorldViewHeightScaled(), 0.5f * scale_y, -0.5f * scale_y), 0.f)); proj *= mat; glh::matrix4f tmp_model((GLfloat*) OGL_TO_CFR_ROTATION); mat.set_scale(glh::vec3f(zoom_level, zoom_level, zoom_level)); mat.set_translate(glh::vec3f(-hud_bbox.getCenterLocal().mV[VX] + (hud_depth * 0.5f), 0.f, 0.f)); tmp_model *= mat; model = tmp_model; return TRUE; } else { return FALSE; } }