|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.util.ColorUtils
An interpolator that works with color components.
The interpolation routine is just a simple linear interpolation between each of the points. The interpolator may take arbitrarily spaced keyframes and compute correct values.
Color interpolation can be done in the standard RGB space (LINEAR) or using the additional type of HSV_LINEAR. This internally converts all color values to HSV space and then interpolates over that instead.
The RGB<->HSV color space conversions have been taken from Foley & van Dam Computer Graphics Principles and Practice, 2nd Edition, Addison Wesley, 1990.
| Constructor Summary | |
ColorUtils()
|
|
| Method Summary | |
static void |
convertHSVtoRGB(float[] hsv,
float[] rgb)
Change an RGB color to HSV color. |
static void |
convertHSVtoRGB(float h,
float s,
float v,
float[] rgb)
Change an RGB color to HSV color. |
static void |
convertRGBtoHSV(float[] rgb,
float[] hsv)
Change an RGB color to HSV color. |
static void |
convertRGBtoHSV(float r,
float g,
float b,
float[] hsv)
Change an RGB color to HSV color. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ColorUtils()
| Method Detail |
public static void convertRGBtoHSV(float[] rgb,
float[] hsv)
rgb - The array of RGB components to converthsv - An array to return the colour values with
public static void convertRGBtoHSV(float r,
float g,
float b,
float[] hsv)
r - The r component of the color at this keyg - The g component of the color at this keyb - The b component of the color at this keyhsv - An array to return the HSV colour values in
public static void convertHSVtoRGB(float[] hsv,
float[] rgb)
hsv - The three components of the color at this keyrgb - An array to return the RGB colour values in
public static void convertHSVtoRGB(float h,
float s,
float v,
float[] rgb)
h - The h component of the color at this keys - The s component of the color at this keyv - The v component of the color at this keyrgb - An array to return the RGB colour values in
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||