Changeset 50:1dce8c94505d in rrlib_geometry


Ignore:
Timestamp:
25.06.2013 14:56:49 (6 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Message:

Added some missing const qualifiers

Location:
curves
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • curves/tBSplineCurve.h

    r49 r50  
    2424 * \author  Patrick Fleischmann 
    2525 * 
    26  * \date    Apr 18, 2012 
     26 * \date    2012-04-18 
    2727 * 
    2828 * \brief 
     
    3434 */ 
    3535//---------------------------------------------------------------------- 
    36 #ifndef TBSPLINECURVE_H_ 
    37 #define TBSPLINECURVE_H_ 
     36#ifndef __rrlib__geometry__curves__tBSplineCurve_h__ 
     37#define __rrlib__geometry__curves__tBSplineCurve_h__ 
    3838 
    3939//---------------------------------------------------------------------- 
     
    146146  std::vector<typename tShape::tPoint> InsertKnot(int at, const std::vector<double> &knots_before_insertion, double knot, const std::vector<typename tShape::tPoint> &control_points) const; 
    147147 
    148   virtual unsigned int GetSegmentForParameter(typename tSplineCurve::tParameter t); 
    149   virtual typename tSplineCurve::tParameter GetLocalParameter(typename tSplineCurve::tParameter t); 
     148  virtual unsigned int GetSegmentForParameter(typename tSplineCurve::tParameter t) const; 
     149  virtual typename tSplineCurve::tParameter GetLocalParameter(typename tSplineCurve::tParameter t) const; 
    150150 
    151151  /*! 
  • curves/tBSplineCurve.hpp

    r49 r50  
    2424 * \author  Patrick Fleischmann 
    2525 * 
    26  * \date    Apr 18, 2012 
     26 * \date    2012-04-18 
    2727 * 
    2828 */ 
     
    220220//---------------------------------------------------------------------- 
    221221template <size_t Tdimension, typename TElement, unsigned int Tdegree> 
    222 unsigned int tBSplineCurve<Tdimension, TElement, Tdegree>::GetSegmentForParameter(typename tSplineCurve::tParameter t) 
     222unsigned int tBSplineCurve<Tdimension, TElement, Tdegree>::GetSegmentForParameter(typename tSplineCurve::tParameter t) const 
    223223{ 
    224224  assert((this->knots.front() <= t) && (t <= this->knots.back())); 
     
    232232//---------------------------------------------------------------------- 
    233233template <size_t Tdimension, typename TElement, unsigned int Tdegree> 
    234 typename tSplineCurve<Tdimension, TElement, Tdegree>::tParameter tBSplineCurve<Tdimension, TElement, Tdegree>::GetLocalParameter(typename tSplineCurve::tParameter t) 
     234typename tSplineCurve<Tdimension, TElement, Tdegree>::tParameter tBSplineCurve<Tdimension, TElement, Tdegree>::GetLocalParameter(typename tSplineCurve::tParameter t) const 
    235235{ 
    236236  unsigned int start = this->GetSegmentForParameter(t); 
  • curves/tCardinalSplineCurve.h

    r48 r50  
    101101  double tension; 
    102102 
    103   virtual unsigned int GetSegmentForParameter(typename tSplineCurve::tParameter t); 
    104   virtual typename tSplineCurve::tParameter GetLocalParameter(typename tSplineCurve::tParameter t); 
     103  virtual unsigned int GetSegmentForParameter(typename tSplineCurve::tParameter t) const; 
     104  virtual typename tSplineCurve::tParameter GetLocalParameter(typename tSplineCurve::tParameter t) const; 
    105105 
    106106}; 
  • curves/tCardinalSplineCurve.hpp

    r48 r50  
    9191//---------------------------------------------------------------------- 
    9292template <size_t Tdimension, typename TElement> 
    93 unsigned int tCardinalSplineCurve<Tdimension, TElement>::GetSegmentForParameter(typename tSplineCurve::tParameter t) 
     93unsigned int tCardinalSplineCurve<Tdimension, TElement>::GetSegmentForParameter(typename tSplineCurve::tParameter t) const 
    9494{ 
    9595  assert((0 <= t) && (t <= this->NumberOfSegments())); 
     
    101101//---------------------------------------------------------------------- 
    102102template <size_t Tdimension, typename TElement> 
    103 typename tSplineCurve<Tdimension, TElement, 3>::tParameter tCardinalSplineCurve<Tdimension, TElement>::GetLocalParameter(typename tSplineCurve::tParameter t) 
     103typename tSplineCurve<Tdimension, TElement, 3>::tParameter tCardinalSplineCurve<Tdimension, TElement>::GetLocalParameter(typename tSplineCurve::tParameter t) const 
    104104{ 
    105105  assert((0 <= t) && (t <= this->NumberOfSegments())); 
  • curves/tSplineCurve.h

    r49 r50  
    173173  virtual void UpdateCenterOfGravity(typename tShape::tPoint &center_of_gravity) const; 
    174174 
    175   virtual unsigned int GetSegmentForParameter(tParameter t) = 0; 
    176   virtual tParameter GetLocalParameter(tParameter t) = 0; 
     175  virtual unsigned int GetSegmentForParameter(tParameter t) const = 0; 
     176  virtual tParameter GetLocalParameter(tParameter t) const = 0; 
    177177  virtual std::shared_ptr<const tBezierCurve> CreateBezierCurveForSegment(unsigned int i) const = 0; 
    178178 
  • curves/tUniformBSplineCurve.h

    r29 r50  
    9797  double tension; 
    9898 
    99   virtual unsigned int GetSegmentForParameter(typename tSplineCurve::tParameter t); 
    100   virtual typename tSplineCurve::tParameter GetLocalParameter(typename tSplineCurve::tParameter t); 
     99  virtual unsigned int GetSegmentForParameter(typename tSplineCurve::tParameter t) const; 
     100  virtual typename tSplineCurve::tParameter GetLocalParameter(typename tSplineCurve::tParameter t) const; 
    101101  virtual std::shared_ptr<const typename tSplineCurve::tBezierCurve> CreateBezierCurveForSegment(unsigned int i) const; 
    102102 
  • curves/tUniformBSplineCurve.hpp

    r29 r50  
    8686//---------------------------------------------------------------------- 
    8787template <size_t Tdimension, typename TElement> 
    88 unsigned int tUniformBSplineCurve<Tdimension, TElement>::GetSegmentForParameter(typename tSplineCurve::tParameter t) 
     88unsigned int tUniformBSplineCurve<Tdimension, TElement>::GetSegmentForParameter(typename tSplineCurve::tParameter t) const 
    8989{ 
    9090  assert((0 <= t) && (t <= this->NumberOfSegments())); 
     
    9696//---------------------------------------------------------------------- 
    9797template <size_t Tdimension, typename TElement> 
    98 typename tSplineCurve<Tdimension, TElement, 3>::tParameter tUniformBSplineCurve<Tdimension, TElement>::GetLocalParameter(typename tSplineCurve::tParameter t) 
     98typename tSplineCurve<Tdimension, TElement, 3>::tParameter tUniformBSplineCurve<Tdimension, TElement>::GetLocalParameter(typename tSplineCurve::tParameter t) const 
    9999{ 
    100100  assert((0 <= t) && (t <= this->NumberOfSegments())); 
Note: See TracChangeset for help on using the changeset viewer.