com.jme3.util
Class SkyFactory
java.lang.Object
com.jme3.util.SkyFactory
public class SkyFactory
- extends java.lang.Object
SkyFactory
is used to create jME Spatial
s that can
be attached to the scene to display a sky image in the background.
Method Summary |
static Spatial |
createSky(AssetManager assetManager,
java.lang.String textureName,
boolean sphereMap)
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
boolean sphereMap)
|
static Spatial |
createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down)
|
static Spatial |
createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down,
Vector3f normalScale)
|
static Spatial |
createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down,
Vector3f normalScale,
int sphereRadius)
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
boolean sphereMap)
Creates a sky using the given texture (cubemap or spheremap). |
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
boolean sphereMap,
int sphereRadius)
Creates a sky using the given texture (cubemap or spheremap). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SkyFactory
public SkyFactory()
createSky
public static Spatial createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
boolean sphereMap)
- Creates a sky using the given texture (cubemap or spheremap).
- Parameters:
assetManager
- The asset manager to use to load materialstexture
- Texture to use for the skynormalScale
- The normal scale is multiplied by the 3D normal
to get a texture coordinate. Use Vector3f.UNIT_XYZ to not apply
and transformation to the normal.sphereMap
- The way the texture is used
depends on this value:
- true: Its a Texture2D with the pixels arranged for
sphere mapping.
- false: Its either a TextureCubeMap or Texture2D. If its a Texture2D
then the image is taken from it and is inserted into a TextureCubeMap
- Returns:
- A spatial representing the sky
createSky
public static Spatial createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
boolean sphereMap,
int sphereRadius)
- Creates a sky using the given texture (cubemap or spheremap).
- Parameters:
assetManager
- The asset manager to use to load materialstexture
- Texture to use for the skynormalScale
- The normal scale is multiplied by the 3D normal
to get a texture coordinate. Use Vector3f.UNIT_XYZ to not apply
and transformation to the normal.sphereMap
- The way the texture is used
depends on this value:
- true: Its a Texture2D with the pixels arranged for
sphere mapping.
- false: Its either a TextureCubeMap or Texture2D. If its a Texture2D
then the image is taken from it and is inserted into a TextureCubeMap
sphereRadius
- If specified, this will be the sky sphere's radius.
This should be the camera's near plane for optimal quality.
- Returns:
- A spatial representing the sky
createSky
public static Spatial createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down,
Vector3f normalScale)
createSky
public static Spatial createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down,
Vector3f normalScale,
int sphereRadius)
createSky
public static Spatial createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down)
createSky
public static Spatial createSky(AssetManager assetManager,
Texture texture,
boolean sphereMap)
createSky
public static Spatial createSky(AssetManager assetManager,
java.lang.String textureName,
boolean sphereMap)