Package com.ardor3d.scenegraph.extension
Class Skybox
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Node
com.ardor3d.scenegraph.extension.Skybox
A Box made of textured quads that simulate having a sky, horizon and so forth around your scene. Either attach to a
camera node or update on each frame to set this skybox at the camera's position.
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFace
(Skybox.Face face) Retrieve the quad indicated by the given side.getTexture
(Skybox.Face face) void
void
preloadTexture
(Skybox.Face face, Renderer r) void
Force all of the textures to load.void
read
(InputCapsule capsule) void
setTexture
(Skybox.Face face, Texture texture) Set the texture to be displayed on the given face of the skybox.void
setTexture
(Skybox.Face face, Texture texture, int textureUnit) Set the texture to be displayed on the given side of the skybox.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.scenegraph.Node
acceptVisitor, attachChild, attachChildAt, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, getChild, getChild, getChildIndex, getChildren, getClassTag, getNumberOfChildren, hasChild, makeCopy, makeInstanced, propagateDirtyDown, sortLights, swapChildren, updateChildren, updateWorldBound, updateWorldRenderStates, updateWorldTransform
Methods inherited from class com.ardor3d.scenegraph.Spatial
addController, addTranslation, addTranslation, applyWorldRenderStates, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, worldToLocal
-
Constructor Details
-
Skybox
public Skybox() -
Skybox
Creates a new skybox. The size of the skybox and name is specified here. By default, no textures are set.- Parameters:
name
- The name of the skybox.xExtent
- The x size of the skybox in both directions from the center.yExtent
- The y size of the skybox in both directions from the center.zExtent
- The z size of the skybox in both directions from the center.
-
-
Method Details
-
setTexture
Set the texture to be displayed on the given face of the skybox. Replaces any existing texture on that face.- Parameters:
face
- the face to settexture
- The texture for that side to assume.- Throws:
IllegalArgumentException
- if face is null.
-
setTexture
Set the texture to be displayed on the given side of the skybox. Only replaces the texture at the index specified by textureUnit.- Parameters:
face
- the face to settexture
- The texture for that side to assume.textureUnit
- The texture unite of the given side's TextureState the texture will assume.
-
getTexture
-
initialize
public void initialize() -
getFace
Retrieve the quad indicated by the given side.- Parameters:
face
- One of Skybox.Face.North, Skybox.Face.South, and so on...- Returns:
- The Quad that makes up that side of the Skybox.
-
preloadTexture
-
preloadTextures
Force all of the textures to load. This prevents pauses later during the application as you pan around the world.- Parameters:
r
- the renderer
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classNode
- Parameters:
capsule
- the capsule- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classNode
- Parameters:
capsule
- the input capsule- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-