/** * Sets if two sided lighting should be enabled for this LightState. Two sided lighting will cause the back of * surfaces to be colored using the inverse of the surface normal as well as the Material properties set for * MaterialFace.Back. * * @param twoSidedOn * If true, two sided lighting is enabled. */ public void setTwoSidedLighting(final boolean twoSidedOn) { this.twoSidedOn = twoSidedOn; setNeedsRefresh(true); }
/** * Sets if local viewer mode should be enabled for this LightState. * * @param localViewerOn * If true, local viewer mode is enabled. */ public void setLocalViewer(final boolean localViewerOn) { this.localViewerOn = localViewerOn; setNeedsRefresh(true); }
/** * Sets if separate specular mode should be enabled for this LightState. * * @param separateSpecularOn * If true, separate specular mode is enabled. */ public void setSeparateSpecular(final boolean separateSpecularOn) { this.separateSpecularOn = separateSpecularOn; setNeedsRefresh(true); }
/** * <code>setLightMask</code> sets what attributes of this lightstate to apply as an int comprised of bitwise or'ed * values. * * @param lightMask * The lightMask to set. */ public void setLightMask(final int lightMask) { this.lightMask = lightMask; setNeedsRefresh(true); }
/** * * <code>detach</code> removes a light from the queue for processing. * * @param light * the light to be removed. */ public void detach(final Light light) { lightList.remove(light); setNeedsRefresh(true); }
/** * * <code>detachAll</code> clears the queue of all lights to be processed. * */ public void detachAll() { lightList.clear(); setNeedsRefresh(true); }
/** * * <code>detach</code> removes a light from the queue for processing. * * @param light * the light to be removed. */ public void detach(final Light light) { lightList.remove(light); setNeedsRefresh(true); }
/** * * <code>detachAll</code> clears the queue of all lights to be processed. * */ public void detachAll() { lightList.clear(); setNeedsRefresh(true); }
/** * * <code>attach</code> places a light in the queue to be processed. If there are already eight lights placed in the * queue, the light is ignored and false is returned. Otherwise, true is returned to indicate success. * * @param light * the light to add to the queue. * @return true if the light was added successfully, false if there are already eight lights in the queue. */ public boolean attach(final Light light) { if (!lightList.contains(light)) { lightList.add(light); setNeedsRefresh(true); return true; } return false; }
/** * * <code>attach</code> places a light in the queue to be processed. If there are already eight lights placed in the * queue, the light is ignored and false is returned. Otherwise, true is returned to indicate success. * * @param light * the light to add to the queue. * @return true if the light was added successfully, false if there are already eight lights in the queue. */ public boolean attach(final Light light) { if (!lightList.contains(light)) { lightList.add(light); setNeedsRefresh(true); return true; } return false; }
public void setGlobalAmbient(final ReadOnlyColorRGBA color) { _globalAmbient.set(color); setNeedsRefresh(true); }
private static void copyLightState(final LightState source, final LightState destination) { destination.setEnabled(source.isEnabled()); 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); } } }
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); } } }