IndexedLineSet.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 __INDEXEDLINESET_H__
00030 #define __INDEXEDLINESET_H__
00031 
00032 #include "X3DGeometryNode.h"
00033 #include "DependentNodeFields.h"
00034 #include "X3DCoordinateNode.h"
00035 #include "X3DColorNode.h"
00036 #include "CoordBoundField.h"
00037 #include "IndexedLineSet.h"
00038 #include "MFInt32.h"
00039 
00040 namespace H3D {
00041 
00106   class H3DAPI_API IndexedLineSet : public X3DGeometryNode {
00107   public:
00110     H3D_VALUE_EXCEPTION( int, InvalidColorIndex );
00111 
00114     H3D_VALUE_EXCEPTION( int, InvalidColorIndexSize );
00115 
00118     typedef DependentSFNode< X3DCoordinateNode,
00119                              FieldRef< X3DGeometricPropertyNode,
00120                                        Field,
00121                                        &X3DCoordinateNode::propertyChanged > > 
00122     SFCoordinateNode;
00123 
00126     typedef DependentSFNode< X3DColorNode,
00127                              FieldRef< X3DGeometricPropertyNode,
00128                                        Field,
00129                                        &X3DColorNode::propertyChanged > > 
00130     SFColorNode;
00131     
00133     IndexedLineSet( Inst< SFNode           > _metadata       = 0,
00134                     Inst< CoordBoundField  > _bound          = 0,
00135                     Inst< DisplayList      > _displayList    = 0,
00136                     Inst< MFInt32          > _set_colorIndex = 0,
00137                     Inst< MFInt32          > _set_coordIndex = 0,
00138                     Inst< SFColorNode      > _color          = 0,
00139                     Inst< SFCoordinateNode > _coord          = 0,
00140                     Inst< MFInt32          > _colorIndex     = 0,
00141                     Inst< SFBool           > _colorPerVertex = 0,
00142                     Inst< MFInt32          > _coordIndex     = 0 );
00143 
00144 #ifdef USE_HAPTICS
00147     virtual void traverseSG( TraverseInfo &ti ); 
00148 #endif
00149 
00151     virtual void render();
00152 
00157     auto_ptr< MFInt32 >  set_colorIndex;
00158 
00163     auto_ptr< MFInt32 >  set_coordIndex;
00164 
00174     auto_ptr< SFColorNode >  color;
00175 
00181     auto_ptr< SFCoordinateNode >  coord;
00182 
00191     auto_ptr< MFInt32 >  colorIndex;
00192 
00200     auto_ptr< SFBool  >  colorPerVertex;
00201 
00210     auto_ptr< MFInt32 >  coordIndex;
00211 
00213     static H3DNodeDatabase database;
00214   };
00215 }
00216 
00217 #endif

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