Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## simogl.level
Class SkyBox

    java.lang.Object
      simogl.geometry.AbstractMesh
          simogl.geometry.MeshDL
              simogl.level.SkyBox

    public class SkyBox

extends MeshDL

This class represents the skybox of the scene

Author:
  Frank Bruns

Constructor Summary
`SkyBox(javax.media.opengl.GL gl, float height, float width, float length)` Creates a new skybox for the scene with the specified size.

Method Summary
`void` | `createDisplayList(javax.media.opengl.GL gl)` Creates the display list for the skybox.
`void` | `draw(javax.media.opengl.GL gl)` Draws the skybox to the scene
`static void` | `setMaterialAmbDiff(float red, float green, float blue, float alpha)` Static method to set the material color of the skybox from virtually everywhere
`void` | `setTextureBottom(com.sun.opengl.util.texture.Texture texture)` Sets the bottom texture of the skybox
`void` | `setTextureEast(com.sun.opengl.util.texture.Texture texture)` Sets the eastern texture of the skybox
`void` | `setTextureNorth(com.sun.opengl.util.texture.Texture texture)` Sets the northern texture of the skybox
`void` | `setTextureSouth(com.sun.opengl.util.texture.Texture texture)` Sets the southern texture of the skybox
`void` | `setTextureTop(com.sun.opengl.util.texture.Texture texture)` Sets the top texture of the skybox
`void` | `setTextureWest(com.sun.opengl.util.texture.Texture texture)` Sets the western texture of the skybox

Methods inherited from class simogl.geometry.MeshDL
`deleteMesh, getMeshID, setMeshID, specializedDraw`

Methods inherited from class simogl.geometry.AbstractMesh
`addFace, disableRenderOptions, drawShadow, enableRenderOptions, getBoundingBox, getFaces, getMaterial, getPosition, getPositionX, getPositionY, getPositionZ, getRoationX, getRoationY, getRoationZ, getRotation, getTexture, isTransparent, performTransformations, rotate, rotateAxxisX, rotateAxxisY, rotateAxxisZ, scale, setDrawShadow, setEnabledFaceCulling, setMaterial, setPosition, setPosition, setPositionX, setPositionY, setPositionZ, setTexture, setTransparent, showBoundingBox, showWireFrame`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SkyBox

    public SkyBox(javax.media.opengl.GL gl,
                  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:
    `gl` -
    `height` - heiht of the skybox
    `width` - width of the skybox
    `length` - length of the skybox

Method Detail

### setTextureNorth

    public void setTextureNorth(com.sun.opengl.util.texture.Texture texture)

  Sets the northern texture of the skybox

  Parameters:
    `texture` - northern skybox texture

### setTextureSouth

    public void setTextureSouth(com.sun.opengl.util.texture.Texture texture)

  Sets the southern texture of the skybox

  Parameters:
    `texture` - southern skybox texture

### setTextureEast

    public void setTextureEast(com.sun.opengl.util.texture.Texture texture)

  Sets the eastern texture of the skybox

  Parameters:
    `texture` - eastern skybox texture

### setTextureWest

    public void setTextureWest(com.sun.opengl.util.texture.Texture texture)

  Sets the western texture of the skybox

  Parameters:
    `texture` - western skybox texture

### setTextureTop

    public void setTextureTop(com.sun.opengl.util.texture.Texture texture)

  Sets the top texture of the skybox

  Parameters:
    `texture` - top skybox texture

### setTextureBottom

    public void setTextureBottom(com.sun.opengl.util.texture.Texture texture)

  Sets the bottom texture of the skybox

  Parameters:
    `texture` - bottom skybox texture

### createDisplayList

    public void createDisplayList(javax.media.opengl.GL gl)

  Creates the display list for the skybox. This method must be called after the assignment of textures to the skyboxes planes.

  Overrides:
    `createDisplayList` in class `MeshDL`
  Parameters:
    `gl` -

### setMaterialAmbDiff

    public static void setMaterialAmbDiff(float red,
                                          float green,
                                          float blue,
                                          float alpha)

  Static method to set the material color of the skybox from virtually everywhere

  Parameters:
    `red` - amount of red
    `green` - amount of green
    `blue` - amount of blue
    `alpha` - amount of alpha

### draw

    public void draw(javax.media.opengl.GL gl)

  Draws the skybox to the scene

  Overrides:
    `draw` in class `MeshDL`
  Parameters:
    `gl` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD