|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object crystalspace.jbind.impl.csNativeObject crystalspace.jbind.impl.csutil.cscolor.csColor
A class used to represent a color in RGB space. This class is similar to csRGBpixel and csRGBcolor except that it uses floating-point values to store R,G,B values.
Field Summary |
Fields inherited from class crystalspace.jbind.impl.csNativeObject |
ImplFactory, nPointer |
Constructor Summary | |
csColor()
|
|
csColor(csColor c)
|
|
csColor(float r,
float g,
float b)
|
|
csColor(iPointer nPointer)
|
Method Summary | |
csColor |
add(csColor c)
Add another color to this one. |
void |
add(float r,
float g,
float b)
Add given R,G,B components to color. |
float |
blue()
Blue (0..1). |
void |
blue(float b)
Blue (0..1). |
void |
clamp(float r,
float g,
float b)
Clamp color to given R,G,B values. |
void |
clampDown()
Make sure color components are not negative. |
float |
green()
Green (0..1). |
void |
green(float g)
Green (0..1). |
protected boolean |
isNativePointerValidSafe(long pointer)
|
csColor |
minus(csColor c)
Subtract another color to this one. |
csColor |
mul(float f)
Multiply this color by a scalar value. |
protected void |
nDelete(long pointer)
|
float |
red()
Red (0..1). |
void |
red(float r)
Red (0..1). |
csColor |
set(csColor c)
Assign one color object to another. |
void |
set(float r,
float g,
float b)
Set color to given R,G,B components. |
void |
subtract(float r,
float g,
float b)
Subtract given R,G,B components from color. |
Methods inherited from class crystalspace.jbind.impl.csNativeObject |
changePointer, equals, finalize, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public csColor(iPointer nPointer)
public csColor()
public csColor(float r, float g, float b)
public csColor(csColor c)
Method Detail |
protected void nDelete(long pointer)
nDelete
in class csNativeObject
protected boolean isNativePointerValidSafe(long pointer)
isNativePointerValidSafe
in class csNativeObject
public void add(float r, float g, float b)
r
- g
- b
- public void clamp(float r, float g, float b)
r
- g
- b
- public void clampDown()
public csColor mul(float f)
f
-
public csColor add(csColor c)
c
-
public csColor minus(csColor c)
c
-
public csColor set(csColor c)
c
-
public void set(float r, float g, float b)
r
- g
- b
- public void subtract(float r, float g, float b)
r
- g
- b
- public float blue()
public void blue(float b)
b
- public float green()
public void green(float g)
g
- public float red()
public void red(float r)
r
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |