Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 25, 2005, 9:29:41 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/physics: merged with trunk - with command svn merge -r 3866:HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/lib/graphics/importer/primitive_model.cc

    r3684 r3953  
    3333PrimitiveModel::PrimitiveModel(PRIMITIVE type, float size, unsigned int detail)
    3434{
    35   this->initialize();
    36 
    3735  switch (type)
    3836    {
     
    5452      break;
    5553    }
    56   this->importToGL ();
    57 
    58   this->cleanup();
     54  this->finalize();
    5955}
    6056
     
    123119            {
    124120              v1 = vertexCount+1;
    125               this->addFace(3, TEXCOORD, v1, v1, v3, v3, v4, v4);
     121              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4);
    126122            }
    127123          else if (j == detail)
    128124            {
    129125              v3 = vertexCount+2;
    130               this->addFace(3, TEXCOORD, v1, v1, v2, v2, v3, v3);
     126              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3);
    131127            }
    132128          else
    133             this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
     129            this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
    134130        }
    135131    }
     
    163159      p1 = 2*i+1;
    164160      p2 = 2*i+2;
    165       if (i <= detail);
    166161      p3 = 2*i+4;
    167162      p4 = 2*i+3;
    168163      // something is wrong here
    169       this->addFace(4, 0, p1, p2, p3, p4);
    170       this->addFace(3, 0, p4, p1, 2*detail+1);
    171       this->addFace(3, 0, p2, p3, 2*detail+2);
    172     }
    173   addFace(4,0, 2*detail-1, 2*detail, 2, 1);
    174   this->addFace(3, VERTEX, 1, 2*detail-1, 2*detail+1);
    175   this->addFace(3, VERTEX, 2*detail, 2, 2*detail+2);
     164      this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4);
     165      this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail+1);
     166      this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+2);
     167    }
     168  // caps
     169  this->addFace(4, VERTEX_ONLY, 2*detail-1, 2*detail, 2, 1);
     170  this->addFace(3, VERTEX_ONLY, 1, 2*detail-1, 2*detail+1);
     171  this->addFace(3, VERTEX_ONLY, 2*detail, 2, 2*detail+2);
    176172}
    177173
     
    207203      else
    208204        v2 = i+4;
    209       this->addFace(3, VERTEX, 1, v1, v2);
    210       this->addFace(3, VERTEX, 2, v1, v2);
     205      this->addFace(3, VERTEX_ONLY, 1, v1, v2);
     206      this->addFace(3, VERTEX_ONLY, 2, v1, v2);
    211207    }
    212208}
     
    238234        v3 = (i+1)*detail + (j+1);
    239235        v4 = i*detail + (j+1);
    240         this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
     236        this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
    241237      }
    242238}
Note: See TracChangeset for help on using the changeset viewer.