H3D API  2.4.1
TextureBackground.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
27 //
29 #ifndef __TEXTUREBACKGROUND_H__
30 #define __TEXTUREBACKGROUND_H__
31 
32 #include <H3D/X3DBackgroundNode.h>
33 #include <H3D/X3DTextureNode.h>
36 #include <H3D/SFFloat.h>
37 
38 namespace H3D {
39 
84  class H3DAPI_API TextureBackground :
85  public X3DBackgroundNode {
86  public:
87 
94  true >
96 
99  Inst< SFSetBind > _set_bind = 0,
100  Inst< SFNode > _metadata = 0,
101  Inst< SFTime > _bindTime = 0,
102  Inst< SFBool > _isBound = 0,
103  Inst< DisplayList > _displayList = 0,
104  Inst< MFFloat > _groundAngle = 0,
105  Inst< MFColor > _groundColor = 0,
106  Inst< MFFloat > _skyAngle = 0,
107  Inst< MFColor > _skyColor = 0,
108  Inst< SFTextureNode > _backTexture = 0,
109  Inst< SFTextureNode > _frontTexture = 0,
110  Inst< SFTextureNode > _leftTexture = 0,
111  Inst< SFTextureNode > _rightTexture = 0,
112  Inst< SFTextureNode > _topTexture = 0,
113  Inst< SFTextureNode > _bottomTexture = 0,
114  Inst< SFFloat > _transparency = 0 );
115 
116 
118  virtual void render();
119 
125  H3DUniquePtr< SFTextureNode > backTexture;
126 
132  H3DUniquePtr< SFTextureNode > frontTexture;
133 
139  H3DUniquePtr< SFTextureNode > leftTexture;
140 
146  H3DUniquePtr< SFTextureNode > rightTexture;
147 
153  H3DUniquePtr< SFTextureNode > topTexture;
154 
160  H3DUniquePtr< SFTextureNode > bottomTexture;
161 
167  H3DUniquePtr< SFFloat > transparency;
168 
171  protected:
172  inline void renderTexCoordForTexture( const Vec3f &tc,
173  X3DTextureNode *t ) {
175  }
176  };
177 }
178 
179 #endif
Contains the DependentSFNode and DependentMFNode template classes.
Contains the SFFloat field class.
Header file for X3DBackgroundNode, X3D scene-graph node.
Header file for X3DTextureCoordinateNode, X3D scene-graph node.
Header file for X3DTextureNode, X3D abstract texture scene-graph node.
DependentSFNode are modified TypedSFNode fields where the field dirty status is dependent on fields i...
Definition: DependentNodeFields.h:294
Class used for specifying a field member of a node in a DependentSFNode or DependentMFNode specificat...
Definition: DependentNodeFields.h:48
We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering,...
Definition: H3DDisplayListObject.h:60
This abstract interface class is the base class for all node types that wants to create an OpenGL dis...
Definition: H3DDisplayListObject.h:54
H3DUniquePtr< DisplayList > displayList
The DisplayList instance handling the OpenGL caching of this object.
Definition: H3DDisplayListObject.h:256
A background node that uses six individual texture nodes to compose the backdrop.
Definition: TextureBackground.h:85
H3DUniquePtr< SFTextureNode > leftTexture
The texture to use on the left face of the cube.
Definition: TextureBackground.h:139
H3DUniquePtr< SFTextureNode > rightTexture
The texture to use on the right face of the cube.
Definition: TextureBackground.h:146
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: TextureBackground.h:170
H3DUniquePtr< SFFloat > transparency
The transparency field is not supported in H3D API.
Definition: TextureBackground.h:167
DependentSFNode< X3DTextureNode, FieldRef< H3DDisplayListObject, H3DDisplayListObject::DisplayList, &H3DDisplayListObject::displayList >, true > SFTextureNode
The SFTextureNode field is dependent on the displayList field of the containing X3DTextureNode node.
Definition: TextureBackground.h:95
H3DUniquePtr< SFTextureNode > backTexture
The texture to use on the back face of the cube.
Definition: TextureBackground.h:125
H3DUniquePtr< SFTextureNode > bottomTexture
The texture to use on the bottom face of the cube.
Definition: TextureBackground.h:160
H3DUniquePtr< SFTextureNode > topTexture
The texture to use on the top face of the cube.
Definition: TextureBackground.h:153
H3DUniquePtr< SFTextureNode > frontTexture
The texture to use on the front face of the cube.
Definition: TextureBackground.h:132
X3DBackgroundNode is the abstract type from which all backgrounds inherit.
Definition: X3DBackgroundNode.h:126
static void renderTexCoordForTexture(const Vec3f &tc, X3DTextureNode *t)
Render the texture coordinate for all texture units used by the given texture .
Definition: X3DTextureCoordinateNode.cpp:79
This abstract node type is the base type for all node types which specify sources for texture images.
Definition: X3DTextureNode.h:47
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194