rem: static void createSCP( const vector<osg::Vec3f> &spine, bool *_spineClosed, bool *_pureRotation, vector<osg::Matrix> &SCP )
add: static void createSCP(const std::vector<Vec3f>  &spine, bool           *pSpineClosed, bool           *pPureRotation, std::vector<Matrix> &SCP          )
context: static void createSCP( const vector<osg::Vec3f> &spine,                       bool *_spineClosed,                       bool *_pureRotation,                       vector<osg::Matrix> &SCP ){  /* This function makes quite heavy use of the .length() function   */  /* For epsilon checks the 1-Norm or Inf.-Norm would probably suffice. */    osg::Vec3f yUnit(0.0 ,1.0, 0.0);  osg::Vec3f zUnit(0.0 ,0.0, 1.0);    UInt32 sp_len = spine.size();  bool spineClosed = false;  bool yFound = false;  bool zFound = false;    *_pureRotation = false;  SCP.resize(sp_len);    if ((spine[0] - spine[spine.size() - 1]).length() < EPS)    {      spineClosed = true;      *_spineClosed = true;    }  else    {      spineClosed = false;      *_spineClosed = false;    }              /* determine the SCPBaseTransformation for the first crosssection */  if(spineClosed)    {      SCP[0][1].setValue(spine[1] - spine[sp_len - 2]);            if(SCP[0][1].length() > EPS) /* translation */        {          osg::Vec3f tmp1 = spine[1] - spine[0];          osg::Vec3f tmp2 = spine[sp_len - 2] - spine[sp_len - 1];          yFound = true;                    SCP[0][2].setValue(tmp1.cross(tmp2));          if(SCP[0][2].length() > EPS)            zFound = true;        }    }  else /* spine is open */    {      SCP[0][1].setValue(spine[1] - spine[0]);      if(SCP[0][1].length() > EPS)        {          yFound = true;        }    }  for(UInt32 i = 1; i < sp_len - 1; i++)    {      // jbher      SCP[i][1].setValue(spine[i + 1] - spine[i - 1]);      if(SCP[i][1].length() > EPS) /* y_Axis defined */        {          /* If this is the first defined y-Axis we have to */          /* set up the previous ones exactly like this one */          if(!yFound)            {              yFound = true;              for(UInt32 j = 0; j < i; j++)                SCP[j][1] = SCP[i][1];            }                    SCP[i][2].setValue((spine[i + 1] - spine[i]).cross(spine[i - 1] - spine[i]));                    if(SCP[i][2].length() > EPS)             {              if(!zFound)                {                  zFound = true;                  for(UInt32 j = 0; j < i; j++)                    SCP[j][2] = SCP[i][2];                }            }          else /* z_Axis is not defined, take the last one */            if(zFound)              {                SCP[i][2] = SCP[i-1][2];              }        }      else        {          if(yFound)            {              SCP[i][1] = SCP[i-1][1];            }         }    }  /* SCPBaseTransformation of the last crosssection */  if(spineClosed)    {      /* no translation during last step */      if(SCP[0][1].length() < EPS)        {          if(yFound)            {              SCP[sp_len - 1][1] = SCP[sp_len - 2][1];            }          else            {              /* for a surface of revolution we can't define */              /* a basis transformation, so we don't make one */              SCP[0][1].setValue(yUnit);              SCP[0][2].setValue(zUnit);                            /* One transformation for all spinepoints */              SCP.resize(1);                          }        }      else /* translation during last step */        {          SCP[sp_len - 1][1] = SCP[0][1];        }      if(SCP[0][2].length() < EPS)        {          if(zFound)            {              SCP[sp_len - 1][2] = SCP[sp_len - 2][2];            }          else /* In this case the whole spine is collinear */            {              if(yFound)                {                  Quaternion quat;                  Vec3f v(SCP[0][1]);                  quat.setValue(yUnit, v);                  quat.getValue(SCP[0]);                  SCP.resize(1);                      }              else                {                  /* for a surface of revolution we can't define */                  /* a basis transformation */                  SCP[0][1].setValue(yUnit);                  SCP[0][2].setValue(zUnit);                                /* One transformation for all spinepoints */                  SCP.resize(1);                  *_pureRotation = true;                }            }        }    }  else /* spine is open */    {      SCP[sp_len - 1][1].setValue(spine[sp_len - 1] - spine[sp_len - 2]);      /* no translation during last step */      if(SCP[sp_len - 1][1].length() < EPS)        {          if(yFound)            {              SCP[sp_len - 1][1] = SCP[sp_len - 2][1];            }        }      if(zFound)        {          SCP[sp_len - 1][2] = SCP[sp_len - 2][2];        }      else /* In this case the whole spine is collinear */        {          Quaternion quat;          Vec3f v(SCP[0][1]);          quat.setValue(yUnit, v);          quat.getValue(SCP[0]);          /* One transformation for all spinepoints */          SCP.resize(1);              }    }  for(UInt32 i = 0; i < SCP.size(); i++)    {      if(i > 0)        {          if(SCP[i][2].dot(SCP[i-1][2]) < 0)            SCP[2].negate();        }            SCP[i][0] = SCP[i][1].cross(SCP[i][2]);            SCP[i][0].normalize();      SCP[i][1].normalize();      SCP[i][2].normalize();    }}