Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4597 in orxonox.OLD for orxonox/trunk/src/world_entities/skybox.cc


Ignore:
Timestamp:
Jun 11, 2005, 12:55:48 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: setClassID implemented in all files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/skybox.cc

    r4444 r4597  
    11
    2 /* 
     2/*
    33   orxonox - the future of 3D-vertical-scrollers
    44
     
    6868{
    6969  this->setClassID(CL_SKYBOX, "SkyBox");
     70
    7071  this->skyModel = NULL;
    7172  this->material = new Material*[6];
    72   for (int i = 0; i < 6; i++) 
     73  for (int i = 0; i < 6; i++)
    7374    {
    7475      this->material[i] = new Material();
     
    104105   usage: give this function an argument like
    105106   setTexture("skybox", "jpg");
    106    and it will convert this to 
     107   and it will convert this to
    107108   setTextures("skybox_top.jpg", "skybox_bottom.jpg", "skybox_left.jpg",
    108109               "skybox_right.jpg", "skybox_front.jpg", "skybox_back.jpg");
     
    123124  sprintf(front, "%s_front.%s", name, extension);
    124125  sprintf(back, "%s_back.%s", name, extension);
    125  
     126
    126127  this->setTextures(top, bottom, left, right, front, back);
    127128
     
    180181/**
    181182   \brief rebuilds the SkyBox
    182    
     183
    183184   this must be done, when changing the Size of the Skybox (runtime-efficency)
    184185*/
     
    189190  skyModel = new Model();
    190191
    191   this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size); 
     192  this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size);
    192193  this->skyModel->addVertex (0.5*size, -0.5*size, 0.5*size);
    193194  this->skyModel->addVertex (-0.5*size, 0.5*size, 0.5*size);
     
    222223  this->skyModel->setMaterial(material[5]);
    223224  this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
    224  
     225
    225226  this->skyModel->finalize();
    226227}
Note: See TracChangeset for help on using the changeset viewer.