QPointF QxrdCenterFinder::getXY(double tth, double chi) { double x,y; double beta = get_DetectorTilt()*M_PI/180.0; double rot = get_TiltPlaneRotation()*M_PI/180.0; if (get_ImplementTilt()) { QxrdDetectorGeometry::getXY(get_CenterX(), get_CenterY(), get_DetectorDistance(), get_Energy(), convertTwoThetaToQ(tth, convertEnergyToWavelength(get_Energy())), chi, get_DetectorXPixelSize(), get_DetectorYPixelSize(), rot, cos(beta), sin(beta), 1.0, 0.0, cos(rot), sin(rot), &x, &y); } else { QxrdDetectorGeometry::getXY(get_CenterX(), get_CenterY(), get_DetectorDistance(), get_Energy(), convertTwoThetaToQ(tth, convertEnergyToWavelength(get_Energy())), chi, get_DetectorXPixelSize(), get_DetectorYPixelSize(), rot, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, &x, &y); } return QPointF(x,y); }
int FragTrap::vaulthunter_dot_exe(std::string const & target) { std::string a[5][2] = {{"fireBall","true"},{"gun","true"},{"stone","false"},{"baton","false"},{"dague","false"}}; int retRand = rand() % 5; if (get_Energy() > 25){ this->set_Energy(get_Energy() - 25); std::cout << "FR4G-TP :: " << this->get_Name() << " attack " << target << " with " << a[retRand][0] + " " << std::endl; if(a[retRand][1] == "true") { return this->rangedAttack(target); } else { return this->meleeAttack(target); } } return 0; };
double QxrdCenterFinder::getChi(double x, double y) const { double q,chi; double beta = get_DetectorTilt()*M_PI/180.0; double rot = get_TiltPlaneRotation()*M_PI/180.0; if (get_ImplementTilt()) { getQChi(get_CenterX(), get_CenterY(), get_DetectorDistance(), get_Energy(), x, y, get_DetectorXPixelSize(), get_DetectorYPixelSize(), rot, cos(beta), sin(beta), 1.0, 0.0, cos(rot), sin(rot), &q, &chi); } else { getQChi(get_CenterX(), get_CenterY(), get_DetectorDistance(), get_Energy(), x, y, get_DetectorXPixelSize(), get_DetectorYPixelSize(), 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, &q, &chi); } return chi; }