X3DComposedGeometryNode.h

Go to the documentation of this file.
00001 
00002 //    Copyright 2004, SenseGraphics AB
00003 //
00004 //    This file is part of H3D API.
00005 //
00006 //    H3D API is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    H3D API is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with H3D API; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 //
00020 //    A commercial license is also available. Please contact us at 
00021 //    www.sensegraphics.com for more information.
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

Generated on Thu Aug 24 12:38:35 2006 for H3D API by  doxygen 1.4.5