H3D API  2.4.1
X3DComposedGeometryNode.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 __X3DCOMPOSEDGEOMETRYNODE_H__
30 #define __X3DCOMPOSEDGEOMETRYNODE_H__
31 
32 #include <H3D/X3DGeometryNode.h>
33 #include <H3D/X3DCoordinateNode.h>
35 #include <H3D/X3DColorNode.h>
36 #include <H3D/X3DNormalNode.h>
39 #include <H3D/FogCoordinate.h>
40 
41 
42 namespace H3D {
43 
93  class H3DAPI_API X3DComposedGeometryNode : public X3DGeometryNode {
94  public:
99  Field,
102 
107  Field,
110 
115  Field,
118 
121  typedef DependentSFNode<
124  Field,
127 
130  class H3DAPI_API MFVertexAttributeNode : public DependentMFNode<
131  X3DVertexAttributeNode,
132  FieldRef< X3DGeometricPropertyNode,
133  Field,
134  &X3DVertexAttributeNode::propertyChanged > > {
135  };
136 
137 
140  typedef DependentSFNode<
143  Field,
146 
155  class H3DAPI_API DisplayList: public X3DGeometryNode::DisplayList {
156  public:
158  virtual void callList( bool build_list = true );
159  };
160 
167  virtual void startTexGen( X3DTextureCoordinateNode *tex_coord );
168 
170  virtual void stopTexGen( X3DTextureCoordinateNode *tex_coord );
171 
176  virtual void renderTexCoord( int index, X3DTextureCoordinateNode *tc );
177 
181  virtual void renderTexCoordArray( X3DTextureCoordinateNode *tc );
182 
184  virtual void disableTexCoordArray( X3DTextureCoordinateNode *tc );
185 
189  virtual void renderTexCoordVertexBufferObject(
191 
194  virtual void disableTexCoordVertexBufferObject(
196 
200  virtual Matrix4f getDefaultTexGenMatrix();
201 
203  X3DComposedGeometryNode( Inst< SFNode > _metadata = 0,
204  Inst< SFBound > _bound = 0,
205  Inst< DisplayList > _displayList = 0,
206  Inst< SFColorNode > _color = 0,
207  Inst< SFCoordinateNode > _coord = 0,
208  Inst< SFNormalNode > _normal = 0,
209  Inst< SFTextureCoordinateNode > _texCoord = 0,
210  Inst< SFBool > _ccw = 0,
211  Inst< SFBool > _colorPerVertex = 0,
212  Inst< SFBool > _normalPerVertex = 0,
213  Inst< SFBool > _solid = 0,
214  Inst< MFVertexAttributeNode > _attrib = 0,
215  Inst< SFFogCoordinate > _fogCoord = 0 );
216 
225  H3DUniquePtr< SFColorNode > color;
226 
232  H3DUniquePtr< SFCoordinateNode > coord;
233 
244  H3DUniquePtr< SFNormalNode > normal;
245 
252  H3DUniquePtr< SFTextureCoordinateNode > texCoord;
253 
271  H3DUniquePtr< SFBool > ccw;
272 
280  H3DUniquePtr< SFBool > colorPerVertex;
281 
289  H3DUniquePtr< SFBool > normalPerVertex;
290 
302  H3DUniquePtr< SFBool > solid;
303 
311  H3DUniquePtr< MFVertexAttributeNode > attrib;
312 
319  H3DUniquePtr< SFFogCoordinate > fogCoord;
320 
323  };
324 }
325 
326 #endif
Contains the DependentSFNode and DependentMFNode template classes.
Header file for FogCoordinate.
Header file for TextureCoordinateGenerator, X3D scene-graph node.
Header file for X3DColorNode, X3D scene-graph node.
Header file for X3DCoordinateNode, X3D scene-graph node.
Header file for X3DGeometryNode, X3D scene-graph node.
Header file for X3DNormalNode, X3D scene-graph node.
Header file for X3DVertexAttributeNode.
DependentMFNode are modified TypedMFNode fields where the field dirty status is dependent on fields i...
Definition: DependentNodeFields.h:336
DependentSFNode are modified TypedSFNode fields where the field dirty status is dependent on fields i...
Definition: DependentNodeFields.h:294
Class used for specifying a field member of a node in a DependentSFNode or DependentMFNode specificat...
Definition: DependentNodeFields.h:48
The Field class.
Definition: Field.h:46
This node defines a set of explicit fog depths on a per-vertex basis.
Definition: FogCoordinate.h:65
This is the base node type for color specifications in X3D.
Definition: X3DColorNode.h:44
Display list is extended in order to set front sidedness of triangles outside the display list.
Definition: X3DComposedGeometryNode.h:155
The MFVertexAttributeNode is dependent on the propertyChanged field of the contained X3DVertexAttribu...
Definition: X3DComposedGeometryNode.h:134
This is the base node type for all composed 3D geometry in X3D.
Definition: X3DComposedGeometryNode.h:93
H3DUniquePtr< SFCoordinateNode > coord
An X3DCoordinate node with the coordinates to use.
Definition: X3DComposedGeometryNode.h:232
H3DUniquePtr< SFFogCoordinate > fogCoord
If the fogCoord field is not empty, it shall contain a list of per-vertex depth values for calculatin...
Definition: X3DComposedGeometryNode.h:319
H3DUniquePtr< SFBool > colorPerVertex
If TRUE the colors in the color field is applied per vertex, otherwise it is applied per face.
Definition: X3DComposedGeometryNode.h:280
DependentSFNode< X3DNormalNode, FieldRef< X3DGeometricPropertyNode, Field, &X3DNormalNode::propertyChanged > > SFNormalNode
The SFNormalNode is dependent on the propertyChanged field of the contained X3DNormalNode.
Definition: X3DComposedGeometryNode.h:117
H3DUniquePtr< SFBool > ccw
The ccw field defines the ordering of the vertex coordinates of the geometry with respect to user-giv...
Definition: X3DComposedGeometryNode.h:271
H3DUniquePtr< SFNormalNode > normal
Contains an X3DNormalNode which normals are applied to the X3DComposedGeometryNode.
Definition: X3DComposedGeometryNode.h:244
H3DUniquePtr< MFVertexAttributeNode > attrib
If the attrib field is not empty it shall contain a list of X3DVertexAttributeNode instances with per...
Definition: X3DComposedGeometryNode.h:311
DependentSFNode< X3DCoordinateNode, FieldRef< X3DGeometricPropertyNode, Field, &X3DCoordinateNode::propertyChanged > > SFCoordinateNode
The SFCoordinateNode is dependent on the propertyChanged field of the contained X3DCoordinateNode.
Definition: X3DComposedGeometryNode.h:109
H3DUniquePtr< SFColorNode > color
Contains an X3DColorNode whose colors are applied to the X3DComposedGeometryNode.
Definition: X3DComposedGeometryNode.h:225
H3DUniquePtr< SFTextureCoordinateNode > texCoord
Contains an X3DTextureCoordinateNode which texture coordinates are applied to the X3DComposedGeometry...
Definition: X3DComposedGeometryNode.h:252
DependentSFNode< X3DColorNode, FieldRef< X3DGeometricPropertyNode, Field, &X3DColorNode::propertyChanged > > SFColorNode
The SFColorNode is dependent on the propertyChanged field of the contained X3DColorNode.
Definition: X3DComposedGeometryNode.h:101
DependentSFNode< X3DTextureCoordinateNode, FieldRef< X3DGeometricPropertyNode, Field, &X3DTextureCoordinateNode::propertyChanged > > SFTextureCoordinateNode
The SFTextureCoordinteNode is dependent on the propertyChanged field of the contained X3DTextureCoord...
Definition: X3DComposedGeometryNode.h:126
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DComposedGeometryNode.h:322
H3DUniquePtr< SFBool > normalPerVertex
If TRUE the normals in the normal field is applied per vertex, otherwise it is applied per face.
Definition: X3DComposedGeometryNode.h:289
DependentSFNode< FogCoordinate, FieldRef< X3DGeometricPropertyNode, Field, &FogCoordinate::propertyChanged > > SFFogCoordinate
The SFFogCoordinate is dependent on the propertyChanged.
Definition: X3DComposedGeometryNode.h:145
H3DUniquePtr< SFBool > solid
The solid field determines whether one or both sides of each polygon shall be displayed.
Definition: X3DComposedGeometryNode.h:302
This is the base node type for all coordinate node types in X3D.
Definition: X3DCoordinateNode.h:47
This is the base node type for all geometric property node types defined in X3D.
Definition: X3DGeometricPropertyNode.h:43
H3DUniquePtr< Field > propertyChanged
Field that indicated whether the properties have changed.
Definition: X3DGeometricPropertyNode.h:53
Display list is extended in order to set front sidedness of triangles outside the display list.
Definition: X3DGeometryNode.h:76
This is the base node type for all geometry in X3D.
Definition: X3DGeometryNode.h:61
This is the base node type for all normal node types in X3D.
Definition: X3DNormalNode.h:45
This abstract node type is the base type for all node types which specify texture coordinates.
Definition: X3DTextureCoordinateNode.h:55
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