Adding uncommited methods (sorry for breaking the build).
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9417 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2b588f5298
commit
7ff1261d79
@ -87,6 +87,38 @@ public class TexturePixel implements Cloneable {
|
||||
this.intensity = intensity >= 0 ? intensity / 255.0f : 1.0f - ~intensity / 255.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the intensity from the given value.
|
||||
*
|
||||
* @param intensity
|
||||
* the intensity value
|
||||
*/
|
||||
public void fromIntensity(short intensity) {
|
||||
this.intensity = intensity >= 0 ? intensity / 65535.0f : 1.0f - ~intensity / 65535.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets the alpha value (converts it to float number from range
|
||||
* <0, 1>).
|
||||
*
|
||||
* @param alpha
|
||||
* the alpha value
|
||||
*/
|
||||
public void setAlpha(byte alpha) {
|
||||
this.alpha = alpha >= 0 ? alpha / 255.0f : 1.0f - ~alpha / 255.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets the alpha value (converts it to float number from range
|
||||
* <0, 1>).
|
||||
*
|
||||
* @param alpha
|
||||
* the alpha value
|
||||
*/
|
||||
public void setAlpha(short alpha) {
|
||||
this.alpha = alpha >= 0 ? alpha / 65535.0f : 1.0f - ~alpha / 65535.0f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the values from the given integer that stores the ARGB8 data.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user