Changeset 37:3c5f9c26db92 in rrlib_geometry


Ignore:
Timestamp:
23.04.2012 13:52:46 (8 years ago)
Author:
Patrick Fleischmann <fleischmann@…>
Branch:
default
Phase:
public
Message:

B-spline curves of arbitrary degree added

Location:
curves
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • curves/tSplineCurve.h

    r29 r37  
    117117  void AppendControlPoint(const typename tShape::tPoint &point); 
    118118 
    119   void InsertControlPoint(typename std::vector<typename tShape::tPoint>::iterator position, const typename tShape::tPoint &point); 
     119  void InsertControlPoint(size_t at, const typename tShape::tPoint &point); 
    120120 
    121121  const typename tShape::tPoint operator()(tParameter t) const; 
     
    149149protected: 
    150150 
    151   void SetChanged(); 
     151  virtual void SetChanged(); 
    152152 
    153153//---------------------------------------------------------------------- 
  • curves/tSplineCurve.hpp

    r29 r37  
    101101//---------------------------------------------------------------------- 
    102102template <size_t Tdimension, typename TElement, unsigned int Tdegree> 
    103 void tSplineCurve<Tdimension, TElement, Tdegree>::InsertControlPoint(typename std::vector<typename tShape::tPoint>::iterator position, const typename tShape::tPoint &point) 
    104 { 
    105   this->control_points.insert(position, point); 
     103void tSplineCurve<Tdimension, TElement, Tdegree>::InsertControlPoint(size_t at, const typename tShape::tPoint &point) 
     104{ 
     105  this->control_points.insert(this->control_points.begin() + at, point); 
    106106  this->SetChanged(); 
    107107  this->bezier_curve_cache.emplace_back(); 
Note: See TracChangeset for help on using the changeset viewer.