|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.material.Color4f
public class Color4f
This class represents a RGBA color.
Field Summary | |
---|---|
float |
alpha
|
float |
blue
|
float |
green
|
float |
red
|
Constructor Summary | |
---|---|
Color4f()
Creates a new RGAB color object with white color. |
|
Color4f(float r,
float g,
float b,
float a)
Creates a new RGBA color object. |
Method Summary | |
---|---|
Color4f |
clone()
|
boolean |
equals(Color4f color)
This method checks this color for equality with the specified color. |
boolean |
equals(float r,
float g,
float b,
float a)
/** This method checks this color for equality with the specified color. |
float |
getAlpha()
Returns the alpha of the color. |
float |
getBlue()
Returns the amount of blue in the color. |
float |
getGreen()
Returns the amount of gree in the color. |
float |
getRed()
Returns the amount of red in the color. |
void |
setAlpha(float a)
Sets the alpha vlaue (0.0f - 1.0f) of the color |
void |
setBlue(float b)
Sets the amount of blue (0.0f - 1.0f) in the color |
void |
setColor(Color4f c)
Sets this color to the specified color. |
void |
setColor(float r,
float g,
float b,
float a)
Sets this color to the specified color. |
void |
setGreen(float g)
Sets the amount of green (0.0f - 1.0f) in the color |
void |
setRed(float r)
Sets the amount of red (0.0f - 1.0f) in the color |
float[] |
toArray()
Returns the color in a float array representation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float red
public float green
public float blue
public float alpha
Constructor Detail |
---|
public Color4f()
public Color4f(float r, float g, float b, float a)
r
- amount of red (0.0f - 1.0f)g
- amount of green (0.0f - 1.0f)b
- amount of blue (0.0f - 1.0f)a
- alpha value (0.0f - 1.0f)Method Detail |
---|
public void setColor(Color4f c)
c
- new colorpublic void setColor(float r, float g, float b, float a)
r
- amount of red (0.0f - 1.0f)g
- amount of green (0.0f - 1.0f)b
- amount of blue (0.0f - 1.0f)a
- alpha value (0.0f - 1.0f)public float[] toArray()
public Color4f clone()
clone
in class java.lang.Object
public float getRed()
public float getGreen()
public float getBlue()
public float getAlpha()
public void setRed(float r)
r
- amount of redpublic void setGreen(float g)
g
- amount of greenpublic void setBlue(float b)
b
- amount of bluepublic void setAlpha(float a)
a
- alpha valuepublic boolean equals(Color4f color)
color
- color to check for equality
public boolean equals(float r, float g, float b, float a)
r
- amount of redg
- amount of greenb
- amount of bluea
- amount of alpha
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |