Nothing extremely hardcore, but just made that one based off the Vector3f interpolation.
[java]
This patch file was generated by NetBeans IDE
It uses platform neutral UTF-8 encoding and \n newlines.
— Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -584,6 +584,56 @@
}
/**
-
* Linear color interpolation from startColor to endColor by the given percent
-
* while ignoring the alpha value of the color.
-
*
-
* Basically: ((1 - percent) * startColor) + (percent * endColor)
-
*
-
* @param scale
-
* scale value to use. if 1, use endColor, if 0, use startColor.
-
* @param startColor
-
* Begining color. 0% of f
-
* @param endColor
-
* ending color. 100% of f
-
* @param store a ColorRGBA to store the result in.
-
* @return The interpolated value between startColor and endColor.
-
*/
- public static ColorRGBA interpolateColorsLinear(float scale, ColorRGBA startColor, ColorRGBA endColor, ColorRGBA store) {
-
if (store == null) {
-
store = new ColorRGBA();
-
}
-
store.r = FastMath.interpolateLinear(scale, startColor.r, endColor.r);
-
store.g = FastMath.interpolateLinear(scale, startColor.g, endColor.g);
-
store.b = FastMath.interpolateLinear(scale, startColor.b, endColor.b);
-
return store;
- }
- /**
-
* Linear interpolation from startColor to endColor by the given percent
-
* including the colors' alpha value.
-
* Basically: ((1 - percent) * startColor) + (percent * endColor)
-
*
-
* @param scale
-
* scale color value to use. if 1, use endColor, if 0, use startColor.
-
* @param startColor
-
* Begining color. 0% of f
-
* @param endColor
-
* ending color. 100% of f
-
* @param store a ColorRGBA to store the result in.
-
* @return The interpolated value between startColor and endColor.
-
*/
- public static ColorRGBA interpolateColorsAndAlphaLinear(float scale, ColorRGBA startColor, ColorRGBA endColor, ColorRGBA store) {
-
if (store == null) {
-
store = new ColorRGBA();
-
}
-
store.r = FastMath.interpolateLinear(scale, startColor.r, endColor.r);
-
store.g = FastMath.interpolateLinear(scale, startColor.g, endColor.g);
-
store.b = FastMath.interpolateLinear(scale, startColor.b, endColor.b);
-
store.a = FastMath.interpolateLinear(scale, startColor.a, endColor.a);
-
return store;
- }
- /**
- Transform this
ColorRGBA
to aVector4f
using - x = r, y = g, z = b, w = a.
- This method is useful to use for shaders assignment.
[/java]
- Transform this