Class Skybox
- java.lang.Object
-
- de.coreengine.rendering.renderable.Skybox
-
public class Skybox extends Object
Class that represents a skybox- Author:
- Darius Dinger
-
-
Constructor Summary
Constructors Constructor Description Skybox()
Creating new skybox, init variables
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addCubeMapTexture(String tex, float blending)
Adding cube map texture and its initial blending factor to the units.
The factor represents the visibility of the cube map texture.float[]
getBlendingFactors()
String[]
getCubeMapTextures()
FrameBufferObject
getSkyboxFbo()
Fbo that stores the rendered skybox.javax.vecmath.Matrix4f
getTransMat()
void
setBlendingFactor(int id, float blending)
Setting blending factor at specific id.void
setCubeMapTexture(int id, String tex)
Setting cube map texture at specific id.void
setCubeMapTextures(String[] cubeMapTextures, float[] blendingFactors)
Setting cube map textures and its initial blending factors.
The factor represents the visibility of the cube map texture.void
setRotation(float rotation)
-
-
-
Method Detail
-
setRotation
public void setRotation(float rotation)
- Parameters:
rotation
- New rotation of the skybox in degrees
-
getSkyboxFbo
public FrameBufferObject getSkyboxFbo()
Fbo that stores the rendered skybox. Can be used f.e. to fade fog into the skybox.- Returns:
- Skybox fbo
-
setCubeMapTextures
public void setCubeMapTextures(String[] cubeMapTextures, float[] blendingFactors)
Setting cube map textures and its initial blending factors.
The factor represents the visibility of the cube map texture. 0.0f is not visible and 1.0f is full visible. The blending factor will be multiplied by the texture color.
The cubeMapTextures must have the same length as the blendingfactors, else it would not be changed.- Parameters:
cubeMapTextures
- Cube map texturesblendingFactors
- Initial blending factors
-
setCubeMapTexture
public void setCubeMapTexture(int id, String tex)
Setting cube map texture at specific id. The id has to be in the range of the units else it wouldnt change!- Parameters:
id
- Id of the unit to set the texturetex
- TextureData to set at the id
-
setBlendingFactor
public void setBlendingFactor(int id, float blending)
Setting blending factor at specific id. The id has to be in the range of the units else it wouldnt change!
The factor represents the visibility of the cube map texture. 0.0f is not visible and 1.0f is full visible. The blending factor will be multiplied by the texture color.- Parameters:
id
- Id of the unit to set the blending factor forblending
- Blending factor to set at the id
-
addCubeMapTexture
public int addCubeMapTexture(String tex, float blending)
Adding cube map texture and its initial blending factor to the units.
The factor represents the visibility of the cube map texture. 0.0f is not visible and 1.0f is full visible. The blending factor will be multiplied by the texture color.- Parameters:
tex
- Cube map texture to addblending
- Initial blending factor- Returns:
- Unit id of the texture
-
getBlendingFactors
public float[] getBlendingFactors()
- Returns:
- Read/writeable array of the blending factors
-
getCubeMapTextures
public String[] getCubeMapTextures()
- Returns:
- Read/writeable array of the cube map textures
-
getTransMat
public javax.vecmath.Matrix4f getTransMat()
- Returns:
- Current transformation matrix of the skybox
-
-