@Override public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); colorPacked = packedColor; }
/** Sets the color of this sprite cache, expanding the alpha from 0-254 to 0-255. * @see Color#toFloatBits() */ public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); colorPacked = packedColor; }
/** Sets the color of this decal, expanding the alpha from 0-254 to 0-255. * @see #setColor(Color) */ public void setPackedColor (float color) { Color.abgr8888ToColor(this.color, color); vertices[C1] = color; vertices[C2] = color; vertices[C3] = color; vertices[C4] = color; }
/** Sets the color of this decal, expanding the alpha from 0-254 to 0-255. * @see #setColor(Color) */ public void setPackedColor (float color) { Color.abgr8888ToColor(this.color, color); vertices[C1] = color; vertices[C2] = color; vertices[C3] = color; vertices[C4] = color; }
@Override public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); this.colorPacked = packedColor; }
/** Sets the color of this sprite, expanding the alpha from 0-254 to 0-255. * @see #setColor(Color) * @see Color#toFloatBits() */ public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); float[] vertices = this.vertices; vertices[C1] = packedColor; vertices[C2] = packedColor; vertices[C3] = packedColor; vertices[C4] = packedColor; }
/** Returns the actual color used in the vertices of this sprite. Modifying the returned color will have unexpected effects * unless {@link #setColor(Color)} or {@link #setColor(float, float, float, float)} is subsequently called before drawing this * sprite. */ public Color getPackedColor () { Color.abgr8888ToColor(color, vertices[2]); return color; }
/** Returns the actual color used in the vertices of this sprite. Modifying the returned color will have unexpected effects * unless {@link #setColor(Color)} or {@link #setColor(float, float, float, float)} is subsequently called before drawing this * sprite. */ public Color getPackedColor () { Color.abgr8888ToColor(color, vertices[2]); return color; }
/** Sets the color of this sprite, expanding the alpha from 0-254 to 0-255. * @see #setColor(Color) * @see Color#toFloatBits() */ public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); float[] vertices = this.vertices; vertices[C1] = packedColor; vertices[C2] = packedColor; vertices[C3] = packedColor; vertices[C4] = packedColor; }
@Override public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); this.colorPacked = packedColor; }
/** Sets the color of this sprite cache, expanding the alpha from 0-254 to 0-255. * @see Color#toFloatBits() */ public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); colorPacked = packedColor; }
@Override public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); colorPacked = packedColor; }
private final void addVertex (final float[] values, final int offset) { final int o = vertices.size; vertices.addAll(values, offset, stride); lastIndex = (short)(vindex++); if (vertexTransformationEnabled) { transformPosition(vertices.items, o + posOffset, posSize, positionTransform); if (norOffset >= 0) transformNormal(vertices.items, o + norOffset, 3, normalTransform); if (biNorOffset >= 0) transformNormal(vertices.items, o + biNorOffset, 3, normalTransform); if (tangentOffset >= 0) transformNormal(vertices.items, o + tangentOffset, 3, normalTransform); } final float x = vertices.items[o + posOffset]; final float y = (posSize > 1) ? vertices.items[o + posOffset + 1] : 0f; final float z = (posSize > 2) ? vertices.items[o + posOffset + 2] : 0f; bounds.ext(x, y, z); if (hasColor) { if (colOffset >= 0) { vertices.items[o + colOffset] *= color.r; vertices.items[o + colOffset + 1] *= color.g; vertices.items[o + colOffset + 2] *= color.b; if (colSize > 3) vertices.items[o + colOffset + 3] *= color.a; } else if (cpOffset >= 0) { Color.abgr8888ToColor(tempC1, vertices.items[o + cpOffset]); vertices.items[o + cpOffset] = tempC1.mul(color).toFloatBits(); } } if (hasUVTransform && uvOffset >= 0) { vertices.items[o + uvOffset] = uOffset + uScale * vertices.items[o + uvOffset]; vertices.items[o + uvOffset + 1] = vOffset + vScale * vertices.items[o + uvOffset + 1]; } }
private final void addVertex (final float[] values, final int offset) { final int o = vertices.size; vertices.addAll(values, offset, stride); lastIndex = (short)(vindex++); if (vertexTransformationEnabled) { transformPosition(vertices.items, o + posOffset, posSize, positionTransform); if (norOffset >= 0) transformNormal(vertices.items, o + norOffset, 3, normalTransform); if (biNorOffset >= 0) transformNormal(vertices.items, o + biNorOffset, 3, normalTransform); if (tangentOffset >= 0) transformNormal(vertices.items, o + tangentOffset, 3, normalTransform); } final float x = vertices.items[o + posOffset]; final float y = (posSize > 1) ? vertices.items[o + posOffset + 1] : 0f; final float z = (posSize > 2) ? vertices.items[o + posOffset + 2] : 0f; bounds.ext(x, y, z); if (hasColor) { if (colOffset >= 0) { vertices.items[o + colOffset] *= color.r; vertices.items[o + colOffset + 1] *= color.g; vertices.items[o + colOffset + 2] *= color.b; if (colSize > 3) vertices.items[o + colOffset + 3] *= color.a; } else if (cpOffset >= 0) { Color.abgr8888ToColor(tempC1, vertices.items[o + cpOffset]); vertices.items[o + cpOffset] = tempC1.mul(color).toFloatBits(); } } if (hasUVTransform && uvOffset >= 0) { vertices.items[o + uvOffset] = uOffset + uScale * vertices.items[o + uvOffset]; vertices.items[o + uvOffset + 1] = vOffset + vScale * vertices.items[o + uvOffset + 1]; } }
/** Sets the color of this sprite, expanding the alpha from 0-254 to 0-255. * @see #setColor(Color) * @see Color#toFloatBits() */ public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); float[] vertices = this.vertices; vertices[C1] = packedColor; vertices[C2] = packedColor; vertices[C3] = packedColor; vertices[C4] = packedColor; }
/** Returns the actual color used in the vertices of this sprite. Modifying the returned color will have unexpected effects * unless {@link #setColor(Color)} or {@link #setColor(float, float, float, float)} is subsequently called before drawing this * sprite. */ public Color getPackedColor () { Color.abgr8888ToColor(color, vertices[2]); return color; }
@Override public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); this.colorPacked = packedColor; }
/** Sets the color of this decal, expanding the alpha from 0-254 to 0-255. * @see #setColor(Color) */ public void setPackedColor (float color) { Color.abgr8888ToColor(this.color, color); vertices[C1] = color; vertices[C2] = color; vertices[C3] = color; vertices[C4] = color; }
@Override public void setPackedColor (float packedColor) { Color.abgr8888ToColor(color, packedColor); colorPacked = packedColor; }
/** * Sets the color of this Glyph with the given packed float color; does not allocate any objects. * @param color the color to set this Glyph to, as a packed float */ public void setPackedColor(float color) { Color.abgr8888ToColor(super.getColor(), color); }