89

Controlling appearance
Material Attributes Example Code

  • Set ambient, emissive, diffuse, and specular colors
  • Appearance app = new Appearance( );
    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 );