Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 19, 2005, 6:56:16 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: more logic in adding face with the numerical adder

File:
1 edited

Legend:

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

    r3684 r3895  
    123123            {
    124124              v1 = vertexCount+1;
    125               this->addFace(3, TEXCOORD, v1, v1, v3, v3, v4, v4);
     125              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4);
    126126            }
    127127          else if (j == detail)
    128128            {
    129129              v3 = vertexCount+2;
    130               this->addFace(3, TEXCOORD, v1, v1, v2, v2, v3, v3);
     130              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3);
    131131            }
    132132          else
    133             this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
     133            this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
    134134        }
    135135    }
     
    167167      p4 = 2*i+3;
    168168      // 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);
     169      this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4);
     170      this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail+1);
     171      this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+2);
     172    }
     173  addFace(4, VERTEX_ONLY, 2*detail-1, 2*detail, 2, 1);
     174  this->addFace(3, VERTEX_ONLY, 1, 2*detail-1, 2*detail+1);
     175  this->addFace(3, VERTEX_ONLY, 2*detail, 2, 2*detail+2);
    176176}
    177177
     
    207207      else
    208208        v2 = i+4;
    209       this->addFace(3, VERTEX, 1, v1, v2);
    210       this->addFace(3, VERTEX, 2, v1, v2);
     209      this->addFace(3, VERTEX_ONLY, 1, v1, v2);
     210      this->addFace(3, VERTEX_ONLY, 2, v1, v2);
    211211    }
    212212}
     
    238238        v3 = (i+1)*detail + (j+1);
    239239        v4 = i*detail + (j+1);
    240         this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
     240        this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
    241241      }
    242242}
Note: See TracChangeset for help on using the changeset viewer.