73

Controlling appearance
Material Attributes Example Code

  • Ambient, emissive, diffuse, and specular colors
  • Material mat = new Material( );
    mat.setAmbientColor(  0.3f, 0.3f, 0.3f );
    mat.setDiffuseColor(  1.0f, 0.0f, 0.0f );
    mat.setEmissiveColor( 0.0f, 0.0f, 0.0f );
    mat.setSpecularColor( 1.0f, 1.0f, 1.0f );
    mat.setShininess( 80.0f );
    app.setMaterial( mat );