de.rico.engine.geometry
Class SkyBox

java.lang.Object
  extended by de.rico.engine.geometry.AbstractMesh
      extended by de.rico.engine.geometry.MeshDL
          extended by de.rico.engine.geometry.SkyBox

public class SkyBox
extends MeshDL

This class represents the skybox of the scene

Author:
Frank Bruns

Constructor Summary
SkyBox(float height, float width, float length)
          Creates a new skybox for the scene with the specified size.
 
Method Summary
 void draw(javax.media.opengl.GL gl)
          Draws the skybox to the scene.
 void finishModel()
          Creates the display list for the skybox.
 java.lang.String getPathBottom()
          Returns the file path to the bottom sky box texture.
 java.lang.String getPathEast()
          Returns the file path to the eastern sky box texture.
 java.lang.String getPathNorth()
          Returns the file path to the nothern sky box texture.
 java.lang.String getPathSouth()
          Returns the file path to the southern sky box texture.
 java.lang.String getPathTop()
          Returns the file path to the top sky box texture.
 java.lang.String getPathWest()
          Returns the file path to the western sky box texture.
 void init()
          Initializes the skybox for use
 void setTextureBottom(java.lang.String path)
          Sets the bottom texture of the skybox
 void setTextureEast(java.lang.String path)
          Sets the eastern texture of the skybox
 void setTextureNorth(java.lang.String path)
          Sets the northern texture of the skybox
 void setTextureSouth(java.lang.String path)
          Sets the southern texture of the skybox
 void setTextureTop(java.lang.String path)
          Sets the top texture of the skybox
 void setTextureWest(java.lang.String path)
          Sets the western texture of the skybox
 
Methods inherited from class de.rico.engine.geometry.MeshDL
addFace, destroy, getDisplayListId, getFaces, getFacesTransformed, specializedDraw, update
 
Methods inherited from class de.rico.engine.geometry.AbstractMesh
addShader, drawShaders, getBoundingVolume, getHeightOffset, getMaterial, getMouseOverMesh, getName, getPosition, getPosX, getPosY, getPosZ, getRotation, getRotX, getRotY, getRotZ, getScaleX, getScaleY, getScaleZ, getTex0Path, getTex1Path, getText0XMovement, getText0YMovement, getText1XMovement, getText1YMovement, getTexUnit0, getTexUnit1, isCollidable, isDrawingEnabled, isEnabledOcclusionCulling, isMouseOverMesh, isOccluded, isPickable, isShadowEnabled, isSmoothShaded, isTex0Flipped, isTex0MipMapped, isTex0Rotated, isTex1Flipped, isTex1MipMapped, isTex1Rotated, moveBackwardsGlobal, moveBackwardsLocal, moveDownGlobal, moveForwardGlobal, moveForwardLocal, moveLeftGlobal, moveLeftLocal, moveRightGlobal, moveRightLocal, moveTo, moveUpGlobal, performTransformations, rotateDown, rotateLeft, rotateRight, rotateUp, scale, setAttachedGround, setBlendDestFactor, setBlendFunction, setBlendSourceFactor, setCollidable, setDrawingEnabled, setEnabledOcclusionCulling, setEnvironmentMap, setMaterial, setName, setPickable, setPosition, setPosition, setPosX, setPosY, setPosZ, setRotation, setRotation, setRotX, setRotY, setRotZ, setScaleX, setScaleY, setScaleZ, setShadowEnabled, setShowBoundingVolume, setTex0Movement, setTex0TexEnvirMode, setTex0XMovement, setTex0YMovement, setTex1Movement, setTex1TexEnvirMode, setTex1XMovement, setTex1YMovement, setTexUnit0, setTexUnit0, setTexUnit1, setTexUnit1, setTransparency, showWireFrame, translateX, translateY, translateZ
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkyBox

public SkyBox(float height,
              float width,
              float length)
Creates a new skybox for the scene with the specified size. Don't forget to assign textures to its six planes and finally call the method to create the display list.

Parameters:
height - heiht of the skybox
width - width of the skybox
length - length of the skybox
Method Detail

setTextureSouth

public void setTextureSouth(java.lang.String path)
Sets the southern texture of the skybox

Parameters:
path - path to southern skybox texture

setTextureNorth

public void setTextureNorth(java.lang.String path)
Sets the northern texture of the skybox

Parameters:
path - path to nothern skybox texture

setTextureEast

public void setTextureEast(java.lang.String path)
Sets the eastern texture of the skybox

Parameters:
path - path to eastern skybox texture

setTextureWest

public void setTextureWest(java.lang.String path)
Sets the western texture of the skybox

Parameters:
path - path to western skybox texture

setTextureTop

public void setTextureTop(java.lang.String path)
Sets the top texture of the skybox

Parameters:
path - path to top skybox texture

setTextureBottom

public void setTextureBottom(java.lang.String path)
Sets the bottom texture of the skybox

Parameters:
path - path to bottom skybox texture

getPathNorth

public java.lang.String getPathNorth()
Returns the file path to the nothern sky box texture. This is relevant for the world editor.

Returns:
file path to the nothern sky box texture.

getPathSouth

public java.lang.String getPathSouth()
Returns the file path to the southern sky box texture. This is relevant for the world editor.

Returns:
file path to the southern sky box texture.

getPathEast

public java.lang.String getPathEast()
Returns the file path to the eastern sky box texture. This is relevant for the world editor.

Returns:
file path to the eastern sky box texture.

getPathWest

public java.lang.String getPathWest()
Returns the file path to the western sky box texture. This is relevant for the world editor.

Returns:
file path to the western sky box texture.

getPathTop

public java.lang.String getPathTop()
Returns the file path to the top sky box texture. This is relevant for the world editor.

Returns:
file path to the top sky box texture.

getPathBottom

public java.lang.String getPathBottom()
Returns the file path to the bottom sky box texture. This is relevant for the world editor.

Returns:
file path to the bottom sky box texture.

finishModel

public void finishModel()
Creates the display list for the skybox. This method must be called after the assignment of textures to the skyboxes planes.

Overrides:
finishModel in class MeshDL

init

public void init()
Initializes the skybox for use


draw

public void draw(javax.media.opengl.GL gl)
Draws the skybox to the scene. Skyboxes are not affected by the the engines lighting system, but you can change the material color though.

Overrides:
draw in class MeshDL
Parameters:
gl -