jme.locale
Class SimpleLocale

java.lang.Object
  extended byjme.locale.SimpleLocale
All Implemented Interfaces:
Locale

public class SimpleLocale
extends java.lang.Object
implements Locale

SimpleLocale defines a simple Locale. This locale is a single quad with a defined center, a defined length for each side, and a normal of (0, 1, 0). A texture can be set to the SimpleLocale to improve it's appearence, as well can you change the color.

Version:
1
Author:
Mark Powell

Constructor Summary
SimpleLocale(Vector center, float length)
          Constructor builds a new SimpleLocale with the defined, center and length of each side.
 
Method Summary
 Vector getCenter()
          getCenter returns the center of the locale.
 float getLength()
          getLength returns the length of the locale's sides.
 void render()
          render renders the SimpleLocale.
 void setCenter(Vector center)
          setCenter sets the center of the locale.
 void setColor(float red, float green, float blue, float alpha)
          setColor sets the color to set the locale to.
 void setLength(float length)
          setLength sets the length of the locale's sides.
 void setTexture(java.lang.String filename)
          setTexture sets the image used by the locale.
 java.lang.String toString()
          toString returns the string representation of this object in the format:

jme.locale.SimpleLocale@1c282a1
Center: {VECTOR}
Side Length: {FLOAT}
Color: {RGBA VALUE}
Texture Name: {IMAGE FILE}
 void update(float time)
          update does not perform any action for SimpleLocale.
 boolean useDistanceFog()
          useDistanceFog returns false for the simple locale.
 boolean useVolumetricFog()
          useVolumetricFog returns false for the simple locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLocale

public SimpleLocale(Vector center,
                    float length)
Constructor builds a new SimpleLocale with the defined, center and length of each side.

Parameters:
center - the center point of the locale.
length - the length of the locale's sides.
Throws:
MonkeyRuntimeException - if center is null or length is less than or equal to zero.
Method Detail

update

public void update(float time)
update does not perform any action for SimpleLocale.

Specified by:
update in interface Locale

render

public void render()
render renders the SimpleLocale. The locale is rendered as a simple quad, with a constant height of center.y.

Specified by:
render in interface Locale

setTexture

public void setTexture(java.lang.String filename)
setTexture sets the image used by the locale.

Parameters:
filename - the path and filename of the image file.

setColor

public void setColor(float red,
                     float green,
                     float blue,
                     float alpha)
setColor sets the color to set the locale to.

Parameters:
red - the red component of the color.
green - the green component of the color.
blue - the blue component of the color.
alpha - the transparency of the color.

getCenter

public Vector getCenter()
getCenter returns the center of the locale.

Returns:
the center of the locale.

getLength

public float getLength()
getLength returns the length of the locale's sides.

Returns:
the length of the locale's sides.

setCenter

public void setCenter(Vector center)
setCenter sets the center of the locale.

Parameters:
center - the new center of the locale.

setLength

public void setLength(float length)
setLength sets the length of the locale's sides.

Parameters:
length - the length of the locale's sides.

toString

public java.lang.String toString()
toString returns the string representation of this object in the format:

jme.locale.SimpleLocale@1c282a1
Center: {VECTOR}
Side Length: {FLOAT}
Color: {RGBA VALUE}
Texture Name: {IMAGE FILE}

Returns:
string representation of this object.

useDistanceFog

public boolean useDistanceFog()
useDistanceFog returns false for the simple locale.

Specified by:
useDistanceFog in interface Locale
Returns:
false always.

useVolumetricFog

public boolean useVolumetricFog()
useVolumetricFog returns false for the simple locale.

Specified by:
useVolumetricFog in interface Locale
Returns:
false always.