H3D API  2.4.1
MultiTexture.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 __MULTITEXTURE_H__
30 #define __MULTITEXTURE_H__
31 
32 #include <iostream>
33 #include <H3D/X3DTextureNode.h>
35 #include <H3D/SFFloat.h>
36 #include <H3D/SFColor.h>
37 #include <H3D/MFString.h>
38 
39 namespace H3D {
114  class H3DAPI_API MultiTexture : public X3DTextureNode {
115  public:
116 
123  true >
125 
127  MultiTexture(
128  Inst< DisplayList > _displayList = 0,
129  Inst< SFFloat > _alpha = 0,
130  Inst< SFColor > _color = 0,
131  Inst< MFString > _function = 0,
132  Inst< SFNode > _metadata = 0,
133  Inst< MFString > _mode = 0,
134  Inst< MFString > _source = 0,
135  Inst< MFTexture > _texture = 0 );
136 
138  virtual void render();
139 
141  virtual void enableTexturing();
142 
144  virtual void disableTexturing();
145 
153  H3DUniquePtr< SFFloat > alpha;
154 
162  H3DUniquePtr< SFColor > color;
163 
171  H3DUniquePtr< MFString > function;
172 
179  H3DUniquePtr< MFString > mode;
180 
187  H3DUniquePtr< MFString > source;
188 
196  H3DUniquePtr< MFTexture > texture;
197 
200 
201  };
202 }
203 
204 #endif
Contains the DependentSFNode and DependentMFNode template classes.
Contains the MFString field class.
Contains the SFColor field class.
Contains the SFFloat field class.
Header file for X3DTextureNode, X3D abstract texture scene-graph node.
DependentMFNode are modified TypedMFNode fields where the field dirty status is dependent on fields i...
Definition: DependentNodeFields.h:336
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
MultiTexture enables the application of several individual textures to a 3D object to achieve a more ...
Definition: MultiTexture.h:114
H3DUniquePtr< SFColor > color
Base alpha value for SELECT mode operations.
Definition: MultiTexture.h:162
H3DUniquePtr< MFString > mode
The mode field controls the type of blending operation.
Definition: MultiTexture.h:179
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: MultiTexture.h:199
H3DUniquePtr< SFFloat > alpha
Base alpha value for SELECT mode operations.
Definition: MultiTexture.h:153
DependentMFNode< X3DTextureNode, FieldRef< H3DDisplayListObject, H3DDisplayListObject::DisplayList, &H3DDisplayListObject::displayList >, true > MFTexture
An MFNode where we make sure the type of the nodes contained is a subclass of X3DTextureNode.
Definition: MultiTexture.h:124
H3DUniquePtr< MFString > source
The source field determines the colour source for the second argument.
Definition: MultiTexture.h:187
H3DUniquePtr< MFTexture > texture
The texture field contains a list of X3DTextureNode instances (e.g., ImageTexture,...
Definition: MultiTexture.h:196
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