本文整理汇总了C++中BoxNoiseStimulus::setSlantTilt方法的典型用法代码示例。如果您正苦于以下问题:C++ BoxNoiseStimulus::setSlantTilt方法的具体用法?C++ BoxNoiseStimulus::setSlantTilt怎么用?C++ BoxNoiseStimulus::setSlantTilt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoxNoiseStimulus
的用法示例。
在下文中一共展示了BoxNoiseStimulus::setSlantTilt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initVariables
void initVariables()
{
interoculardistance = str2num<double>(parameters.find("IOD"));
stimulusEmiCycles= atoi(parameters.find("StimulusEmiCycles").c_str());
trial.init(parameters);
factors = trial.getNext(); // Initialize the factors in order to start from trial 1
redDotsPlane.setNpoints(75); //XXX controllare densita di distribuzione dei punti
redDotsPlane.setDimensions(50,50,0.1);
redDotsPlane.setSlantTilt(factors["Slant"], factors["Tilt"] );
redDotsPlane.compute();
stimDrawer.setStimulus(&redDotsPlane);
stimDrawer.initList(&redDotsPlane);
/** Bound check things **/
signsX.push_back(false);
signsX.push_back(false);
signsY.push_back(false);
signsY.push_back(false);
headEyeCoords.init(Vector3d(-32.5,0,0),Vector3d(32.5,0,0), Vector3d(0,0,0),Vector3d(0,10,0),Vector3d(0,0,10),interoculardistance );
eyeCalibration=headEyeCoords.getRightEye();
model.load("../data/objmodels/cylinder.obj");
}
示例2: mouseFunc
void mouseFunc(int button, int state, int _x , int _y)
{
if ( trialMode == PROBEMODE )
{
glutWarpPointer(SCREEN_WIDTH/2,SCREEN_HEIGHT/2);
if ( button == GLUT_LEFT_BUTTON && (state==GLUT_DOWN) )
mouseButton=1;
if ( button == GLUT_RIGHT_BUTTON && (state==GLUT_DOWN) )
mouseButton=-1;
if( (button== GLUT_LEFT_BUTTON || button==GLUT_RIGHT_BUTTON) && (state==GLUT_UP) && (mouseButton!=0) )
{
double responseTime=responseTimer.getElapsedTimeInMilliSec();
double clickDelay=100; //milliseconds before the click is valid
if ( responseTime > clickDelay )
{
timeFrame=0.0; //this put the stimulus in the center each central time mouse is clicked in
if ( trial.isEmpty() )
{
responseFile << setw(6) << left << trialNumber << " " << factors["Def"] <<" " << factors["Tilt"] <<" " << factors["Slant"] << " " << factors["Anchored"] << " " << factors["RotationSpeed"] << " " << factors["FollowingSpeed"] << " " << factors["Onset"] << " " << (focalDistance - eyeCalibration.z()) << " " << mouseButton << " " << responseTime << endl;
cleanup();
exit(0);
}
else
{
responseFile << setw(6) << left << trialNumber << " " << factors["Def"] <<" " << factors["Tilt"] <<" " << factors["Slant"] << " " << factors["Anchored"] << " " << factors["RotationSpeed"] << " " << factors["FollowingSpeed"] << " " << factors["Onset"] << " " << (focalDistance - eyeCalibration.z()) << " " << mouseButton << " " << responseTime << endl;
factors = trial.getNext();
trialNumber++;
}
advanceTrial();
redDotsPlane.setDimensions(50,50,0.1);
redDotsPlane.setSlantTilt(factors["Slant"], factors["Tilt"] );
redDotsPlane.compute();
stimDrawer.initList(&redDotsPlane);
mouseButton=0;
}
}
}
glutPostRedisplay();
}