Changeset 89:4bf089ff3edf in rrlib_geometry


Ignore:
Timestamp:
29.07.2019 13:28:57 (4 months ago)
Author:
Tobias Föhst <foehst@…>
Branch:
14.08
Phase:
public
Message:

Mapping global curve parameters on knot vector of B spline to get the same behavior as in the other spline curves

File:
1 edited

Legend:

Unmodified
Added
Removed
  • curves/tBSplineCurve.hpp

    r88 r89  
    219219unsigned int tBSplineCurve<Tdimension, TElement, Tdegree>::GetSegmentForParameter(typename tSplineCurve::tParameter t) const 
    220220{ 
     221  t /= this->NumberOfSegments() + this->knots.front() * (this->knots.back() - this->knots.front()); 
    221222  assert((this->knots.front() <= t) && (t <= this->knots.back())); 
    222223  assert(this->NumberOfSegments() > 0); 
     
    243244typename tSplineCurve<Tdimension, TElement, Tdegree>::tParameter tBSplineCurve<Tdimension, TElement, Tdegree>::GetLocalParameter(typename tSplineCurve::tParameter t) const 
    244245{ 
     246  t /= this->NumberOfSegments() + this->knots.front() * (this->knots.back() - this->knots.front()); 
    245247  assert((this->knots.front() <= t) && (t <= this->knots.back())); 
    246248  assert(this->NumberOfSegments() > 0); 
Note: See TracChangeset for help on using the changeset viewer.