/** * <code>setEnd</code> sets the end distance, or the distance where fog is at it's thickest. * * @param end * the distance where the fog is the thickest. */ public void setEnd(final float end) { this.end = end; setNeedsRefresh(true); }
/** * <code>setStart</code> sets the start distance, or where fog begins to be applied. * * @param start * the start distance of the fog. */ public void setStart(final float start) { this.start = start; setNeedsRefresh(true); }
/** * <code>setDensity</code> sets the density of the fog. This value is clamped to [0, 1]. * * @param density * the density of the fog. */ public void setDensity(float density) { if (density < 0) { density = 0; } if (density > 1) { density = 1; } this.density = density; setNeedsRefresh(true); }
/** * <code>setQuality</code> sets the quality used for the fog attributes. * * @param quality * the quality used for the fog application. * @throws IllegalArgumentException * if quality is null */ public void setQuality(final Quality quality) { if (quality == null) { throw new IllegalArgumentException("quality can not be null."); } this.quality = quality; setNeedsRefresh(true); }
/** * <code>setDensityFunction</code> sets the density function used for the fog blending. * * @param function * the function used for the fog density. * @throws IllegalArgumentException * if function is null */ public void setDensityFunction(final DensityFunction function) { if (function == null) { throw new IllegalArgumentException("function can not be null."); } densityFunction = function; setNeedsRefresh(true); }
/** * <code>setColor</code> sets the color of the fog. * * @param color * the color of the fog. This value is COPIED into the state. Further changes to the object after calling * this method will have no affect on this state. */ public void setColor(final ReadOnlyColorRGBA color) { this.color.set(color); setNeedsRefresh(true); }