H3D API  2.4.1
X3DTextureTransformNode.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 __X3DTEXTURETRANSFORMNODE_H__
30 #define __X3DTEXTURETRANSFORMNODE_H__
31 
33 namespace H3D {
40  class H3DAPI_API X3DTextureTransformNode : public X3DAppearanceChildNode {
41  public:
42 
49  H3D_API_EXCEPTION( InvalidCallToCallList );
50 
52  virtual void callList( bool /*build_list*/ ) {
53  stringstream s;
54  s << "Cannot call callList() on the DisplayList of an "
55  << "X3DTextureTransformNode since the rendering requires "
56  << "specification of which texture units to render for. Use "
57  << "render() or renderForMultipleTexture() instead.";
58  throw InvalidCallToCallList( s.str(), H3D_FULL_LOCATION );
59  }
60  };
61 
63  X3DTextureTransformNode( Inst< DisplayList > _displayList = 0,
64  Inst< SFNode> _metadata = 0 );
65 
68  virtual void renderForTextureUnits( unsigned int start_unit,
69  unsigned int end_unit );
70 
72  virtual void renderForTextureUnit( unsigned int texture_unit );
73 
78  virtual void preRender();
79 
83  virtual void postRender();
84 
88  virtual string defaultXMLContainerField() {
89  return "textureTransform";
90  }
91  };
92 }
93 
94 #endif
#define H3D_FULL_LOCATION
Header file for X3DAppearanceChildNode, X3D scene-graph node.
We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering,...
Definition: H3DDisplayListObject.h:60
This is the base node type for the child nodes of the X3DAppearanceNode type.
Definition: X3DAppearanceChildNode.h:44
The rendering of texture transformation requires the specifiation of which texture units to render th...
Definition: X3DTextureTransformNode.h:48
This abstract node type is the base type for all node types which specify a transformation of texture...
Definition: X3DTextureTransformNode.h:40
virtual string defaultXMLContainerField()
Returns the default xml containerField attribute value.
Definition: X3DTextureTransformNode.h:88
H3D_API_EXCEPTION(Vec2dNormalizeError)
H3D API namespace.
Definition: Anchor.h:38