H3D::TextureBackground Class Reference
[X3D node classes.]

A background node that uses six individual texture nodes to compose the backdrop. More...

#include <H3D/TextureBackground.h>

Inheritance diagram for H3D::TextureBackground:

Inheritance graph

List of all members.

Public Types

typedef DependentSFNode
< X3DTextureNode, FieldRef
< H3DDisplayListObject,
H3DDisplayListObject::DisplayList,&H3DDisplayListObject::displayList >
, true > 
SFTextureNode
 The SFTextureNode field is dependent on the displayList field of the containing X3DTextureNode node.

Public Member Functions

 TextureBackground (Inst< SFSetBind > _set_bind=0, Inst< SFNode > _metadata=0, Inst< SFTime > _bindTime=0, Inst< SFBool > _isBound=0, Inst< DisplayList > _displayList=0, Inst< MFFloat > _groundAngle=0, Inst< MFColor > _groundColor=0, Inst< MFFloat > _skyAngle=0, Inst< MFColor > _skyColor=0, Inst< SFTextureNode > _backTexture=0, Inst< SFTextureNode > _frontTexture=0, Inst< SFTextureNode > _leftTexture=0, Inst< SFTextureNode > _rightTexture=0, Inst< SFTextureNode > _topTexture=0, Inst< SFTextureNode > _bottomTexture=0, Inst< SFFloat > _transparency=0)
 Constructor.
virtual void render ()
 Renders the background with OpenGL.

Public Attributes

auto_ptr< SFTextureNodebackTexture
 The texture to use on the back face of the cube.
auto_ptr< SFTextureNodefrontTexture
 The texture to use on the front face of the cube.
auto_ptr< SFTextureNodeleftTexture
 The texture to use on the left face of the cube.
auto_ptr< SFTextureNoderightTexture
 The texture to use on the right face of the cube.
auto_ptr< SFTextureNodetopTexture
 The texture to use on the top face of the cube.
auto_ptr< SFTextureNodebottomTexture
 The texture to use on the bottom face of the cube.
auto_ptr< SFFloattransparency
 The transparency field is not supported in H3D API.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

A background node that uses six individual texture nodes to compose the backdrop.

Unlike the Background node, which only supports static image formats referenced by URL fields, the contents of the TextureBackground node can be arbitrary X3DTextureNode nodes.

The backTexture, bottomTexture, frontTexture, leftTexture, rightTexture, and topTexture fields specify a set of textures that define a background panorama between the ground/sky backdrop and the scene's geometry. The panorama consists of six images, each of which is mapped onto a face of an infinitely large cube contained within the backdrop spheres and centred in the local coordinate system. The images are applied individually to each face of the cube. On the front, back, right, and left faces of the cube, when viewed from the origin looking down the negative Z-axis with the Y-axis as the view up direction, each image is mapped onto the corresponding face with the same orientation as if the image were displayed normally in 2D (back to back face, front to front face, left to left face, and right to right face). On the top face of the cube, when viewed from the origin looking along the +Y-axis with the +Z-axis as the view up direction, the top image is mapped onto the face with the same orientation as if the image were displayed normally in 2D. On the bottom face of the box, when viewed from the origin along the negative Y-axis with the negative Z-axis as the view up direction, the bottom image is mapped onto the face with the same orientation as if the image were displayed normally in 2D.

Alpha values in the panorama images (i.e., two or four component images) specify that the panorama is semi-transparent or transparent in regions, allowing the groundColor and skyColor to be visible.

Often, the bottom and top images will not be specified, to allow sky and ground to show. The other four images may depict surrounding mountains or other distant scenery.

The other fields work just as in X3DBackgroundNode.

Internal routes:
TextureBackground.dot

Member Typedef Documentation

The SFTextureNode field is dependent on the displayList field of the containing X3DTextureNode node.


Member Data Documentation

The texture to use on the back face of the cube.

Access type: inputOutput

TextureBackground_backTexture.dot

Referenced by render(), and TextureBackground().

The texture to use on the bottom face of the cube.

Access type: inputOutput

TextureBackground_bottomTexture.dot

Referenced by render(), and TextureBackground().

The texture to use on the front face of the cube.

Access type: inputOutput

TextureBackground_frontTexture.dot

Referenced by render(), and TextureBackground().

The texture to use on the left face of the cube.

Access type: inputOutput

TextureBackground_leftTexture.dot

Referenced by render(), and TextureBackground().

The texture to use on the right face of the cube.

Access type: inputOutput

TextureBackground_rightTexture.dot

Referenced by render(), and TextureBackground().

The texture to use on the top face of the cube.

Access type: inputOutput

TextureBackground_topTexture.dot

Referenced by render(), and TextureBackground().

The transparency field is not supported in H3D API.

Access type: inputOutput

TextureBackground_transparency.dot


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:11 2008 for H3D API by  doxygen 1.5.7