Added missing getters for SimpleWaterProcessors
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10535 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
f8c256d127
commit
761fe60388
@ -123,6 +123,10 @@ public class SimpleWaterProcessor implements SceneProcessor {
|
|||||||
private Vector3f vect1 = new Vector3f();
|
private Vector3f vect1 = new Vector3f();
|
||||||
private Vector3f vect2 = new Vector3f();
|
private Vector3f vect2 = new Vector3f();
|
||||||
private Vector3f vect3 = new Vector3f();
|
private Vector3f vect3 = new Vector3f();
|
||||||
|
private float distortionScale = 0.2f;
|
||||||
|
private float distortionMix = 0.5f;
|
||||||
|
private float texScale = 1f;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a SimpleWaterProcessor
|
* Creates a SimpleWaterProcessor
|
||||||
@ -470,10 +474,19 @@ public class SimpleWaterProcessor implements SceneProcessor {
|
|||||||
this.speed = speed;
|
this.speed = speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the speed of the wave animation.
|
||||||
|
* @return the speed
|
||||||
|
*/
|
||||||
|
public float getWaveSpeed(){
|
||||||
|
return speed;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the scale of distortion by the normal map, default = 0.2
|
* Sets the scale of distortion by the normal map, default = 0.2
|
||||||
*/
|
*/
|
||||||
public void setDistortionScale(float value) {
|
public void setDistortionScale(float value) {
|
||||||
|
distortionScale = value;
|
||||||
material.setColor("distortionScale", new ColorRGBA(value, value, value, value));
|
material.setColor("distortionScale", new ColorRGBA(value, value, value, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,6 +494,7 @@ public class SimpleWaterProcessor implements SceneProcessor {
|
|||||||
* Sets how the normal and dudv map are mixed to create the wave effect, default = 0.5
|
* Sets how the normal and dudv map are mixed to create the wave effect, default = 0.5
|
||||||
*/
|
*/
|
||||||
public void setDistortionMix(float value) {
|
public void setDistortionMix(float value) {
|
||||||
|
distortionMix = value;
|
||||||
material.setColor("distortionMix", new ColorRGBA(value, value, value, value));
|
material.setColor("distortionMix", new ColorRGBA(value, value, value, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -490,9 +504,41 @@ public class SimpleWaterProcessor implements SceneProcessor {
|
|||||||
* use mesh.scaleTextureCoordinates(Vector2f) for that.
|
* use mesh.scaleTextureCoordinates(Vector2f) for that.
|
||||||
*/
|
*/
|
||||||
public void setTexScale(float value) {
|
public void setTexScale(float value) {
|
||||||
|
texScale = value;
|
||||||
material.setColor("texScale", new ColorRGBA(value, value, value, value));
|
material.setColor("texScale", new ColorRGBA(value, value, value, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the scale of distortion by the normal map, default = 0.2
|
||||||
|
*
|
||||||
|
* @return the distortion scale
|
||||||
|
*/
|
||||||
|
public float getDistortionScale() {
|
||||||
|
return distortionScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns how the normal and dudv map are mixed to create the wave effect,
|
||||||
|
* default = 0.5
|
||||||
|
*
|
||||||
|
* @return the distortion mix
|
||||||
|
*/
|
||||||
|
public float getDistortionMix() {
|
||||||
|
return distortionMix;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the scale of the normal/dudv texture, default = 1. Note that the
|
||||||
|
* waves should be scaled by the texture coordinates of the quad to avoid
|
||||||
|
* animation artifacts, use mesh.scaleTextureCoordinates(Vector2f) for that.
|
||||||
|
*
|
||||||
|
* @return the textures scale
|
||||||
|
*/
|
||||||
|
public float getTexScale() {
|
||||||
|
return texScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* retruns true if the waterprocessor is in debug mode
|
* retruns true if the waterprocessor is in debug mode
|
||||||
* @return
|
* @return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user