org.xith3d.scenegraph.primitives
Class SkySphere

java.lang.Object
  extended by org.xith3d.render.RenderPass
      extended by org.xith3d.render.BackgroundRenderPass
          extended by org.xith3d.scenegraph.primitives.SkySphere
All Implemented Interfaces:
org.jagatoo.datatypes.Enableable, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject

public class SkySphere
extends BackgroundRenderPass

A sky box is background node intended to display the sky with a far away appearance but without consuming massive computational resources. It is drawn with the depth buffer disabled, so all objects which are drawn after it will be drawn in front. Even though it respects View's angle, it will always be drawn as if the View (camera) were in its center regardless of the actual position.

This implementation creates a sphere to provide a more realistic sky than SkyBox. The downside to using a sphere is that you need a panoramic picture to use as the Texture. This implementation also uses GeoSphere geometry so that it doesn't create a ridiculous number of triangles.

This class ignores the default setting for pickable and sets itself to NOT pickable. You must explicitly call setPickable( true ) on SkyGeoSphere nodes regardless of the default setting.

Originally inspired by William Denniss's SkyBox.


Field Summary
static int DEFAULT_SKY_SLICES
           
static int DEFAULT_SKY_STACKS
           
 
Constructor Summary
SkySphere(int slices, int stacks, java.lang.String textureName)
           
SkySphere(int slices, int stacks, Texture texture)
           
SkySphere(java.lang.String textureName)
           
SkySphere(Texture texture)
           
 
Method Summary
static BranchGroup createSkySphereGroup(int slices, int stacks, java.lang.String textureName)
           
static BranchGroup createSkySphereGroup(int slices, int stacks, Texture texture)
           
static
<G extends GroupNode>
G
createSkySphereGroup(int slices, int stacks, Texture texture, G group)
           
static BranchGroup createSkySphereGroup(java.lang.String textureName)
           
static BranchGroup createSkySphereGroup(Texture texture)
           
 
Methods inherited from class org.xith3d.render.BackgroundRenderPass
createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createParallel, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, createPerspective, isFrustumCullingEnabled, setFrustumCullingEnabled
 
Methods inherited from class org.xith3d.render.RenderPass
addRenderCallback, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, create2D, createRenderBinProvider, freeOpenGLResources, freeOpenGLResources, getBranchGroup, getConfig, getName, getRenderBinProvider, getRenderCallbackNotifier, getRenderTarget, getShadowCasterLight, isClipperEnabled, isEnabled, isLayeredModeForced, isScissorEnabled, isUnlayeredModeForced, removeRenderCallback, setBranchGroup, setClipperEnabled, setConfig, setEnabled, setLayeredModeForced, setName, setRenderTarget, setScissorEnabled, setShadowCasterLight, setUnlayeredModeForced, switchWireframeMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SKY_SLICES

public static final int DEFAULT_SKY_SLICES
See Also:
Constant Field Values

DEFAULT_SKY_STACKS

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

SkySphere

public SkySphere(int slices,
                 int stacks,
                 Texture texture)

SkySphere

public SkySphere(int slices,
                 int stacks,
                 java.lang.String textureName)

SkySphere

public SkySphere(Texture texture)

SkySphere

public SkySphere(java.lang.String textureName)
Method Detail

createSkySphereGroup

public static <G extends GroupNode> G createSkySphereGroup(int slices,
                                                           int stacks,
                                                           Texture texture,
                                                           G group)

createSkySphereGroup

public static BranchGroup createSkySphereGroup(int slices,
                                               int stacks,
                                               Texture texture)

createSkySphereGroup

public static final BranchGroup createSkySphereGroup(int slices,
                                                     int stacks,
                                                     java.lang.String textureName)

createSkySphereGroup

public static final BranchGroup createSkySphereGroup(Texture texture)

createSkySphereGroup

public static final BranchGroup createSkySphereGroup(java.lang.String textureName)