📄 low_barrel.cxx
字号:
/* bzflag
* Copyright (c) 1993 - 2004 Tim Riker
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the license found in the file
* named COPYING that should have accompanied this file.
*
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#include "TankSceneNode.h"
#define doVertex3f doVertex3f
#define doNormal3f doNormal3f
void buildLowBarrel ( void )
{
glShadeModel(GL_SMOOTH);
glBegin(GL_TRIANGLE_STRIP);
doNormal3f(0.0f, -1.0f, 0.0f);
doVertex3f(1.570f, -0.18f, 1.530f);
doVertex3f(4.940f, -0.126f, 1.530f);
doNormal3f(0.0f, 0.0f, 1.0f);
doVertex3f(1.570f, 0.0f, 1.710f);
doVertex3f(4.940f, 0.0f, 1.660f);
doNormal3f(0.0f, 1.0f, 0.0f);
doVertex3f(1.570f, 0.18f, 1.530f);
doVertex3f(4.940f, 0.126f, 1.530f);
doNormal3f(0.0f, 0.0f, -1.0f);
doVertex3f(1.570f, 0.0f, 1.350f);
doVertex3f(4.940f, 0.0f, 1.410f);
doNormal3f(0.0f, -1.0f, 0.0f);
doVertex3f(1.570f, -0.18f, 1.530f);
doVertex3f(4.940f, -0.126f, 1.530f);
glEnd();
glShadeModel(GL_FLAT);
glBegin(GL_TRIANGLE_FAN);
doNormal3f(1.000000f, 0.000000f, 0.000000f);
doVertex3f(4.940f, 0.0f, 1.410f);
doVertex3f(4.940f, 0.126f, 1.530f);
doVertex3f(4.940f, 0.0f, 1.660f);
doVertex3f(4.940f, -0.126f, 1.530f);
glEnd();
}
/*
* Local Variables: ***
* mode:C ***
* tab-width: 8 ***
* c-basic-offset: 2 ***
* indent-tabs-mode: t ***
* End: ***
* ex: shiftwidth=2 tabstop=8
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -