Changeset 62:98bb003e6f95 in rrlib_geometry


Ignore:
Timestamp:
30.10.2013 17:20:43 (6 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Parents:
58:8df64ba93b4c (diff), 60:a22756932ab5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merged default

Location:
curves
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • curves/tBezierCurve.hpp

    r56 r62  
    55// Copyright (C) Finroc GbR (finroc.org) 
    66// 
    7 // This program is free software; you can redistribute it and/or 
    8 // modify it under the terms of the GNU General Public License 
    9 // as published by the Free Software Foundation; either version 2 
    10 // of the License, or (at your option) any later version. 
     7// This program is free software; you can redistribute it and/or modify 
     8// it under the terms of the GNU General Public License as published by 
     9// the Free Software Foundation; either version 2 of the License, or 
     10// (at your option) any later version. 
    1111// 
    1212// This program is distributed in the hope that it will be useful, 
     
    1515// GNU General Public License for more details. 
    1616// 
    17 // You should have received a copy of the GNU General Public License 
    18 // along with this program; if not, write to the Free Software 
    19 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
     17// You should have received a copy of the GNU General Public License along 
     18// with this program; if not, write to the Free Software Foundation, Inc., 
     19// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
    2020// 
    2121//---------------------------------------------------------------------- 
     
    452452#ifdef _LIB_RRLIB_SERIALIZATION_PRESENT_ 
    453453 
    454 template < size_t Tdimension, typename TElement, unsigned int Tdegree> 
     454template <size_t Tdimension, typename TElement, unsigned int Tdegree> 
    455455serialization::tOutputStream &operator << (serialization::tOutputStream &stream, const tBezierCurve<Tdimension, TElement, Tdegree> &curve) 
    456456{ 
     
    462462} 
    463463 
    464 template < size_t Tdimension, typename TElement, unsigned int Tdegree> 
     464template <size_t Tdimension, typename TElement, unsigned int Tdegree> 
    465465serialization::tInputStream &operator >> (serialization::tInputStream &stream, tBezierCurve<Tdimension, TElement, Tdegree> &curve) 
    466466{ 
  • curves/tBezierCurve.hpp

    r60 r62  
    9393  static_assert(sizeof...(rest) + 1 == Tdegree, "A Bezier curve must have degree + 1 control points"); 
    9494  size_t index = 0; 
    95   util::ProcessVariadicValues<typename tShape::tPoint>([this, index](const typename tShape::tPoint & x) mutable { this->control_points[index++] = x; }, p1, p2, rest...); 
     95  util::ProcessVariadicValues([this, &index](const typename tShape::tPoint & x) 
     96  { 
     97    this->control_points[index++] = x; 
     98  }, 
     99  p1, p2, rest...); 
    96100} 
    97101 
  • curves/tSplineCurve.hpp

    r56 r62  
    55// Copyright (C) Finroc GbR (finroc.org) 
    66// 
    7 // This program is free software; you can redistribute it and/or 
    8 // modify it under the terms of the GNU General Public License 
    9 // as published by the Free Software Foundation; either version 2 
    10 // of the License, or (at your option) any later version. 
     7// This program is free software; you can redistribute it and/or modify 
     8// it under the terms of the GNU General Public License as published by 
     9// the Free Software Foundation; either version 2 of the License, or 
     10// (at your option) any later version. 
    1111// 
    1212// This program is distributed in the hope that it will be useful, 
     
    1515// GNU General Public License for more details. 
    1616// 
    17 // You should have received a copy of the GNU General Public License 
    18 // along with this program; if not, write to the Free Software 
    19 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
     17// You should have received a copy of the GNU General Public License along 
     18// with this program; if not, write to the Free Software Foundation, Inc., 
     19// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
    2020// 
    2121//---------------------------------------------------------------------- 
     
    310310  for (typename std::vector<typename tShape::tPoint>::iterator it = this->control_points.begin(); it != this->control_points.end(); ++it) 
    311311  { 
    312     *it = rotation * *it; 
     312    *it = rotation **it; 
    313313  } 
    314314  this->SetChanged(); 
  • curves/tSplineCurve.hpp

    r60 r62  
    8989  static_assert(Tdegree > 0, "The degree of spline curves must be greater than zero"); 
    9090  static_assert(sizeof...(rest) + 2 > Tdegree, "A spline curve needs at least degree + 1 control points"); 
    91   util::ProcessVariadicValues<typename tShape::tPoint>([this](const typename tShape::tPoint & x) mutable { this->control_points.push_back(x); }, p1, p2, rest...); 
     91  util::ProcessVariadicValues([this](const typename tShape::tPoint & x) 
     92  { 
     93    this->control_points.push_back(x); 
     94  }, 
     95  p1, p2, rest...); 
    9296} 
    9397 
Note: See TracChangeset for help on using the changeset viewer.