UNIVERS
15.3
UNIVERS base processing software API
|
#include <u_bspl3_curve1d.hpp>
Public Member Functions | |
UBspl3Curve1d () | |
UBspl3Curve1d (const U3dBspl3AbstractMatrix &bm) | |
UBspl3Curve1d (const U3dBspl3AbstractMatrix &bm, const std::vector< double > &ps) | |
UBspl3Curve1d (const UBspl3Curve1d &obj) | |
virtual | ~UBspl3Curve1d () |
void | approximate (const U3dBspl3AbstractMatrix &bm, const std::vector< double > &ps) |
void | approximate (const std::vector< double > &ps) |
double | operator() (double p) const |
double | getFirstDerivative (double p) const |
double | getSecondDerivative (double p) const |
bool | ready () const |
U3dBspl3MatrixType | getBMType () const |
virtual void | addNode (double x, int id=-1) |
virtual bool | removeNode (int id) |
void | info () const |
Static Public Member Functions | |
static void | update_index (int &i, int m, int bm) |
static int | get_bp_num (U3dBspl3MatrixType type) |
static void | find_element (double p, int n, int &nn, double &pp) |
Protected Member Functions | |
void | clear () |
void | construct_segment (int id, int n, int bpnum, U3dSimpleBspl3Curve &curve) |
Protected Attributes | |
std::vector< U3dSimpleBspl3Curve > | m_bspls |
U3dBspl3AbstractMatrix * | m_bm |
std::vector< double > | m_ps |
bool | m_is_ready |
1D third order base spline curve object constructed from base spline matrix. Natural curve parameter p=[0..1].
UBspl3Curve1d::UBspl3Curve1d | ( | ) |
Default constructor for not ready empty object.
UBspl3Curve1d::UBspl3Curve1d | ( | const U3dBspl3AbstractMatrix & | bm | ) |
Generates empty object which will not be ready. Base matrix for type of curve to be constructed is provided.
UBspl3Curve1d::UBspl3Curve1d | ( | const U3dBspl3AbstractMatrix & | bm, |
const std::vector< double > & | ps | ||
) |
Constructor with base matrix and points provided. Number of points should be >= 2 for ready object construction.
UBspl3Curve1d::UBspl3Curve1d | ( | const UBspl3Curve1d & | obj | ) |
Copy constructor
|
virtual |
Destruct object
|
virtual |
Add new point to the current spline curve at index = id. If id < 0 or out of range then add new last point.
void UBspl3Curve1d::approximate | ( | const U3dBspl3AbstractMatrix & | bm, |
const std::vector< double > & | ps | ||
) |
Approximate curve from provided points and defined base matrix. Old points and curve are deleting.
void UBspl3Curve1d::approximate | ( | const std::vector< double > & | ps | ) |
Approximate curve from provided points. Old points and curve are deleting.
|
protected |
Clear internal data
|
protected |
Construct simple curve segment for provided id, n - number of initial points, bpnum - number of border points.
|
static |
Find proper base spline curve element
|
static |
Get number of base spline border points from base matrix type
U3dBspl3MatrixType UBspl3Curve1d::getBMType | ( | ) | const |
Return spline base matrix type. If object is not ready return "Undefined".
double UBspl3Curve1d::getFirstDerivative | ( | double | p | ) | const |
Return first derivative from constructed spline.
double UBspl3Curve1d::getSecondDerivative | ( | double | p | ) | const |
Return second derivative from constructed spline.
void UBspl3Curve1d::info | ( | ) | const |
Print info about current object condition
double UBspl3Curve1d::operator() | ( | double | p | ) | const |
Return point from constructed spline for provided p.
|
inline |
Did approximation made.
|
virtual |
Remove control point with index id. Return true if id is correct otherwise return false
|
inlinestatic |
Update index of one corrdinate direction border expanding
|
protected |
Base spline matrix
|
protected |
Array of simple base spline curves for all directions
|
protected |
Flag of approximation was (was not) made is true(false)
|
protected |
Spline control points