com.vwp.j3d.utils.geometry
Class SkyBox

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Shape3D
                  extended by com.vwp.j3d.utils.geometry.SkyBox

public class SkyBox
extends javax.media.j3d.Shape3D

This class can be used to create a SkyBox to hold the background image. It creates this SkyBox together with the required texture coordinates. A texture is expected which contains six tiles right beside another. These tiles have to contain the following images for the faces of the SkyBox: left, front, right, back, top and bottom (from left to right). Different to other 3D objects here the texture coordinates are created in every case.


Field Summary
static int ENABLE_APPEARANCE_MODIFY
           
static int GENERATE_NORMALS
           
static int GENERATE_NORMALS_INWARD
           
 
Fields inherited from class javax.media.j3d.Shape3D
ALLOW_APPEARANCE_OVERRIDE_READ, ALLOW_APPEARANCE_OVERRIDE_WRITE, ALLOW_APPEARANCE_READ, ALLOW_APPEARANCE_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE, ALLOW_GEOMETRY_READ, ALLOW_GEOMETRY_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
SkyBox()
          The default constructor.
SkyBox(float dim, javax.media.j3d.Appearance ap)
          SkyBox constructor
SkyBox(float dim, int flags, javax.media.j3d.Appearance ap)
          SkyBox constructor
 
Method Summary
 
Methods inherited from class javax.media.j3d.Shape3D
addGeometry, cloneNode, duplicateNode, getAllGeometries, getAppearance, getAppearanceOverrideEnable, getBounds, getCollisionBounds, getGeometry, getGeometry, indexOfGeometry, insertGeometry, intersect, intersect, intersect, numGeometries, removeAllGeometries, removeGeometry, removeGeometry, setAppearance, setAppearanceOverrideEnable, setCollisionBounds, setGeometry, setGeometry
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATE_NORMALS

public static final int GENERATE_NORMALS
See Also:
Constant Field Values

GENERATE_NORMALS_INWARD

public static final int GENERATE_NORMALS_INWARD
See Also:
Constant Field Values

ENABLE_APPEARANCE_MODIFY

public static final int ENABLE_APPEARANCE_MODIFY
See Also:
Constant Field Values
Constructor Detail

SkyBox

public SkyBox()
The default constructor. It creates a 1x1x1 m white SkyBox.


SkyBox

public SkyBox(float dim,
              javax.media.j3d.Appearance ap)
SkyBox constructor

Parameters:
dim - width of the SkyBox
ap - Appearance of the SkyBox which has to be generated

SkyBox

public SkyBox(float dim,
              int flags,
              javax.media.j3d.Appearance ap)
SkyBox constructor

Parameters:
dim - width of the SkyBox
flags - specifies some properties of the SkyBox object, for more information please refer the flag values taken from @Box
ap - Appearance of the SkyBox which has to be generated