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.Modifier and Type | Class and Description |
---|---|
static class |
SkyFactory.EnvMapType
The type of map fed to the shader
|
Modifier and Type | Method and Description |
---|---|
static Spatial |
createSky(AssetManager assetManager,
java.lang.String textureName,
boolean sphereMap)
|
static Spatial |
createSky(AssetManager assetManager,
java.lang.String textureName,
SkyFactory.EnvMapType envMapType)
Create a sky using the given cubemap or spheremap texture.
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
boolean sphereMap)
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
SkyFactory.EnvMapType envMapType)
Create a sky using the given cubemap or spheremap texture.
|
static Spatial |
createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down)
Create a cube-mapped sky using six textures.
|
static Spatial |
createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down,
Vector3f normalScale)
Create a cube-mapped sky with radius=10 using six textures.
|
static Spatial |
createSky(AssetManager assetManager,
Texture west,
Texture east,
Texture north,
Texture south,
Texture up,
Texture down,
Vector3f normalScale,
float sphereRadius)
Create a cube-mapped sky using six textures.
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
boolean sphereMap)
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
boolean sphereMap,
int sphereRadius)
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
SkyFactory.EnvMapType envMapType)
Create a sky with radius=10 using the given cubemap or spheremap texture.
|
static Spatial |
createSky(AssetManager assetManager,
Texture texture,
Vector3f normalScale,
SkyFactory.EnvMapType envMapType,
float sphereRadius)
Create a sky using the given cubemap or spheremap texture.
|
@Deprecated public static Spatial createSky(AssetManager assetManager, Texture texture, Vector3f normalScale, boolean sphereMap)
createSky(com.jme3.asset.AssetManager, com.jme3.texture.Texture,
com.jme3.math.Vector3f, com.jme3.util.SkyFactory.EnvMapType)
assetManager
- from which to load materialstexture
- to usenormalScale
- 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
- determines how the texture is used:public static Spatial createSky(AssetManager assetManager, Texture texture, Vector3f normalScale, SkyFactory.EnvMapType envMapType)
assetManager
- from which to load materialstexture
- to usenormalScale
- 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.envMapType
- see SkyFactory.EnvMapType
@Deprecated public static Spatial createSky(AssetManager assetManager, Texture texture, Vector3f normalScale, boolean sphereMap, int sphereRadius)
createSky(com.jme3.asset.AssetManager, com.jme3.texture.Texture,
com.jme3.math.Vector3f, com.jme3.util.SkyFactory.EnvMapType, float)
assetManager
- from which to load materialstexture
- to usenormalScale
- 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
- determines how the texture is used:sphereRadius
- the sky sphere's radius: for the sky to be visible,
its radius must fall between the near and far planes of the camera's
frustumpublic static Spatial createSky(AssetManager assetManager, Texture texture, Vector3f normalScale, SkyFactory.EnvMapType envMapType, float sphereRadius)
assetManager
- from which to load materialstexture
- to usenormalScale
- 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.envMapType
- see SkyFactory.EnvMapType
sphereRadius
- the sky sphere's radius: for the sky to be visible,
its radius must fall between the near and far planes of the camera's
frustum@Deprecated public static Spatial createSky(AssetManager assetManager, Texture texture, boolean sphereMap)
createSky(com.jme3.asset.AssetManager, com.jme3.texture.Texture,
com.jme3.math.Vector3f, com.jme3.util.SkyFactory.EnvMapType)
assetManager
- from which to load materialstexture
- to usesphereMap
- determines how the texture is used:@Deprecated public static Spatial createSky(AssetManager assetManager, java.lang.String textureName, boolean sphereMap)
createSky(com.jme3.asset.AssetManager, java.lang.String,
com.jme3.util.SkyFactory.EnvMapType)
assetManager
- from which to load materialstextureName
- the path to the texture asset to usesphereMap
- determines how the texture is used:public static Spatial createSky(AssetManager assetManager, Texture texture, SkyFactory.EnvMapType envMapType)
assetManager
- from which to load materialstexture
- to useenvMapType
- see SkyFactory.EnvMapType
public static Spatial createSky(AssetManager assetManager, java.lang.String textureName, SkyFactory.EnvMapType envMapType)
assetManager
- from which to load materialstextureName
- the path to the texture asset to useenvMapType
- see SkyFactory.EnvMapType
public static Spatial createSky(AssetManager assetManager, Texture west, Texture east, Texture north, Texture south, Texture up, Texture down, Vector3f normalScale)
assetManager
- from which to load materialswest
- texture for the western face of the cubeeast
- texture for the eastern face of the cubenorth
- texture for the northern face of the cubesouth
- texture for the southern face of the cubeup
- texture for the top face of the cubedown
- texture for the bottom face of the cubenormalScale
- 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.public static Spatial createSky(AssetManager assetManager, Texture west, Texture east, Texture north, Texture south, Texture up, Texture down, Vector3f normalScale, float sphereRadius)
assetManager
- from which to load materialswest
- texture for the western face of the cubeeast
- texture for the eastern face of the cubenorth
- texture for the northern face of the cubesouth
- texture for the southern face of the cubeup
- texture for the top face of the cubedown
- texture for the bottom face of the cubenormalScale
- 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.sphereRadius
- the sky sphere's radius: for the sky to be visible,
its radius must fall between the near and far planes of the camera's
frustumpublic static Spatial createSky(AssetManager assetManager, Texture west, Texture east, Texture north, Texture south, Texture up, Texture down)
assetManager
- from which to load materialswest
- texture for the western face of the cubeeast
- texture for the eastern face of the cubenorth
- texture for the northern face of the cubesouth
- texture for the southern face of the cubeup
- texture for the top face of the cubedown
- texture for the bottom face of the cube