|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--raytracer.internal.Color
Represents a color with values for red, green, blue ranging from 0 to 1
Constructor Summary | |
Color(Color col)
Copy constructor |
|
Color(float r,
float g,
float b)
Creates a color object with the given intensities |
Method Summary | |
void |
add(Color col)
Adds a color |
void |
add(Color obj,
Color intensity)
Adds a color with the given intensity |
void |
add(Color obj,
Color light,
float intensity)
|
void |
add(Color obj,
float intensity)
Adds a color with the given intensity |
float |
getB()
|
float |
getG()
|
float |
getR()
|
float |
influence()
Calculates how much the color would influence an exisiting color (usually the distance to zero) |
void |
mul(Color c)
|
void |
mul(Color c,
float intensity)
|
void |
transmit(Color obj,
Color transmission)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Color(float r, float g, float b)
r
- intensity for redg
- intensity for greenb
- intensity for bluepublic Color(Color col)
col
- color object to duplicateMethod Detail |
public void add(Color col)
col
- Color to addpublic void add(Color obj, float intensity)
obj
- Color to addintensity
- Intensity factor applied to all components of the added colorpublic void add(Color obj, Color intensity)
obj
- Color to addintensity
- Intensity color applied componentwise of the added colorpublic void add(Color obj, Color light, float intensity)
public void transmit(Color obj, Color transmission)
public void mul(Color c)
public void mul(Color c, float intensity)
public float influence()
public float getR()
public float getG()
public float getB()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |