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

A background node that uses six static images to compose the backdrop. More...

#include <H3D/Background.h>

Inheritance diagram for H3D::Background:

Inheritance graph

List of all members.

Public Member Functions

 Background (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< MFString > _backUrl=0, Inst< MFString > _frontUrl=0, Inst< MFString > _leftUrl=0, Inst< MFString > _rightUrl=0, Inst< MFString > _topUrl=0, Inst< MFString > _bottomUrl=0)
 Constructor.
virtual void render ()
 Renders the background with OpenGL.

Public Attributes

auto_ptr< MFStringbackUrl
 The url of the texture to use on the back face of the cube.
auto_ptr< MFStringfrontUrl
 The url of the texture to use on the front face of the cube.
auto_ptr< MFStringleftUrl
 The url of the texture to use on the left face of the cube.
auto_ptr< MFStringrightUrl
 The url of the texture to use on the right face of the cube.
auto_ptr< MFStringtopUrl
 The url of the texture to use on the top face of the cube.
auto_ptr< MFStringbottomUrl
 The url of the texture to use on the bottom face of the cube.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Attributes

AutoRef< ImageTexturebackTexture
 The texture displayed at the back.
AutoRef< ImageTexturefrontTexture
 The texture displayed at the front.
AutoRef< ImageTextureleftTexture
 The texture displayed to the left.
AutoRef< ImageTexturerightTexture
 The texture displayed to the right.
AutoRef< ImageTexturetopTexture
 The texture displayed at the top.
AutoRef< ImageTexturebottomTexture
 The texture displayed at the bottom.


Detailed Description

A background node that uses six static images to compose the backdrop.

The backUrl, bottomUrl, frontUrl, leftUrl, rightUrl, and topUrl fields specify the url to a set of images 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:
Background.dot

Member Data Documentation

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

Access type: inputOutput

Background_backUrl.dot

Referenced by Background(), and render().

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

Access type: inputOutput

Background_bottomUrl.dot

Referenced by Background(), and render().

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

Access type: inputOutput

Background_frontUrl.dot

Referenced by Background(), and render().

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

Access type: inputOutput

Background_leftUrl.dot

Referenced by Background(), and render().

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

Access type: inputOutput

Background_rightUrl.dot

Referenced by Background(), and render().

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

Access type: inputOutput

Background_topUrl.dot

Referenced by Background(), and render().


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

Generated on Fri Nov 7 10:29:18 2008 for H3D API by  doxygen 1.5.7