本文整理汇总了C++中Helicopter::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Helicopter::draw方法的具体用法?C++ Helicopter::draw怎么用?C++ Helicopter::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helicopter
的用法示例。
在下文中一共展示了Helicopter::draw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: display
void display(void){
glClear (GL_COLOR_BUFFER_BIT);
// arena and helicopter
glPushMatrix();
arena.drawArena(ARENAX, ARENAY);
glPopMatrix();
if(!checkDefeat(player, ARENAX/2.0,ARENAY/2.0)){
// shots
glPushMatrix();
for(int i = 0 ; i < playerShots.size() ; i++) playerShots.at(i).draw();
if(enemyShots.size() > 0){
for(int i = 0 ; i < enemyShots.size() ; i++) enemyShots.at(i).draw();
}
glPopMatrix();
glPushMatrix();
player.draw();
glPopMatrix();
glPushMatrix();
enemies.at(0).draw();
enemies.at(1).draw();
enemies.at(2).draw();
glPopMatrix();
}
glEnd();
glutSwapBuffers();
}
示例2: drawScene
void drawScene() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
keyboardHandler();
camera();
moveBullets();
drawBullets();
//orthogonalStart();
//glBegin(GL_QUADS);
//glVertex2f(300, 300);
//glVertex2f(300, 800);
//glVertex2f(800, 800);
//glVertex2f(800, 300);
//glEnd();
//orthogonalEnd();
//GLfloat ambientLight[] = {0.3f, 0.3f, 0.3f, 1.0f};
//glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientLight);
//glRotatef(-_angle, 1.0f, 1.0f, 0.0f);
drawFloor(0.0f);
//drawTerrain();
bunker1.draw();
bunker2.draw();
sittingDuck1.draw();
atom1.draw();
atom2.draw();
atom3.draw();
building1.draw();
heli.draw();
hunter1->draw();
// cout << "Player position: " << playerInstance->getX() << " " << playerInstance->getZ()
// << " Hunter position: " << hunter1->getX() << " " << hunter1->getZ() << endl;
glutSwapBuffers();
}