Easy3D 2.5.3
CatmullRom< Point_t > Class Template Reference

Class for CatmullRom curve interpolation. Works for both 2D and 3D. Example: More...

#include <easy3d/core/curve.h>

Inheritance diagram for CatmullRom< Point_t >:
Curve< Point_t >

Public Types

typedef Point_t::FT FT
 The floating-point number type.
 
- Public Types inherited from Curve< Point_t >
typedef Point_t::FT FT
 The floating-point number type.
 

Public Member Functions

 CatmullRom ()=default
 Default constructor.
 
- Public Member Functions inherited from Curve< Point_t >
 Curve ()
 Default constructor.
 
void set_steps (int steps)
 Set the number of steps.
 
void add_way_point (const Point_t &point)
 Add a way point.
 
int node_count () const
 Return the number of nodes.
 
const Point_t & node (int i) const
 Return the coordinates of the i_th node.
 
FT length_from_start_point (int i) const
 Return the total curve length from the start point.
 
FT total_length () const
 Return the total length of the curve.
 
void clear ()
 Clear all cached values.
 

Detailed Description

template<typename Point_t>
class easy3d::CatmullRom< Point_t >

Class for CatmullRom curve interpolation. Works for both 2D and 3D. Example:

auto cv = new easy3d::curve::CatmullRom<vec3>;
curve->set_steps(num);
for (const auto& p : points)
cv->add_way_point(p);
for (int i = 0; i < cv->node_count(); ++i)
std::cout << cv->node(i) << std::endl;

The documentation for this class was generated from the following file: