Package jahuwaldt.j3d
Class JColor3f
- java.lang.Object
-
- org.jogamp.vecmath.Tuple3f
-
- org.jogamp.vecmath.Color3f
-
- jahuwaldt.j3d.JColor3f
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class JColor3f extends org.jogamp.vecmath.Color3f implements java.io.Serializable
A three-element color value represented by single precision floating point x,y,z values. The x,y,z values represent the red, green, and blue color values, respectively. Color components should be in the range of [0.0, 1.0].Java 3D assumes that a linear (gamma-corrected) visual is used for all colors.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JColor3f()
Constructs and initializes a JColor3f to (0.0, 0.0, 0.0).JColor3f(float[] v)
Constructs and initializes a JColor3f from the array of length 3.JColor3f(float x, float y, float z)
Constructs and initializes a JColor3f from the three xyz values.JColor3f(JColor3f v1)
Constructs and initializes a JColor3f from the specified JColor3f.JColor3f(java.awt.Color color)
Constructs and initializes a JColor3f from the specified AWT Color object.JColor3f(org.jogamp.vecmath.Tuple3d t1)
Constructs and initializes a JColor3f from the specified Tuple3d.JColor3f(org.jogamp.vecmath.Tuple3f t1)
Constructs and initializes a JColor3f from the specified Tuple3f.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
get()
Returns a new AWT color object initialized with the r,g,b values of this JColor3f object.void
set(java.awt.Color color)
Sets the r,g,b values of this JColor3f object to those of the specified AWT Color object.-
Methods inherited from class org.jogamp.vecmath.Tuple3f
absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub, toString
-
-
-
-
Constructor Detail
-
JColor3f
public JColor3f(float x, float y, float z)
Constructs and initializes a JColor3f from the three xyz values.- Parameters:
x
- the red color valuey
- the green color valuez
- the blue color value
-
JColor3f
public JColor3f(float[] v)
Constructs and initializes a JColor3f from the array of length 3.- Parameters:
v
- the array of length 3 containing xyz in order
-
JColor3f
public JColor3f(JColor3f v1)
Constructs and initializes a JColor3f from the specified JColor3f.- Parameters:
v1
- the JColor3f containing the initialization x y z data
-
JColor3f
public JColor3f(org.jogamp.vecmath.Tuple3f t1)
Constructs and initializes a JColor3f from the specified Tuple3f.- Parameters:
t1
- the Tuple3f containing the initialization x y z data
-
JColor3f
public JColor3f(org.jogamp.vecmath.Tuple3d t1)
Constructs and initializes a JColor3f from the specified Tuple3d.- Parameters:
t1
- the Tuple3d containing the initialization x y z data
-
JColor3f
public JColor3f(java.awt.Color color)
Constructs and initializes a JColor3f from the specified AWT Color object. The alpha value of the AWT color is ignored. No conversion is done on the color to compensate for gamma correction.- Parameters:
color
- the AWT color with which to initialize this JColor3f object- Since:
- vecmath 1.2
-
JColor3f
public JColor3f()
Constructs and initializes a JColor3f to (0.0, 0.0, 0.0).
-
-
Method Detail
-
set
public final void set(java.awt.Color color)
Sets the r,g,b values of this JColor3f 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 JColor3f object- Since:
- vecmath 1.2
-
get
public final java.awt.Color get()
Returns a new AWT color object initialized with the r,g,b values of this JColor3f object.- Returns:
- a new AWT Color object
- Since:
- vecmath 1.2
-
-