Defines 2D Bezier curve. More...
#include <cadex/ModelData_BezierCurve2d.hxx>
Public Types | |
typedef cadex::internal::ModelData_BezierCurve2dImpl | ImplType |
Public Member Functions | |
ModelData_BezierCurve2d () | |
Constructor. | |
ModelData_BezierCurve2d (const ModelData_Point2d thePoles[], int theNumberOfPoles) | |
Constructor. | |
ModelData_BezierCurve2d (const ModelData_Point2d thePoles[], const double thePoleWeights[], int theNumberOfPoles) | |
Constructor. | |
ModelData_BezierCurve2d (const Handle_C &) | |
Constructor. | |
int | Degree () const |
Returns degree. | |
int | NumberOfPoles () const |
Returns number of poles. | |
ModelData_Point2d | Pole (const int theIndex) const |
Returns a pole value. | |
int | Poles (ModelData_Point2d thePoles[]) const |
Populates a vector of poles. | |
double | Weight (const int theIndex) const |
Returns a weight value. | |
int | Weights (double theWeights[]) const |
Populates a vector of weights. | |
![]() | |
ModelData_Curve2d () | |
Constructor. | |
ModelData_Curve2d (const ModelData_Curve2d &theOther) | |
Constructor. | |
ModelData_Curve2d (ModelData_Curve2d &&theOther) | |
Constructor. | |
~ModelData_Curve2d () | |
Destructor. | |
ModelData_Curve2d & | operator= (const ModelData_Curve2d &theOther) |
Assignment operator. | |
ModelData_Curve2d & | operator= (ModelData_Curve2d &&theOther) |
Move assignment operator. | |
ModelData_CurveType | Type () const |
Returns a curve type. | |
bool | IsNull () const |
Returns true if the object has not been initialized yet. | |
void | Nullify () |
Resets the object. | |
operator bool () const | |
Returns if the object has been initialized. | |
bool | IsPeriodic () const |
Returns true if the curve is periodic. | |
double | UMin () const |
Returns a minimum parameter of a definition domain. | |
double | UMax () const |
Returns a maximum parameter of a definition domain. | |
void | Domain (double &theUMin, double &theUMax) const |
Returns a definition domain. | |
ModelData_Point2d | Value (double theParameter) const |
Evaluates a point on the curve. | |
ModelData_Curve2d | Reversed () const |
Returns a curve with reversed orientation. | |
void | Transform (const ModelData_Transformation2d &theTransformation) |
Applies transformation matrix to this object. | |
ModelData_Curve2d | Transformed (const ModelData_Transformation2d &theTransformation) const |
Returns a copy this object after applying transformation. | |
ModelData_Continuity | Continuity () const |
Returns a continuity type of the curve. | |
void | D0 (double theParameter, ModelData_Point2d &theValue) const |
Returns the point theValue of parameter theParam. | |
void | D1 (double theParameter, ModelData_Point2d &theValue, ModelData_Vector2d &theD1) const |
Returns the point theValue of parameter theParam and the first derivative theD1. | |
void | D2 (double theParameter, ModelData_Point2d &theValue, ModelData_Vector2d &theD1, ModelData_Vector2d &theD2) const |
Returns the point theValue of parameter theParam and second derivatives theD1 and theD2. | |
bool | DN (double theParameter, size_t theDerivativeOrder, ModelData_Point2d &theValue, ModelData_Vector2d theD[]) const |
double | Curvature (double theParameter) const |
Returns the curvature value of parameter theParam. | |
void | Normal (double theParameter, ModelData_Direction2d &theNormal) const |
Returns the normal direction theNormal of parameter theParam. | |
Public Attributes | |
operator Handle_C const | |
![]() | |
operator Handle_C const | |
Defines 2D Bezier curve.
For detailed description refer to 3D counterpart ModelData_BezierCurve.
|
inline |
Constructor.
Empty constructor.
cadex::ModelData_BezierCurve2d::ModelData_BezierCurve2d | ( | const ModelData_Point2d | thePoles[], |
int | theNumberOfPoles | ||
) |
Constructor.
Creates a polynomial Bezier curve.
theNumberOfPoles defines the length of thePoles and must belong to [2, 26]. Created curve has a degree equal to theNumberOfPoles - 1.
cadex::ModelData_BezierCurve2d::ModelData_BezierCurve2d | ( | const ModelData_Point2d | thePoles[], |
const double | thePoleWeights[], | ||
int | theNumberOfPoles | ||
) |
Constructor.
Creates a rational Bezier curve.
theNumberOfPoles defines the length of thePoles and thePoleWeights and must belong to [2, 26]. Created curve has a degree equal to theNumberOfPoles - 1.
Poles are to be provided after division by their weights.
int cadex::ModelData_BezierCurve2d::Degree | ( | ) | const |
Returns degree.
Returns the value equal to NumberOfPoles() - 1.
int cadex::ModelData_BezierCurve2d::NumberOfPoles | ( | ) | const |
Returns number of poles.
Returns the value specified in the constructor.
ModelData_Point2d cadex::ModelData_BezierCurve2d::Pole | ( | const int | theIndex | ) | const |
int cadex::ModelData_BezierCurve2d::Poles | ( | ModelData_Point2d | thePoles[] | ) | const |
Populates a vector of poles.
thePoles must point to a buffer in memory with at least NumberOfPoles() preallocated values.
Returns NumberOfPoles().
double cadex::ModelData_BezierCurve2d::Weight | ( | const int | theIndex | ) | const |
Returns a weight value.
theIndex must be in the range [1, NumberOfPoles()].
For polynomial Bezier behavior is undefined.
int cadex::ModelData_BezierCurve2d::Weights | ( | double | theWeights[] | ) | const |
Populates a vector of weights.
theWeights must point to a buffer in memory with at least NumberOfPoles() preallocated values.
Returns NumberOfPoles().
For polynomial Bezier does nothing and returns 0.