java.lang.Object
org.pqt.autorib.util.Point
org.pqt.autorib.util.Color
- All Implemented Interfaces:
- java.lang.Cloneable
- public class Color
- extends Point
a class to handle colors
| Fields inherited from class org.pqt.autorib.util.Point |
value |
|
Constructor Summary |
Color()
initialize the color to {0,0,0} |
Color(float r,
float g,
float b)
initialize the color to the given values |
Color(java.util.Vector v)
initialize a color from a Vector |
Color(java.util.Vector v,
int index)
initialize a color from a Vector, starting at the given index |
|
Method Summary |
static boolean |
fuzzyEquals(Color a,
Color b,
double gap)
return true if the difference between each component in a and its
equivalent in b is less than the value gap |
void |
initColor(java.util.Vector v,
int index)
initialize a color from a Vector, starting at the given index |
| Methods inherited from class org.pqt.autorib.util.Point |
add, add, clone, Clone, convertVector, cross, cross, dot, dot, equals, equals, fuzzyEquals, initPoint, length, length, lengthSquared, lengthSquared, mult, mult, normalize, normalize, percentageDifference, subtract, subtract, toString |
Color
public Color()
- initialize the color to {0,0,0}
Color
public Color(float r,
float g,
float b)
- initialize the color to the given values
Color
public Color(java.util.Vector v)
throws java.lang.Exception
- initialize a color from a Vector
Color
public Color(java.util.Vector v,
int index)
throws java.lang.Exception
- initialize a color from a Vector, starting at the given index
initColor
public void initColor(java.util.Vector v,
int index)
throws java.lang.Exception
- initialize a color from a Vector, starting at the given index
fuzzyEquals
public static boolean fuzzyEquals(Color a,
Color b,
double gap)
- return true if the difference between each component in a and its
equivalent in b is less than the value gap