1#ifndef Nurbs_h_ 2#define Nurbs_h_ 3 4#include "Path.h" 5#include <vector> 6 7namespace Paths 8{ 9 10//. The Nurbs class. It implements a nurbs curve 11//. for the given order. It is a very powerful 12//. and flexible curve representation. For simpler 13//. cases you may prefer to use a Bezier_ curve. 14template <size_t Order> 15class Nurbs : public Path 16{ 17public: 18 //. Create a new Nurbs curve. 19 Nurbs(); 20 //. Inserts a control point with the given weight. 21 //. The knot value determines the position in the sequence. 22 //. 23 //. :Parameters: 24 //. - 'knot': the parameter value at which to insert a new knot 25 //. - 'vertex': the control point 26 //. - 'weight': the weight of the control point 27 void insert_control_point(double knot, const Vertex &vertex, 28 double weight); 29 virtual void draw(); 30private: 31 //. The data... 32 std::vector<Vertex> controls_; 33 std::vector<double> weights_; 34 std::vector<double> knots_; 35}; 36 37} 38 39#endif