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


C++ Arcball::applyRotationMatrix方法代码示例

本文整理汇总了C++中Arcball::applyRotationMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ Arcball::applyRotationMatrix方法的具体用法?C++ Arcball::applyRotationMatrix怎么用?C++ Arcball::applyRotationMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Arcball的用法示例。


在下文中一共展示了Arcball::applyRotationMatrix方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: drawThings

void drawThings()
{
    glPushMatrix();
    glLoadIdentity();
    glTranslated(0,0,eyeDistance);
    arcball.applyRotationMatrix();

    glEnable(GL_TEXTURE_3D);
    glBindTexture(GL_TEXTURE_3D, texName);
    shader->begin();
    shader->setUniform1f("c",parabolaQuadraticTerm);
    GLUquadric *quad = gluNewQuadric();
    gluQuadricDrawStyle(quad,GLU_FILL);
    gluDisk(quad,0.0,0.5,100,100);
    gluDeleteQuadric(quad);
    /*
    Grid grid;
    grid.init(-0.5,0.5,-0.5,0.5);
    grid.setRowsAndCols(iWidth,iDepth);
    grid.draw(true);
*/
    shader->end();
    glDisable(GL_TEXTURE_3D);
    glPopMatrix();

    glPushMatrix();
    glLoadIdentity();
    glTranslated(0,0,eyeDistance+0.5);
    arcball.applyRotationMatrix();
    glutWireCube(1);
    glPopMatrix();
    getGLerrors();
}
开发者ID:guendas,项目名称:cncsvision,代码行数:33,代码来源:testGLSLTexture3D.cpp

示例2: drawThings

void drawThings()
{
    glDisable(GL_LIGHTING);
    double a = angle*M_PI/180.0;
    double L = 2.5;

    glPushMatrix();
    glLoadIdentity();
    glTranslated(0,0,focalDistance);
    arcball.applyRotationMatrix();
    glBegin(GL_LINES);
    glVertex3d(-8,0,0);
    glVertex3d(8,0,0);
    glEnd();
    //glutWireSphere(1,20,20);
    glPopMatrix();

    /*
    glPushMatrix();
    glTranslated(0,0,-L/2);
    glRotated(angle/2,1,0,0);
    //glScaled(1,1.0/sin(0.5*a),1);
    stimDrawerPlanes[0].draw();
    glPopMatrix();
    */

    /*
    int n=0;
    double h = 1.0;
    double salfa = sin(a);
    double calfa = cos(a);
    glBegin(GL_POINTS);
    while (n<1000)
    {
        double x = mathcommon::unifRand(-L/2,L/2);
        double y = mathcommon::unifRand(-h/2,h/2);
        double z = mathcommon::unifRand(-L/2,L/2);
        if ( y<= z*salfa+1E-2 && y>= z*salfa-1E-2)
        {
            n++;
            glVertex3d(x,y,z);
        }
    }
    glEnd();
    */
    /*
    glPushMatrix();
    glRotated(-angle/2,1,0,0);
    glScaled(1,1/sin(angle*M_PI/180.0),1);
    stimDrawerPlanes[1].draw();
    glPopMatrix();
    */
    glPushMatrix();
    glLoadIdentity();
    glTranslated(0,0,focalDistance);
    arcball.applyRotationMatrix();
    stimDrawer.draw();
    glPopMatrix();
}
开发者ID:,项目名称:,代码行数:59,代码来源:

示例3: drawScene

void drawScene()
{   
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);	// clear background to black
	glClearDepth(100.0);					// set depth buffer to the most distant value
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glClearColor(0,0,0,1);
	glShadeModel(GL_SMOOTH);
	
	glEnable(GL_DEPTH_TEST);
	//glEnable(GL_CULL_FACE);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
	glTranslatef(0.0f, 0.0f, eyeZ+eyeDistance);
	arcball.applyRotationMatrix();
	glTranslatef(0,0,eyeShift);

	// Qua mettere tutte le funzioni di disegno
	glPushMatrix();
	glScalef(3,3,3);
	drawReference();
	glPopMatrix();
	drawGeneratedPlanes();
	//grid.draw();
	glRotated(90,1,0,0);
	glColor3fv(glGray50);
	grid.draw();
	//drawInfo();
	glutSwapBuffers();
}
开发者ID:,项目名称:,代码行数:29,代码来源:

示例4: drawScene

void drawScene()
{   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    frame+=0.01;
    glTranslatef(0.0f, 0.0f, eyeZ+eyeDistance);
    arcball.applyRotationMatrix();

    drawThings();
    glutSwapBuffers();
}
开发者ID:guendas,项目名称:cncsvision,代码行数:11,代码来源:testGLSLcubemapSkyBox.cpp

示例5: drawGLScene

void drawGLScene() {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glShadeModel(GL_SMOOTH);
    
    glEnable(GL_DEPTH_TEST);
    //glEnable(GL_CULL_FACE);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    glTranslatef(0.0f, 0.0f, eyeZ+eyeDistance);
    arcball.applyRotationMatrix();

    drawErnstBanks(stimulus_height);

    glutSwapBuffers();
}
开发者ID:guendas,项目名称:cncsvision,代码行数:15,代码来源:testBrown2.cpp

示例6: drawThings

void drawThings()
{
    glPushMatrix();
    glLoadIdentity();
    glTranslated(0,0,eyeZ);
    arcball.applyRotationMatrix();

    shader->begin();
    shader->setUniform1f("time",frame);
    obj.draw(GL_FILL);
    //glutSolidTorus(0.5,1.0,50,50);
    //glutSolidTeapot(1);
    //drawCylinder(1,0,0,-0.5,0,0,0.5,64,0);
    shader->end();
    glPopMatrix();
    getGLerrors();

    // Draw the light
    glPushMatrix();
    arcball.applyRotationMatrix();
    glTranslated(lightPos[0],lightPos[1],lightPos[2]);
    glutWireSphere(1,10,10);
    glPopMatrix();
}
开发者ID:guendas,项目名称:cncsvision,代码行数:24,代码来源:testGLSLcubemapSkyBox.cpp

示例7: drawScene

/**
 * @brief drawScene
 */
void drawScene()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    
    glShadeModel(GL_SMOOTH);
    glEnable(GL_DEPTH_TEST);
    glMatrixMode(GL_MODELVIEW);

    glLoadIdentity();
    glPushMatrix();
    glTranslated(0,0,-10+eyeZ);
	//glScaled(0.01,0.01,0.01);
    arcball.applyRotationMatrix();
    obj.draw(GL_POINT);
    glPopMatrix();

    glutSwapBuffers();
}
开发者ID:guendas,项目名称:cncsvision,代码行数:21,代码来源:testObjLoaderVisualization.cpp

示例8: drawErnstBanks

void drawErnstBanks(double height)
{
	glLoadIdentity();
	glTranslated(0.0,0,Z);
	arcball.applyRotationMatrix();

	// print top sector
	glPushMatrix();
	glTranslated(0, (150+height)/4.0, 0);
	draw_ernst_banks[0].draw();
	glPopMatrix();

	// print bottom sector
	glPushMatrix();
	glTranslated(0, -(150+height)/4.0, 0);
	draw_ernst_banks[1].draw();
	glPopMatrix();

	// print relief
	glPushMatrix();
	glTranslated(0, 0, 0);
	draw_ernst_banks[2].draw();
	glPopMatrix();
}
开发者ID:guendas,项目名称:cncsvision,代码行数:24,代码来源:testBrown2.cpp


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