#include <rs_spline.h>
Inheritance diagram for RS_Spline:

Public Member Functions | |
| RS_Spline (RS_EntityContainer *parent, const RS_SplineData &d) | |
| Constructor. | |
| virtual RS_Entity * | clone () |
| virtual | ~RS_Spline () |
| Destructor. | |
| virtual RS2::EntityType | rtti () const |
| virtual bool | isEdge () const |
| RS_SplineData | getData () const |
| void | setDegree (int deg) |
| Sets the splines degree (1-3). | |
| int | getDegree () |
| int | getNumberOfKnots () |
| int | getNumberOfControlPoints () |
| bool | isClosed () |
| void | setClosed (bool c) |
| Sets the closed falg of this spline. | |
| virtual RS_VectorSolutions | getRefPoints () |
| Must be overwritten to get all reference points of the entity. | |
| virtual RS_Vector | getNearestRef (const RS_Vector &coord, double *dist=NULL) |
| Must be overwritten to get the nearest reference point for this entity. | |
| virtual RS_Vector | getNearestSelectedRef (const RS_Vector &coord, double *dist=NULL) |
| Gets the nearest reference point of this entity if it is selected. | |
| void | update () |
| Sets the endpoint. | |
| virtual RS_Vector | getNearestEndpoint (const RS_Vector &coord, double *dist=NULL) |
| virtual RS_Vector | getNearestCenter (const RS_Vector &coord, double *dist=NULL) |
| Must be overwritten to get the (nearest) center point to the given coordinate for this entity. | |
| virtual RS_Vector | getNearestMiddle (const RS_Vector &coord, double *dist=NULL) |
| Must be overwritten to get the (nearest) middle point to the given coordinate for this entity. | |
| virtual RS_Vector | getNearestDist (double distance, const RS_Vector &coord, double *dist=NULL) |
| Must be overwritten to get the nearest point with a given distance to the endpoint to the given coordinate for this entity. | |
| virtual void | addControlPoint (const RS_Vector &v) |
| Appends the given point to the control points. | |
| virtual void | removeLastControlPoint () |
| Removes the control point that was last added. | |
| virtual void | move (const RS_Vector &offset) |
| Implementations must move the entity by the given vector. | |
| virtual void | rotate (const RS_Vector ¢er, double angle) |
| Implementations must rotate the entity by the given angle around the given center. | |
| virtual void | scale (const RS_Vector ¢er, const RS_Vector &factor) |
| Implementations must scale the entity by the given factors. | |
| virtual void | mirror (const RS_Vector &axisPoint1, const RS_Vector &axisPoint2) |
| Implementations must mirror the entity by the given axis. | |
| virtual void | moveRef (const RS_Vector &ref, const RS_Vector &offset) |
| Implementations must drag the reference point(s) of all (sub-)entities that are very close to ref by offset. | |
| virtual void | draw (RS_Painter *painter, RS_GraphicView *view, double patternOffset=0.0) |
| Implementations must draw the entity on the given device. | |
| RS_ValueList< RS_Vector > | getControlPoints () |
| virtual void | calculateBorders () |
| Recalculates the borders of this entity container. | |
Static Public Member Functions | |
| static void | rbasis (int c, double t, int npts, int x[], double h[], double r[]) |
| Generates rational B-spline basis functions for an open knot vector. | |
| static void | knot (int num, int order, int knotVector[]) |
| Generates B-Spline open knot vector with multiplicity equal to the order at the ends. | |
| static void | rbspline (int npts, int k, int p1, double b[], double h[], double p[]) |
| Generates a rational B-spline curve using a uniform open knot vector. | |
| static void | knotu (int num, int order, int knotVector[]) |
| static void | rbsplinu (int npts, int k, int p1, double b[], double h[], double p[]) |
Protected Attributes | |
| RS_SplineData | data |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const RS_Spline &l) |
| Dumps the spline's data to stdout. | |
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Must be overwritten to get the (nearest) center point to the given coordinate for this entity.
Reimplemented from RS_EntityContainer. |
|
||||||||||||||||
|
Must be overwritten to get the nearest point with a given distance to the endpoint to the given coordinate for this entity.
Reimplemented from RS_EntityContainer. |
|
||||||||||||
|
Reimplemented from RS_EntityContainer. |
|
||||||||||||
|
Must be overwritten to get the (nearest) middle point to the given coordinate for this entity.
Reimplemented from RS_EntityContainer. |
|
||||||||||||
|
Must be overwritten to get the nearest reference point for this entity.
Reimplemented from RS_EntityContainer. |
|
||||||||||||
|
Gets the nearest reference point of this entity if it is selected. Containers re-implement this method to return the nearest reference point of a selected sub entity.
Reimplemented from RS_EntityContainer. |
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from RS_Entity. |
|
|
Reimplemented from RS_EntityContainer. |
|
|
Sets the endpoint. Called when the spline or it's data, position, .. changes. Reimplemented from RS_EntityContainer. |
1.4.4