H3D API  2.4.1
LineProperties.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 __LINEPROPERTIES_H__
30 #define __LINEPROPERTIES_H__
31 
33 #include <H3D/SFInt32.h>
34 #include <H3D/SFFloat.h>
35 
36 namespace H3D {
37 
76  class H3DAPI_API LineProperties : public X3DAppearanceChildNode {
77  public:
78 
80  LineProperties( Inst< DisplayList > _displayList = 0,
81  Inst< SFNode > _metadata = 0,
82  Inst< SFBool > _applied = 0,
83  Inst< SFInt32 > _linetype = 0,
84  Inst< SFFloat > _linewidthScaleFactor = 0 );
85 
89  virtual GLbitfield getAffectedGLAttribs() {
90  return GL_LINE_BIT;
91  }
92 
94  virtual void render();
95 
99  virtual string defaultXMLContainerField() {
100  return "lineProperties";
101  }
102 
110 
111  H3DUniquePtr< SFBool > applied;
112 
121  H3DUniquePtr< SFInt32 > linetype;
122 
132  H3DUniquePtr< SFFloat > linewidthScaleFactor;
133 
136  };
137 }
138 
139 #endif
Contains the SFFloat field class.
Contains the SFInt32 field class.
Header file for X3DAppearanceChildNode, X3D scene-graph node.
The LineProperties node specifies additional properties to be applied to all line geometry.
Definition: LineProperties.h:76
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: LineProperties.h:135
H3DUniquePtr< SFFloat > linewidthScaleFactor
The linewidthScaleFactor is a multiplicative value that scales the nominal linewidth by the linewidth...
Definition: LineProperties.h:132
virtual GLbitfield getAffectedGLAttribs()
Returns a bitmask of the OpenGL attrib bits that will be affected by this node.
Definition: LineProperties.h:89
virtual string defaultXMLContainerField()
Returns the default xml containerField attribute value.
Definition: LineProperties.h:99
H3DUniquePtr< SFInt32 > linetype
The linetype field selects a line pattern to be used for lines.
Definition: LineProperties.h:121
H3DUniquePtr< SFBool > applied
Determines if the linetype and linewidthScaleFactor should be applied or not.
Definition: LineProperties.h:111
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