本文整理汇总了C++中SkyBox::shape方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyBox::shape方法的具体用法?C++ SkyBox::shape怎么用?C++ SkyBox::shape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyBox
的用法示例。
在下文中一共展示了SkyBox::shape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
bool myWorld::Init(int perso)
{
cont_cond_t cond;
uint8 c;
GLboolean xp = GL_FALSE;
GLboolean yp = GL_FALSE;
Vehicle *vehicle;
int i;
int f=NEG;
float d=0.0;
int ft=f;
int throttle=0;
int brake=0;
int ang=0;
ogg sultan("/rd/sons/ogg/sultanTribes.ogg");
init();
//speed tabulation
for(i=-NEG;i<0;i++)
aSpeed[i+NEG]=-(0.24*(float)7*i/(PLUS+NEG)+2)* log((float) -10*(float)7*i/(PLUS+NEG)+1)*3.6;
for(i=NEG;i<PLUS+NEG;i++)
aSpeed[i]=(-0.11*(float)(7*(i-NEG))/(PLUS+NEG)+2)*5* log((float) 3*(float)7*(i-NEG)/(PLUS+NEG)+1)*3.6;
/* Declaration des objets */
SkyBox *skyBox = new SkyBox(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
Landscape *cliff = new Landscape(JPEG, "/rd/terrain.jpg", "/rd/terrain.pcx", 256.0f, 32, 1, 1, 0);
Landscape *sand = new Landscape(JPEG, "/rd/circuit.jpg", "/rd/circuit.pcx", 450.0f, 30, 4, 1/3.0f, -12.0f);
PalmTree *palmier = new PalmTree("/rd/palmier.png", 69.0f, (sand->getYFromXZ(69,12)) + 10, 12.0f, 20.0f, 20.0f, 20.0f);
PalmTree *cactus= new PalmTree("/rd/cactus.png", 10.0f, sand->getYFromXZ(10, 30) + 10, 30.0f, 40.0f, 40.0f, 40.0f);
Landscape *sea = new Landscape(NJPEG, NULL, "/rd/eau.pcx", 700.0f, 7, 4, 0.0f, 3.0f, 0.5f, 0.6f, 0.8f);
TheLittleHouseOnThePrairie *house = new TheLittleHouseOnThePrairie(-170.0f, 4.5f, -140.0f, 4.0f, 4.0f, 4.0f);
StartPane *startPane = new StartPane(-155.0f,sand->getYFromXZ(69,12) , 35.0f, 25.0f, 50.0f, 50.0f);
Caisse *caisse1 = new Caisse("/rd/decor/caisses/caisseGrande.png", -320.0f, -5.0f, -280.0f, 15.0f, 15.0f, 15.0f);
Caisse *caisse2 = new Caisse("/rd/decor/caisses/caisseCroix.png", 80.0f, 2.0f, -280.0f, 15.0f, 15.0f, 15.0f);
/*Caisse *caisse3 = new Caisse("/cd/decor/caisses/explosif.png", 280.0f, 2.0f, -220.0f, 15.0f, 15.0f, 15.0f);*/
/* Character creation */
switch(perso + 2)
{
case 2:
vehicle = new OisisVehicle(-155.0f, (sand->getYFromXZ (-155, 35)) + 1.25, 35.0f,
-155.0f, (sand->getYFromXZ (-155, 34.9)) + 1.25, 34.9f,
6.25f, 2.5f, 2.5f,
1.5);
break;
case 3:
vehicle = new MomoVehicle(-155.0f, sand->getYFromXZ (-155, 35) + 1.25, 35.0f,
-155.0f, sand->getYFromXZ (-155, 34.9) + 1.25 - 0.5, 34.9f,
2.5f , 5.0f, 2.5f,
0.5);
break;
case 4:
vehicle = new NoelVehicle(-155.0f, sand->getYFromXZ (-155, 35) + 7.5, 35.0f,
-155.0f, sand->getYFromXZ (-155, 34.9) + 7.5 - 10, 34.9f,
3.25f , 15.0f, 13.0f,
10);
break;
default:
vehicle = new NoelVehicle(-155.0f, sand->getYFromXZ (-155, 35) + 7.5, 35.0f,
-155.0f, sand->getYFromXZ (-155, 34.9) + 7.5, 34.9f,
3.25f , 15.0f, 13.0f,
10);
break;
}
sultan.play(1);
//vehicle->updateSlope(sand);
//Vector3D tmp1= (vehicle->getPosition()) + (Vector3D (0, 10,17.5));
/*Vector3D tmp1= (vehicle->getPosition()) + (Vector3D (0, 10 - vehicle->getOffset(), 17.5));
Vector3D tmp2= Vector3D (0,1,0);
Camera cam(tmp1, vehicle->getPosition(), tmp2);*/
Vector3D tmp1= (vehicle->getPosition()) + (Vector3D (0, 10 - vehicle->getOffset(), 17.5));
Vector3D tmp3= Vector3D (0,1,0);
Vector3D tmp2 = vehicle->getPosition();
tmp2.y -= vehicle->getOffset();
Camera cam(tmp1, tmp2, tmp3);
palmier->shape();
cactus->setColor(0.0f, 0.6f, 0.2f);
cactus->shape();
cliff->shape();
sand->shape();
sea->shape();
startPane->shape();
house->shape();
vehicle->shape();
caisse1->shape();
//.........这里部分代码省略.........