00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00027
00029 #ifndef __X3DCOMPOSEDGEOMETRYNODE_H__
00030 #define __X3DCOMPOSEDGEOMETRYNODE_H__
00031
00032 #include "X3DGeometryNode.h"
00033 #include "X3DCoordinateNode.h"
00034 #include "TextureCoordinateGenerator.h"
00035 #include "X3DColorNode.h"
00036 #include "X3DNormalNode.h"
00037 #include "X3DVertexAttributeNode.h"
00038 #include "DependentNodeFields.h"
00039
00040 namespace H3D {
00041
00088 class H3DAPI_API X3DComposedGeometryNode : public X3DGeometryNode {
00089 public:
00092 typedef DependentSFNode< X3DColorNode,
00093 FieldRef< X3DGeometricPropertyNode,
00094 Field,
00095 &X3DColorNode::propertyChanged > >
00096 SFColorNode;
00097
00100 typedef DependentSFNode< X3DCoordinateNode,
00101 FieldRef< X3DGeometricPropertyNode,
00102 Field,
00103 &X3DCoordinateNode::propertyChanged > >
00104 SFCoordinateNode;
00105
00108 typedef DependentSFNode< X3DNormalNode,
00109 FieldRef< X3DGeometricPropertyNode,
00110 Field,
00111 &X3DNormalNode::propertyChanged > >
00112 SFNormalNode;
00113
00116 typedef DependentSFNode<
00117 X3DTextureCoordinateNode,
00118 FieldRef< X3DGeometricPropertyNode,
00119 Field,
00120 &X3DTextureCoordinateNode::propertyChanged > >
00121 SFTextureCoordinateNode;
00122
00125 typedef DependentMFNode<
00126 X3DVertexAttributeNode,
00127 FieldRef< X3DGeometricPropertyNode,
00128 Field,
00129 &X3DVertexAttributeNode::propertyChanged > >
00130 MFVertexAttributeNode;
00131
00140 class H3DAPI_API DisplayList: public X3DGeometryNode::DisplayList {
00141 public:
00143 virtual void callList( bool build_list = true );
00144 };
00145
00152 virtual void startTexGen( TextureCoordinateGenerator *tex_coord_gen );
00153
00155 virtual void stopTexGen( TextureCoordinateGenerator *tex_coord_gen );
00156
00161 virtual void renderTexCoord( int index, X3DTextureCoordinateNode *tc );
00162
00166 virtual void renderTexCoordArray( X3DTextureCoordinateNode *tc );
00167
00169 virtual void disableTexCoordArray( X3DTextureCoordinateNode *tc );
00170
00172 X3DComposedGeometryNode( Inst< SFNode > _metadata = 0,
00173 Inst< SFBound > _bound = 0,
00174 Inst< DisplayList > _displayList = 0,
00175 Inst< SFColorNode > _color = 0,
00176 Inst< SFCoordinateNode > _coord = 0,
00177 Inst< SFNormalNode > _normal = 0,
00178 Inst< SFTextureCoordinateNode > _texCoord = 0,
00179 Inst< SFBool > _ccw = 0,
00180 Inst< SFBool > _colorPerVertex = 0,
00181 Inst< SFBool > _normalPerVertex = 0,
00182 Inst< SFBool > _solid = 0,
00183 Inst< MFVertexAttributeNode > _attrib = 0 );
00184
00193 auto_ptr< SFColorNode > color;
00194
00200 auto_ptr< SFCoordinateNode > coord;
00201
00212 auto_ptr< SFNormalNode > normal;
00213
00220 auto_ptr< SFTextureCoordinateNode > texCoord;
00221
00239 auto_ptr< SFBool > ccw;
00240
00248 auto_ptr< SFBool > colorPerVertex;
00249
00257 auto_ptr< SFBool > normalPerVertex;
00258
00270 auto_ptr< SFBool > solid;
00271
00279 auto_ptr< MFVertexAttributeNode > attrib;
00280
00282 static H3DNodeDatabase database;
00283 };
00284 }
00285
00286 #endif