UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
UBspl3Curve1d Class Reference

#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< U3dSimpleBspl3Curvem_bspls
 
U3dBspl3AbstractMatrixm_bm
 
std::vector< double > m_ps
 
bool m_is_ready
 

Detailed Description

1D third order base spline curve object constructed from base spline matrix. Natural curve parameter p=[0..1].

Constructor & Destructor Documentation

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 UBspl3Curve1d::~UBspl3Curve1d ( )
virtual

Destruct object

Member Function Documentation

virtual void UBspl3Curve1d::addNode ( double  x,
int  id = -1 
)
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.

void UBspl3Curve1d::clear ( )
protected

Clear internal data

void UBspl3Curve1d::construct_segment ( int  id,
int  n,
int  bpnum,
U3dSimpleBspl3Curve curve 
)
protected

Construct simple curve segment for provided id, n - number of initial points, bpnum - number of border points.

static void UBspl3Curve1d::find_element ( double  p,
int  n,
int &  nn,
double &  pp 
)
static

Find proper base spline curve element

static int UBspl3Curve1d::get_bp_num ( U3dBspl3MatrixType  type)
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.

bool UBspl3Curve1d::ready ( ) const
inline

Did approximation made.

virtual bool UBspl3Curve1d::removeNode ( int  id)
virtual

Remove control point with index id. Return true if id is correct otherwise return false

static void UBspl3Curve1d::update_index ( int &  i,
int  m,
int  bm 
)
inlinestatic

Update index of one corrdinate direction border expanding

Member Data Documentation

U3dBspl3AbstractMatrix* UBspl3Curve1d::m_bm
protected

Base spline matrix

std::vector<U3dSimpleBspl3Curve> UBspl3Curve1d::m_bspls
protected

Array of simple base spline curves for all directions

bool UBspl3Curve1d::m_is_ready
protected

Flag of approximation was (was not) made is true(false)

std::vector<double> UBspl3Curve1d::m_ps
protected

Spline control points


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