H3D API  2.4.1
FillProperties.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 __FILLPROPERTIES_H__
30 #define __FILLPROPERTIES_H__
31 
33 #include <H3D/SFColor.h>
34 #include <H3D/SFInt32.h>
35 
36 namespace H3D {
37 
78  class H3DAPI_API FillProperties : public X3DAppearanceChildNode {
79  public:
80 
82  FillProperties( Inst< DisplayList > _displayList = 0,
83  Inst< SFBool > _filled = 0,
84  Inst< SFColor > _hatchColor = 0,
85  Inst< SFBool > _hatched = 0,
86  Inst< SFInt32 > _hatchStyle = 0,
87  Inst< SFNode > _metadata = 0 );
88 
89 
93  virtual GLbitfield getAffectedGLAttribs() {
94  return GL_POLYGON_BIT | GL_LIGHTING_BIT | GL_CURRENT_BIT;
95  }
96 
98  virtual void render();
99 
103  virtual string defaultXMLContainerField() {
104  return "fillProperties";
105  }
106 
114  H3DUniquePtr< SFBool > filled;
115 
121  H3DUniquePtr< SFColor > hatchColor;
122 
129  H3DUniquePtr< SFBool > hatched;
130 
139  H3DUniquePtr< SFInt32 > hatchStyle;
140 
143  };
144 }
145 
146 #endif
Contains the SFColor field class.
Contains the SFInt32 field class.
Header file for X3DAppearanceChildNode, X3D scene-graph node.
The FillProperties node specifies additional properties to be applied to all polygonal areas on top o...
Definition: FillProperties.h:78
virtual GLbitfield getAffectedGLAttribs()
Returns a bitmask of the OpenGL attrib bits that will be affected by this node.
Definition: FillProperties.h:93
virtual string defaultXMLContainerField()
Returns the default xml containerField attribute value.
Definition: FillProperties.h:103
H3DUniquePtr< SFInt32 > hatchStyle
The hatchStyle field selects a hatch pattern to be used.
Definition: FillProperties.h:139
H3DUniquePtr< SFBool > hatched
The hatched field specifies if the geometry should be hatched or not.
Definition: FillProperties.h:129
H3DUniquePtr< SFColor > hatchColor
The color of the hatches.
Definition: FillProperties.h:121
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: FillProperties.h:142
H3DUniquePtr< SFBool > filled
The filled field specifies if the geometry should be filled or not.
Definition: FillProperties.h:114
This is the base node type for the child nodes of the X3DAppearanceNode type.
Definition: X3DAppearanceChildNode.h:44
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