Changeset 30:9ae11f8090aa in rrlib_geometry


Ignore:
Timestamp:
23.04.2012 16:21:51 (8 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Fixed interface

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • curves/tSplineCurve.h

    r29 r30  
    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 position, 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 r30  
    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 position, const typename tShape::tPoint &point) 
     104{ 
     105  assert(position < this->control_points.size()); 
     106  this->control_points.insert(this->control_points.begin() + position, point); 
    106107  this->SetChanged(); 
    107108  this->bezier_curve_cache.emplace_back(); 
  • tShape.h

    r18 r30  
    105105protected: 
    106106 
    107   inline void SetChanged() 
    108   { 
    109     this->changed = true; 
    110   } 
     107  virtual void SetChanged(); 
    111108 
    112109//---------------------------------------------------------------------- 
  • tShape.hpp

    r25 r30  
    118118 
    119119//---------------------------------------------------------------------- 
     120// tShape SetChanged 
     121//---------------------------------------------------------------------- 
     122template <size_t Tdimension, typename TElement> 
     123void tShape<Tdimension, TElement>::SetChanged() 
     124{ 
     125  this->changed = true; 
     126} 
     127 
     128//---------------------------------------------------------------------- 
    120129// tShape ResetMetaInformation 
    121130//---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.