/** * Sets the specular color of the primary light source. * @param rgba array[4] of color components. */ public void setSpecular(float[] rgba) { setSpecular(0,rgba); }
public void testEquality() { OrbitViewLighting sl0 = new OrbitViewLighting(); OrbitViewLighting sl1 = new OrbitViewLighting(); assertEquals(sl0,sl1); sl1.setPosition(1,new float[] { 2.0f, 0.0f, 0.0f }); assertNotEquals(sl0,sl1); sl1 = new OrbitViewLighting(); sl1.setAmbient(1, RED); assertNotEquals(sl0,sl1); sl1 = new OrbitViewLighting(); sl1.setDiffuse(1, RED); assertNotEquals(sl0,sl1); sl1 = new OrbitViewLighting(); sl1.setSpecular(1, RED); assertNotEquals(sl0,sl1); sl1 = new OrbitViewLighting(); sl1.setLightSourceType(1, lp); assertNotEquals(sl0,sl1); sl1 = new OrbitViewLighting(); sl1.setAmbientAndDiffuse(RED); sl0.setAmbientAndDiffuse(RED); assertEquals(sl0,sl1); }
l.setSpecular(GREEN); l.setLightSourceType(lp); l.setPosition(newpos);