private static void copyLightState(final LightState source, final LightState destination) { destination.setTwoSidedLighting(source.getTwoSidedLighting()); destination.setLocalViewer(source.getLocalViewer()); destination.setSeparateSpecular(source.getSeparateSpecular()); destination.setEnabled(source.isEnabled()); destination.setGlobalAmbient(source.getGlobalAmbient()); destination.setLightMask(source.getLightMask()); destination.setNeedsRefresh(true); for (int i = 0, maxL = source.getLightList().size(); i < maxL; i++) { final Light pkLight = source.get(i); if (pkLight != null) { destination.attach(pkLight); } } }
setSingleLightEnabled(true, index, record, lr); if ((state.getLightMask() & LightState.MASK_AMBIENT) == 0 && (light.getLightMask() & LightState.MASK_AMBIENT) == 0) { setAmbient(index, record, light.getAmbient(), lr); if ((state.getLightMask() & LightState.MASK_DIFFUSE) == 0 && (light.getLightMask() & LightState.MASK_DIFFUSE) == 0) { setDiffuse(index, record, light.getDiffuse(), lr); if ((state.getLightMask() & LightState.MASK_SPECULAR) == 0 && (light.getLightMask() & LightState.MASK_SPECULAR) == 0) { setSpecular(index, record, light.getSpecular(), lr);
setSingleLightEnabled(true, index, record, lr); if ((state.getLightMask() & LightState.MASK_AMBIENT) == 0 && (light.getLightMask() & LightState.MASK_AMBIENT) == 0) { setAmbient(index, record, light.getAmbient(), lr); if ((state.getLightMask() & LightState.MASK_DIFFUSE) == 0 && (light.getLightMask() & LightState.MASK_DIFFUSE) == 0) { if ((state.getLightMask() & LightState.MASK_SPECULAR) == 0 && (light.getLightMask() & LightState.MASK_SPECULAR) == 0) {
if ((state.getLightMask() & LightState.MASK_GLOBALAMBIENT) == 0) { setModelAmbient(record, state.getGlobalAmbient()); } else {
if ((state.getLightMask() & LightState.MASK_GLOBALAMBIENT) == 0) { setModelAmbient(record, state.getGlobalAmbient()); } else {