openEmbroider
0.1
an open source embroidery software
|
Public Member Functions | |
OE_subcurve (OE_curve *curve, float curveStart, float curveEnd, bool reverse) | |
virtual | ~OE_subcurve () |
bool | setStart (float curveStart) |
bool | setEnd (float curveEnd) |
bool | check () |
check if the curve is valid. | |
virtual void | refresh () |
refresh the pts array. More... | |
void | delDependency (OE_base *object) |
the function called by a reference object when he's deleted More... | |
![]() | |
OE_curve () | |
virtual | ~OE_curve () |
int | getNpts () |
return the number of points in the curve (control points, without handles) | |
bool | getClosed () |
return true if the curve is set as closed. | |
float | getLength (float maxDist) |
return the length of the curve. | |
void | setClosed (bool closed) |
set the curve closed attribute. | |
virtual void | getBound (float *xMin, float *yMin, float *xMax, float *yMax) |
calculate the curve bounding box More... | |
std::vector< vector_2d > | subCurve (float start, float end, bool rev) |
return a segment of the original curve More... | |
std::vector< vector_2d > | discretizeFast (float maxDist) |
discretise a curve using a level of detail approach More... | |
std::vector< vector_2d > | discretizeRegular (float dist) |
discretise a curve using uniform segment lengths More... | |
void | reverse () |
reverse the curve. | |
bool | refresh (float dpi) |
refresh the discPts array. | |
![]() | |
OE_base () | |
virtual | ~OE_base () |
bool | getNeedRefresh () |
void | setNeedRefresh () |
void | addDependency (OE_base *object) |
add and remove dependency from the list More... | |
void | removeDependency (OE_base *object) |
OE_base () | |
virtual | ~OE_base () |
bool | getNeedRefresh () |
void | setNeedRefresh () |
void | addDependency (OE_base *object) |
add and remove dependency from the list More... | |
void | removeDependency (OE_base *object) |
Protected Attributes | |
OE_curve * | curve = nullptr |
float | start = -1 |
float | end = -1 |
bool | reverse = false |
![]() | |
bool | closed = false |
Flag indicating if shapes should be treated as closed. | |
![]() | |
std::list< OE_base * > | objects |
float | bounds [4] |
Tight bounding box of the object [minx,miny,maxx,maxy]. | |
bool | needRefresh = true |
flag to know who must be refreeshed | |
Additional Inherited Members | |
![]() | |
bool | controls = false |
is displaying controls. | |
std::vector< vector_2d > | discPts |
the curve array of discretized points | |
std::vector< vector_2d > | pts |
the bezier curve array of points | |
![]() | |
std::vector< vector_2d > | discretizeCubicBez (vector_2d pt1, vector_2d pt2, vector_2d pt3, vector_2d pt4, float tol, int level) |
discretise a curve segment to display or treating it More... | |
std::vector< vector_2d > | interPoint (vector_2d pt1, vector_2d pt2, vector_2d pt3, vector_2d pt4, float t) |
return a segment of the original curve More... | |
![]() | |
static float | distPtSeg (vector_2d pt, vector_2d seg1, vector_2d seg2) |
calculate the distance beetween a point and a segment More... | |
static bool | ptInBounds (vector_2d pt, float *bounds) |
check if a point is in a given bounding box More... | |
static double | evalBezier (double t, double p0, double p1, double p2, double p3) |
get the position of a 1D point on a bezier segment More... | |
static void | segmentBounds (float *bounds, vector_2d *segment) |
calculate a segment bounding box More... | |
![]() | |
static bool | ptInBounds (vector_2d pt, float *bounds) |
check if a point is in a given bounding box More... | |
static bool | ptInBounds (vector_2d pt, float *bounds) |
check if a point is in a given bounding box More... | |
![]() | |
static unsigned char | lineColor [4] = {0,160,192,255} |
Tight bounding box of the shape [minx,miny,maxx,maxy]. More... | |
OE_subcurve::OE_subcurve | ( | OE_curve * | curve, |
float | curveStart, | ||
float | curveEnd, | ||
bool | reverse | ||
) |
Default constructor
|
virtual |
Default destructor
|
virtual |
the function called by a reference object when he's deleted
object | -> the reference object |
Reimplemented from OE_base.
|
virtual |