当前位置: 首页>>代码示例>>C++>>正文


C++ BoxNoiseStimulus::setSlantTilt方法代码示例

本文整理汇总了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");
}
开发者ID:,项目名称:,代码行数:26,代码来源:

示例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();
}
开发者ID:,项目名称:,代码行数:42,代码来源:


注:本文中的BoxNoiseStimulus::setSlantTilt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。