Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.vecmath
Class Color4f

    java.lang.Object
      javax.vecmath.Tuple4f
          javax.vecmath.Color4f

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class Color4f

extends Tuple4f
implements java.io.Serializable

A four-element color represented by single precision floating point x, y, z, and w values. The x, y, z, and w values represent the red, blue, green, and alpha color values, respectively. Color and alpha components should be in the range [0.0, 1.0].

Java 3D assumes that a linear (gamma-corrected) visual is used for all colors.

See Also:
  Serialized Form

Field Summary

Fields inherited from class javax.vecmath.Tuple4f
`w, x, y, z`

Constructor Summary
`Color4f()` Constructs and initializes a Color4f to (0.0, 0.0, 0.0, 0.0).
`Color4f(java.awt.Color color)` Constructs and initializes a Color4f from the specified AWT Color object.
`Color4f(Color4f c1)` Constructs and initializes a Color4f from the specified Color4f.
`Color4f(float[] c)` Constructs and initializes a Color4f from the array of length 4.
`Color4f(float x, float y, float z, float w)` Constructs and initializes a Color4f from the specified xyzw coordinates.
`Color4f(Tuple4d t1)` Constructs and initializes a Color4f from the specified Tuple4d.
`Color4f(Tuple4f t1)` Constructs and initializes a Color4f from the specified Tuple4f.

Method Summary
`java.awt.Color` | `get()` Returns a new AWT color object initialized with the r,g,b,a values of this Color4f object.
`void` | `set(java.awt.Color color)` Sets the r,g,b,a values of this Color4f object to those of the specified AWT Color object.

Methods inherited from class javax.vecmath.Tuple4f
`absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, sub, sub, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Color4f

    public Color4f(float x,
                   float y,
                   float z,
                   float w)

  Constructs and initializes a Color4f from the specified xyzw coordinates.

  Parameters:
    `x` - the red color value
    `y` - the green color value
    `z` - the blue color value
    `w` - the alpha value

### Color4f

    public Color4f(float[] c)

  Constructs and initializes a Color4f from the array of length 4.

  Parameters:
    `c` - the array of length 4 containing r,g,b,a in order

### Color4f

    public Color4f(Color4f c1)

  Constructs and initializes a Color4f from the specified Color4f.

  Parameters:
    `c1` - the Color4f containing the initialization r,g,b,a data

### Color4f

    public Color4f(Tuple4f t1)

  Constructs and initializes a Color4f from the specified Tuple4f.

  Parameters:
    `t1` - the Tuple4f containing the initialization r,g,b,a data

### Color4f

    public Color4f(Tuple4d t1)

  Constructs and initializes a Color4f from the specified Tuple4d.

  Parameters:
    `t1` - the Tuple4d containing the initialization r,g,b,a data

### Color4f

    public Color4f(java.awt.Color color)

  Constructs and initializes a Color4f from the specified AWT Color object. No conversion is done on the color to compensate for gamma correction.

  Parameters:
    `color` - the AWT color with which to initialize this Color4f object
  Since:
    Java 3D 1.2

### Color4f

    public Color4f()

  Constructs and initializes a Color4f to (0.0, 0.0, 0.0, 0.0).

Method Detail

### set

    public final void set(java.awt.Color color)

  Sets the r,g,b,a values of this Color4f object to those of the specified AWT Color object. No conversion is done on the color to compensate for gamma correction.

  Parameters:
    `color` - the AWT color to copy into this Color4f object
  Since:
    Java 3D 1.2

### get

    public final java.awt.Color get()

  Returns a new AWT color object initialized with the r,g,b,a values of this Color4f object.

  Returns:
    a new AWT Color object
  Since:
    Java 3D 1.2

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD