H3D API  2.4.1
H3DRenderModeGroupNode.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 __H3DRENDERMODEGROUPNODE_H__
30 #define __H3DRENDERMODEGROUPNODE_H__
31 
32 #include <H3D/X3DChildNode.h>
33 #include <H3D/X3DBoundedObject.h>
37 #include <H3D/X3DGroupingNode.h>
38 
39 namespace H3D {
40 
48  class H3DAPI_API H3DRenderModeGroupNode :
49  public X3DGroupingNode {
50  public:
51 
53  H3DRenderModeGroupNode( Inst< AddChildren > _addChildren = 0,
54  Inst< RemoveChildren > _removeChildren = 0,
55  Inst< MFChild > _children = 0,
56  Inst< SFNode > _metadata = 0,
57  Inst< SFBound > _bound = 0,
58  Inst< SFVec3f > _bboxCenter = 0,
59  Inst< SFVec3f > _bboxSize = 0 );
60 
64  virtual void saveCurrentState() = 0;
65 
67  virtual void changeGeometryState() = 0;
68 
71  virtual void restoreState() = 0;
72 
74  virtual void render();
75 
77  virtual void traverseSG( TraverseInfo &ti );
78 
81  protected:
82  friend class X3DGeometryNode;
83  static H3DRenderModeGroupNode *current_render_mode_group;
84  };
85 }
86 
87 #endif
Contains the DependentSFNode and DependentMFNode template classes.
Header file for H3DDisplayListObject.
Header file for X3DBoundedObject.
Header file for X3DChildNode, X3D scene-graph node.
Header file for X3DGroupingNode, X3D scene-graph node.
Header file for X3DPointingDeviceSensorNode, X3D scene-graph node.
The H3DRenderModeGroupNode is a base class for all nodes that wants in some way change the OpenGL sta...
Definition: H3DRenderModeGroupNode.h:49
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: H3DRenderModeGroupNode.h:80
virtual void saveCurrentState()=0
Virtual function that should be implemented by all sub-classes to save the current OpenGL state of th...
virtual void restoreState()=0
Virtual function that should restore the OpenGL state to what it was before the call to saveCurrentSt...
virtual void changeGeometryState()=0
Add the changes to the OpenGL state that is needed.
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
This is the base node type for all geometry in X3D.
Definition: X3DGeometryNode.h:61
This abstract node type indicates that concrete node types derived from it contain children nodes and...
Definition: X3DGroupingNode.h:53
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