rem: static void generateHull( const vector<osg::Vec2f> &crossSection, const vector<osg::Quaternion> &orientation, const vector<osg::Vec2f> &scale, const vector<osg::Vec3f> &spine, bool ccw, bool buildNormal, bool buildTexCoord, UInt32 numOfSubdivision, bool *_uWrap, bool *_vWrap, UInt32 *_uValues, UInt32 *_vValues, vector<osg::Pnt3f> &vertices, vector<osg::Vec3f> &normals, vector<osg::Vec2f> &texCoords )
add: static void generateHull(const std::vector<Vec2f     > & crossSection, const std::vector<Quaternion> & orientation, const std::vector<Vec2f     > & scale, const std::vector<Vec3f     > & spine, bool                 ccw, bool                 buildNormal, bool                 buildTexCoord, UInt32               numOfSubdivision, bool               *_uWrap, bool               *_vWrap, UInt32             *_uValues, UInt32             *_vValues, std::vector<Pnt3f     > & vertices, std::vector<Vec3f     > & normals, std::vector<Vec2f     > & texCoords       )
context: static void generateHull( const vector<osg::Vec2f> &crossSection,                          const vector<osg::Quaternion> &orientation,                          const vector<osg::Vec2f> &scale,                          const vector<osg::Vec3f> &spine,                          bool ccw,                          bool buildNormal,                          bool buildTexCoord,                          UInt32 numOfSubdivision,                          bool *_uWrap,                          bool *_vWrap,                          UInt32 *_uValues,                          UInt32 *_vValues,                          vector<osg::Pnt3f> &vertices,                          vector<osg::Vec3f> &normals,                          vector<osg::Vec2f> &texCoords ){  /* Note : The terminology concerning the parametrization of the hull */  /* surface differs from the spec                                     */  /* u parametrizes the hull surface along the spine                   */  /* v parametrizes the hull surface along the crosssection            */  grid ext_grid;  initGrid(&ext_grid);  bool uWrap = false;  bool vWrap = false;  UInt32 uValues = 0;  UInt32 vValues = 0;      UInt32 sp_len = spine.size();  UInt32 cs_len = crossSection.size();  FDEBUG(("calculating hull vertices\n"));    /*setup vertex data in vertices */  calcHullVertices(crossSection, orientation, scale, spine,                   &uWrap, &vWrap, vertices);  /* calculate total length of crossSection and spine */  uValues = (uWrap)  ? sp_len - 1 : sp_len;  vValues = (vWrap)  ? cs_len - 1 : cs_len;    FDEBUG(("connecting point data to subdivision grid:\n"));  FDEBUG(("considering spineClosed and uWrap the same!\n"));    setGridTopology(&ext_grid, POINTS, uValues, vValues, 3, uWrap, vWrap);  connectSubfieldToGrid((Real32 *) &vertices[0], POINTS, &ext_grid);    if(buildNormal)    {       FDEBUG( ("calculating normals\n"));      calcHullNormals(crossSection, orientation, scale, spine, vertices,                      ccw, uWrap, vWrap, uValues, vValues, normals);            FDEBUG(("connecting normal data to subdivision grid:\n\n"));      setGridTopology(&ext_grid, NORMALS, uValues, vValues,                       3, uWrap, vWrap);      connectSubfieldToGrid((Real32*) &normals[0], NORMALS, &ext_grid);    }    if(buildTexCoord)    {      FDEBUG(("calculating hull texture coordinates\n"));      texCoords.resize(sp_len*cs_len);      calcTextureCoords(&ext_grid, (Real32*) &texCoords[0]);            /* register the texture coordinates */      setGridTopology(&ext_grid, TEXTURE, sp_len, cs_len, 2, false, false);      connectSubfieldToGrid((Real32*) &texCoords[0], TEXTURE, &ext_grid);    }   /* This prevents us from segfaulting */  if((numOfSubdivision > 0) && (uValues > 2) && (vValues > 2))    {      FDEBUG(("subdividing %i times\n", numOfSubdivision));      subdivSurface(numOfSubdivision, &ext_grid);            /* This is _VERY_ ugly and subject to change in the next future*/      convertSubdivisionGrid(&ext_grid, &uValues, &vValues,                             vertices, normals, texCoords);    }  *_uWrap = uWrap;  *_vWrap = vWrap;  *_uValues = uValues;  *_vValues = vValues;}