Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2836 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Nov 12, 2004, 1:49:40 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: ability to read in specular shininess

Location:
orxonox/trunk/importer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/material.cc

    r2823 r2836  
    5555  setAmbient(0,0,0);
    5656  setSpecular(0,0,0);
     57  setShininess(0.0);
    5758  setTransparency(0.0);
     59 
    5860}
    5961
     
    134136}
    135137
     138void Material::setShininess (float shini)
     139{
     140  shininess = shini;
     141}
     142void Material::setShininess (char* shini)
     143{
     144  setShininess (atof(shini));
     145}
    136146
    137147void Material::setTransparency (float trans)
     
    180190  // setting up Sprecular
    181191  glMaterialfv(GL_FRONT, GL_SPECULAR, specular);
     192
     193  // setting up Shininess
     194  glMaterialf(GL_FRONT, GL_SHININESS, shininess);
    182195 
    183196  // setting illumination Model
  • orxonox/trunk/importer/material.h

    r2823 r2836  
    3030  void setSpecular (float r, float g, float b);
    3131  void setSpecular (char* rgb);
     32  void setShininess (float shini);
     33  void setShininess (char* shini);
    3234  void setTransparency (float trans);
    3335  void setTransparency (char* trans);
     
    4547  float ambient [4];
    4648  float specular [4];
     49  float shininess;
    4750  float transparency;
    4851
  • orxonox/trunk/importer/object.cc

    r2833 r2836  
    325325        {
    326326          tmpMat->setSpecular(Buffer+3);
     327        }
     328      // setting The Specular Shininess
     329      else if (!strncmp(Buffer, "Ns", 2))
     330        {
     331          tmpMat->setShininess(Buffer+3);
    327332        }
    328333    }
Note: See TracChangeset for help on using the changeset viewer.