Description

Functions

   
template< class val_t >  
val_t clamp(val_t lower, val_t value, val_t upper)
template< class vec_t , class val_t >  
vec_t linear(vec_t p0, vec_t p1, val_t t)
template< class vec_t , class val_t >  
vec_t quadraticBezier(vec_t p0, vec_t p1, vec_t p2, val_t t)
template< class vec_t , class val_t >  
vec_t cubicBezier(vec_t p0, vec_t p1, vec_t p2, vec_t p3, val_t t)

Documentation

function
Geometry::Interpolation::clamp

public
     
template< class val_t >    
val_t clamp( val_t lower,
  val_t value,
  val_t upper
)    

Clamp the value to the given range.

Parameters

lower
Lower end of range
value
Value to clamp
upper
Upper end of range

Parameters

:

Defined in Geometry/Interpolation.h:28


function
Geometry::Interpolation::linear

public
     
template< class vec_t , class val_t >    
vec_t linear( vec_t p0,
  vec_t p1,
  val_t t
)    

Interpolate linearly betweenp0andp1.

Parameters

p0
First end point
p1
Second end point
t
Interpolation parameter from [0, 1]

Returns

Interpolated point

Defined in Geometry/Interpolation.h:41


function
Geometry::Interpolation::quadraticBezier

public
     
template< class vec_t , class val_t >    
vec_t quadraticBezier( vec_t p0,
  vec_t p1,
  vec_t p2,
  val_t t
)    

Interpolate betweenp0,p1, andp2using a quadratic Bezier curve.

Parameters

p0
First end point
p1
Control point
p2
Second end point
t
Interpolation parameter from [0, 1]

Returns

Interpolated point

Defined in Geometry/Interpolation.h:57


function
Geometry::Interpolation::cubicBezier

public
     
template< class vec_t , class val_t >    
vec_t cubicBezier( vec_t p0,
  vec_t p1,
  vec_t p2,
  vec_t p3,
  val_t t
)    

Interpolate betweenp0,p1,p2, andp3using a cubic Bezier curve.

Parameters

p0
First end point
p1
First control point
p2
Second control point
p3
Second end point
t
Interpolation parameter from [0, 1]

Returns

Interpolated point

Defined in Geometry/Interpolation.h:75