/** * Set the start color of the particles spawned. * * <p>The particle color at any time is determined by blending the start color * and end color based on the particle's current time of life relative * to its end of life. * * @param startColor the start color of the particles spawned */ public void setStartColor(ColorRGBA startColor) { this.startColor.set(startColor); }
StringBlock(){ this.text = ""; this.textBox = null; this.alignment = Align.Left; this.size = 100; this.color.set(ColorRGBA.White); this.kerning = true; }
/** * Sets the light color. * * @param color the light color. */ public void setColor(ColorRGBA color){ this.color.set(color); }
/** * Adds each r,g,b,a of this <code>ColorRGBA</code> by the r,g,b,a the given * color and returns the result (this). * Used as a way of combining colors and lights. * @param c The color to add. * @return this+c */ public ColorRGBA addLocal(ColorRGBA c) { set(c.r + r, c.g + g, c.b + b, c.a + a); return this; }
/** * Sets the background color. * <p> * When the ViewPort's color buffer is cleared * (if {@link #setClearColor(boolean) color clearing} is enabled), * this specifies the color to which the color buffer is set to. * By default the background color is black without alpha. * * @param background the background color. */ public void setBackgroundColor(ColorRGBA background){ backColor.set(background); }
/** * Set the end color of the particles spawned. * * <p>The * particle color at any time is determined by blending the start color * and end color based on the particle's current time of life relative * to its end of life. * * @param endColor the end color of the particles spawned. */ public void setEndColor(ColorRGBA endColor) { this.endColor.set(endColor); }
void setColor(ColorRGBA color) { this.color.set(color); }
protected void resetMaterial(){ ambient.set(ColorRGBA.DarkGray); diffuse.set(ColorRGBA.LightGray); specular.set(ColorRGBA.Black); shininess = 16; disallowAmbient = false; disallowSpecular = false; shadeless = false; transparent = false; matName = null; diffuseMap = null; specularMap = null; normalMap = null; alphaMap = null; alpha = 1; }
private void freeParticle(int idx) { Particle p = particles[idx]; p.life = 0; p.size = 0f; p.color.set(0, 0, 0, 0); p.imageIndex = 0; p.angle = 0; p.rotateSpeed = 0; if (idx == lastUsed) { while (lastUsed >= 0 && particles[lastUsed].life == 0) { lastUsed--; } } if (idx < firstUnUsed) { firstUnUsed = idx; } }
/** * * @param text the text that the StringBlock will hold * @param textBox the rectangle that constrains the text * @param alignment the initial alignment of the text * @param size the size in pixels (vertical size of a single line) * @param color the initial color of the text * @param kerning */ StringBlock(String text, Rectangle textBox, BitmapFont.Align alignment, float size, ColorRGBA color, boolean kerning) { this.text = text; this.textBox = textBox; this.alignment = alignment; this.size = size; this.color.set(color); this.kerning = kerning; }
Range(int start, String colorStr) { this.start = start; this.color = new ColorRGBA(); if (colorStr.length() >= 6) { color.set(Integer.parseInt(colorStr.subSequence(0,2).toString(), 16) / 255f, Integer.parseInt(colorStr.subSequence(2,4).toString(), 16) / 255f, Integer.parseInt(colorStr.subSequence(4,6).toString(), 16) / 255f, 1); if (baseAlpha != -1) { color.a = baseAlpha; } else if (colorStr.length() == 8) { color.a = Integer.parseInt(colorStr.subSequence(6,8).toString(), 16) / 255f; } } else { color.set(Integer.parseInt(Character.toString(colorStr.charAt(0)), 16) / 15f, Integer.parseInt(Character.toString(colorStr.charAt(1)), 16) / 15f, Integer.parseInt(Character.toString(colorStr.charAt(2)), 16) / 15f, 1); if (baseAlpha != -1) { color.a = baseAlpha; } else if (colorStr.length() == 4) { color.a = Integer.parseInt(Character.toString(colorStr.charAt(3)), 16) / 15f; } } } }
public void setBackgroundColor(ColorRGBA color) { if (!context.clearColor.equals(color)) { gl.glClearColor(color.r, color.g, color.b, color.a); context.clearColor.set(color); } }
store.set(FastMath.convertHalfToFloat((short) components[1]), FastMath.convertHalfToFloat((short) components[2]), FastMath.convertHalfToFloat((short) components[3]), break; case ImageCodec.FLAG_F32: store.set(Float.intBitsToFloat((int) components[1]), Float.intBitsToFloat((int) components[2]), Float.intBitsToFloat((int) components[3]), case 0: store.set((float) components[1] / codec.maxRed, (float) components[2] / codec.maxGreen, (float) components[3] / codec.maxBlue,
protected ColorRGBA readColor(){ ColorRGBA v = new ColorRGBA(); v.set(scan.nextFloat(), scan.nextFloat(), scan.nextFloat(), 1.0f); return v; }
private ColorRGBA convertColor(Color inColor, ColorRGBA outColor) { return outColor.set(inColor.getRed(), inColor.getGreen(), inColor.getBlue(), inColor.getAlpha()); }
protected static ColorRGBA getAmbientColor(LightList lightList, boolean removeLights, ColorRGBA ambientLightColor) { ambientLightColor.set(0, 0, 0, 1); for (int j = 0; j < lightList.size(); j++) { Light l = lightList.get(j); if (l instanceof AmbientLight) { ambientLightColor.addLocal(l.getColor()); if (removeLights) { lightList.remove(l); } } } ambientLightColor.a = 1.0f; return ambientLightColor; }
protected void extractIndirectLights(LightList lightList, boolean removeLights) { ambientLightColor.set(0, 0, 0, 1); for (int j = 0; j < lightList.size(); j++) { Light l = lightList.get(j); if (l instanceof AmbientLight) { ambientLightColor.addLocal(l.getColor()); if(removeLights){ lightList.remove(l); j--; } } if (l instanceof LightProbe) { lightProbes.add((LightProbe) l); if(removeLights){ lightList.remove(l); j--; } } } ambientLightColor.a = 1.0f; } }
private void init() { Xi.set(0, 0, 0, 0); H.set(0, 0, 0); tmp.set(0, 0, 0); c.set(1, 1, 1, 1); tmp1.set(0, 0, 0); tmp2.set(0, 0, 0); tmp3.set(0, 0, 0); reset(); }
p.color.set(startColor); p.size = startSize;
input.getPixel(x2 + 1, y2 + 1, topRight); outputColor.set(bottomLeft).addLocal(bottomRight) .addLocal(topLeft).addLocal(topRight); outputColor.multLocal(1f / 4f);