/** * sets a color that is used with CombinerSource.Constant * * @param red * @param green * @param blue * @param alpha */ public void setConstantColor(final float red, final float green, final float blue, final float alpha) { _constantColor.set(red, green, blue, alpha); }
/** * Sets the value of this color to (0, 0, 0, 0) * * @return this color for chaining */ public ColorRGBA zero() { return set(0, 0, 0, 0); }
/** * Sets shadow color and transparency. * * @param shadowColor * the shadowColor to set */ public void setShadowColor(final ReadOnlyColorRGBA shadowColor) { _shadowColor.set(shadowColor); }
/** * Set the color of this back drop. * * @param color * the color to use */ public void setColor(final ReadOnlyColorRGBA color) { if (color != null) { _color.set(color); } }
/** * <code>setAmbient</code> sets the ambient color value for this light. * * @param ambient * the ambient color value for this light. */ public void setAmbient(final ReadOnlyColorRGBA ambient) { this._ambient.set(ambient); }
/** * sets the color used when texture operations encounter the border of a texture. * * @param color * the new border color (the default is {@link ColorRGBA#BLACK_NO_ALPHA}) */ public void setBorderColor(final ReadOnlyColorRGBA color) { _borderColor.set(color); }
/** * sets a color that is used with CombinerSource.Constant * * @param color * the new constant color (the default is {@link ColorRGBA#BLACK_NO_ALPHA}) */ public void setConstantColor(final ReadOnlyColorRGBA color) { _constantColor.set(color); }
/** * Set the end color for particles. The base color of the particle will linearly approach this color from the start * color over the lifetime of the particle. * * @param color * ColorRGBA The ending color. */ public void setEndColor(final ReadOnlyColorRGBA color) { _endColor.set(color); }
/** * <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); }
public void setTint(final ReadOnlyColorRGBA tint) { if (tint == null) { _tint = null; } else if (_tint == null) { _tint = new ColorRGBA(tint); } else { _tint.set(tint); } }
@Override public void invalidate() { super.invalidate(); wrapS = wrapT = wrapR = 0; magFilter = minFilter = 0; depthTextureMode = depthTextureCompareFunc = depthTextureCompareMode = 0; anisoLevel = -1; borderColor.set(-1, -1, -1, -1); } }
public void setColor(final ReadOnlyColorRGBA color) { if (color != null) { if (_color != null) { _color.set(color); } else { _color = new ColorRGBA(color); } } else { _color = null; } }
private static void applyFogColor(final ReadOnlyColorRGBA color, final FogStateRecord record) { if (!record.isValid() || !color.equals(record.fogColor)) { record.fogColor.set(color); record.colorBuff.clear(); record.colorBuff.put(record.fogColor.getRed()).put(record.fogColor.getGreen()) .put(record.fogColor.getBlue()).put(record.fogColor.getAlpha()); record.colorBuff.flip(); GL11.glFog(GL11.GL_FOG_COLOR, record.colorBuff); } }
private static void applyFogColor(final ReadOnlyColorRGBA color, final FogStateRecord record) { final GL gl = GLContext.getCurrentGL(); if (!record.isValid() || !color.equals(record.fogColor)) { record.fogColor.set(color); record.colorBuff.clear(); record.colorBuff.put(record.fogColor.getRed()).put(record.fogColor.getGreen()) .put(record.fogColor.getBlue()).put(record.fogColor.getAlpha()); record.colorBuff.flip(); gl.getGL2ES1().glFogfv(GL2ES1.GL_FOG_COLOR, record.colorBuff); } }
/** * Increments the values of this color with the given r, g, b and a values. * * @param r * @param g * @param b * @param a * @return this color for chaining */ public ColorRGBA addLocal(final float r, final float g, final float b, final float a) { return set(getRed() + r, getGreen() + g, getBlue() + b, getAlpha() + a); }
/** * Increments the values of this color with the given r, g, b and a values. * * @param r * @param g * @param b * @param a * @return this color for chaining */ public ColorRGBA addLocal(final float r, final float g, final float b, final float a) { return set(getRed() + r, getGreen() + g, getBlue() + b, getAlpha() + a); }
public static void applyBorderColor(final Texture texture, final TextureRecord texRecord, final int unit, final TextureStateRecord record) { final ReadOnlyColorRGBA texBorder = texture.getBorderColor(); if (!texRecord.isValid() || !texRecord.borderColor.equals(texBorder)) { TextureRecord.colorBuffer.clear(); TextureRecord.colorBuffer.put(texBorder.getRed()).put(texBorder.getGreen()).put(texBorder.getBlue()) .put(texBorder.getAlpha()); TextureRecord.colorBuffer.rewind(); GL11.glTexParameter(getGLType(texture.getType()), GL11.GL_TEXTURE_BORDER_COLOR, TextureRecord.colorBuffer); texRecord.borderColor.set(texBorder); } }
/** * Internally modifies the values of this color by dividing them each by the given scale values. * * @param scale * @return this color for chaining */ public ColorRGBA divideLocal(final ReadOnlyColorRGBA scale) { return set(getRed() / scale.getRed(), getGreen() / scale.getGreen(), getBlue() / scale.getBlue(), getAlpha() / scale.getAlpha()); }
/** * Internally modifies the values of this color by dividing them each by the given scale values. * * @param scale * @return this color for chaining */ public ColorRGBA divideLocal(final ReadOnlyColorRGBA scale) { return set(getRed() / scale.getRed(), getGreen() / scale.getGreen(), getBlue() / scale.getBlue(), getAlpha() / scale.getAlpha()); }
@Override public void read(final InputCapsule capsule) throws IOException { super.read(capsule); start = capsule.readFloat("start", 0); end = capsule.readFloat("end", 0); density = capsule.readFloat("density", 0); color.set((ColorRGBA) capsule.readSavable("color", new ColorRGBA(ColorRGBA.WHITE))); densityFunction = capsule.readEnum("densityFunction", DensityFunction.class, DensityFunction.Exponential); quality = capsule.readEnum("applyFunction", Quality.class, Quality.PerPixel); source = capsule.readEnum("source", CoordinateSource.class, CoordinateSource.Depth); }