Changed the interface of the interpolating function of a segment (2D and 3D) from the ambiguous P(float) to Lerp(float). Note that with the previous interface it could happen that seg.P(1) != seg.P0() just becouse seg.P(1) was the result of a lerp.
This commit is contained in:
parent
c8ef412821
commit
3bdf666e86
|
@ -85,7 +85,7 @@ public:
|
|||
{ _p0=a; _p1=b;}
|
||||
/// calculates the point of parameter t on the segment.
|
||||
/// if t is in [0..1] returned point is inside the segment
|
||||
inline PointType P( const ScalarType t ) const
|
||||
inline PointType Lerp( const ScalarType t ) const
|
||||
{ return _p0 + (_p1 - _p0) * t; }
|
||||
/// return the middle point
|
||||
inline PointType MidPoint( ) const
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
{ _p0=a; _p1=b;}
|
||||
/// calculates the point of parameter t on the segment.
|
||||
/// if t is in [0..1] returned point is inside the segment
|
||||
inline PointType P( const ScalarType t ) const
|
||||
inline PointType Lerp( const ScalarType t ) const
|
||||
{ return _p0 + (_p1 - _p0) * t; }
|
||||
/// return the middle point
|
||||
inline PointType MidPoint( ) const
|
||||
|
|
Loading…
Reference in New Issue