![]() |
OpenWalnut
1.5.0dev
|
A B-spline. More...
#include <WBSpline.h>
Collaboration diagram for WBSpline:Public Member Functions | |
| WBSpline (int order, std::vector< WVector3d > deBoorPoints) | |
| Constructor for the spline that takes the order and de Boor points while constructing a normalized knotVector automatically. More... | |
| WBSpline (int order, std::vector< WVector3d > deBoorPoints, std::vector< double > knots) | |
| Constructor for the spline that takes the order de Boor points and knots as arguments. More... | |
| ~WBSpline () | |
| Empty destructor. More... | |
| std::vector< WVector3d > | getDeBoorPoints () |
| Returns the stored de Boor points. More... | |
| std::vector< double > | getKnots () |
| Returns the stored knots. More... | |
| int | getOrder () |
| Returns the order of the spline. More... | |
| void | setDeBoorPoints (std::vector< WVector3d > deBoorPoints) |
| Sets new de Boor points for the spline. More... | |
| void | setKnots (std::vector< double > knots) |
| Sets new knots for the spline. More... | |
| void | setOrder (int order) |
| Sets a new order for the spline. More... | |
| void | samplePoints (std::vector< WVector3d > *p, double resolution) |
| Compute sample points on the spline for a given resolution. More... | |
| WVector3d | f (double t) |
| Compute a single sample point on the spline for the given parameter. More... | |
Private Member Functions | |
| double | getAlpha_i_j (int _i, int _j) |
| Compute the alpha of the de Boor algorithm for the given parameters. More... | |
| WVector3d | controlPoint_i_j (int _i, int _j) |
| Compute a control point of the de Boor algorithm for the given parameters. More... | |
Private Attributes | |
| int | m_order |
| The order of the spline. More... | |
| std::vector< WVector3d > | m_deBoorPoints |
| The de Boor points of the spline. More... | |
| std::vector< double > | m_knots |
| The knots of the spline. More... | |
| double | m_t |
| The parameter value of the last spline evaluation i.e. the last call to f(). More... | |
A B-spline.
Definition at line 36 of file WBSpline.h.
| WBSpline::WBSpline | ( | int | order, |
| std::vector< WVector3d > | deBoorPoints | ||
| ) |
Constructor for the spline that takes the order and de Boor points while constructing a normalized knotVector automatically.
| order | Order of the spline. |
| deBoorPoints | The de Boor points for the spline |
Definition at line 29 of file WBSpline.cpp.
References m_deBoorPoints, m_knots, and m_order.
| WBSpline::WBSpline | ( | int | order, |
| std::vector< WVector3d > | deBoorPoints, | ||
| std::vector< double > | knots | ||
| ) |
Constructor for the spline that takes the order de Boor points and knots as arguments.
| order | Order of the spline. |
| deBoorPoints | The de Boor points for the spline |
| knots | The knots for the spline |
Definition at line 56 of file WBSpline.cpp.
References m_deBoorPoints, m_knots, and m_order.
| WBSpline::~WBSpline | ( | ) |
Empty destructor.
Definition at line 63 of file WBSpline.cpp.
|
private |
Compute a control point of the de Boor algorithm for the given parameters.
| _i | First recursion parameter. |
| _j | Second recursion parameter. |
Definition at line 162 of file WBSpline.cpp.
References getAlpha_i_j(), and m_deBoorPoints.
Referenced by f().
Here is the call graph for this function:
Here is the caller graph for this function:| WVector3d WBSpline::f | ( | double | t | ) |
Compute a single sample point on the spline for the given parameter.
| t | parameter on spline curve. |
Definition at line 67 of file WBSpline.cpp.
References controlPoint_i_j(), m_knots, m_order, and m_t.
Referenced by WBSplineSurface::f(), and samplePoints().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Compute the alpha of the de Boor algorithm for the given parameters.
| _i | First recursion parameter. |
| _j | Second recursion parameter. |
Definition at line 156 of file WBSpline.cpp.
References m_knots, m_order, and m_t.
Referenced by controlPoint_i_j().
Here is the caller graph for this function:| std::vector< WVector3d > WBSpline::getDeBoorPoints | ( | ) |
Returns the stored de Boor points.
Definition at line 111 of file WBSpline.cpp.
References m_deBoorPoints.
| std::vector< double > WBSpline::getKnots | ( | ) |
Returns the stored knots.
Definition at line 116 of file WBSpline.cpp.
References m_knots.
| int WBSpline::getOrder | ( | ) |
Returns the order of the spline.
Definition at line 121 of file WBSpline.cpp.
References m_order.
| void WBSpline::samplePoints | ( | std::vector< WVector3d > * | p, |
| double | resolution | ||
| ) |
Compute sample points on the spline for a given resolution.
The sample points are stored in the vector given by the first argument.
| p | The pointer for returning the sample points. |
| resolution | The resolution of the sample points. |
Definition at line 141 of file WBSpline.cpp.
Here is the call graph for this function:| void WBSpline::setDeBoorPoints | ( | std::vector< WVector3d > | deBoorPoints | ) |
Sets new de Boor points for the spline.
| deBoorPoints | The new de Boor points for the spline. |
Definition at line 126 of file WBSpline.cpp.
References m_deBoorPoints.
| void WBSpline::setKnots | ( | std::vector< double > | knots | ) |
Sets new knots for the spline.
| knots | The new knots for the spline. |
Definition at line 131 of file WBSpline.cpp.
References m_knots.
| void WBSpline::setOrder | ( | int | order | ) |
Sets a new order for the spline.
| order | The new order of the spline. |
Definition at line 136 of file WBSpline.cpp.
References m_order.
|
private |
The de Boor points of the spline.
Definition at line 112 of file WBSpline.h.
Referenced by controlPoint_i_j(), getDeBoorPoints(), setDeBoorPoints(), and WBSpline().
|
private |
The knots of the spline.
Definition at line 113 of file WBSpline.h.
Referenced by f(), getAlpha_i_j(), getKnots(), samplePoints(), setKnots(), and WBSpline().
|
private |
The order of the spline.
Definition at line 111 of file WBSpline.h.
Referenced by f(), getAlpha_i_j(), getOrder(), setOrder(), and WBSpline().
|
private |
The parameter value of the last spline evaluation i.e. the last call to f().
Definition at line 114 of file WBSpline.h.
Referenced by f(), and getAlpha_i_j().