/* * Material.java * * Alex S. */ /** * has various material properties. */ public class Material { /** * Ambient color */ public float ar,ag,ab; /** * Diffuse color */ public float dr,dg,db; /** * Specular color */ public float sr,sg,sb; /** * specular power */ public float p; /** * accept all material properties */ public Material( float ar,float ag,float ab, float dr,float dg,float db, float sr,float sg,float sb, float p) { this.ar = ar; this.ag = ag; this.ab = ab; this.dr = dr; this.dg = dg; this.db = db; this.sr = sr; this.sg = sg; this.sb = sb; this.p = p; } public String toString(){ return "{"+ "("+ar+","+ag+","+ab+")"+ "("+dr+","+dg+","+db+")"+ "("+sr+","+sg+","+sb+")"+"["+p+"]"+ "}"; } }