|
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...
|
|
|
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
|
|
|
static unsigned char | lineColor [4] = {0,160,192,255} |
| Tight bounding box of the shape [minx,miny,maxx,maxy]. More...
|
|
discretise a curve segment to display or treating it
- Parameters
-
pt1 | to pt4 -> the bezier points of the curve segment |
the | maximum distance beetween a discretised point and the real curve |
a | value that represent the deep of the discretisation (level of subdivision) |
- Returns
- return an array of point, the segment discretised
std::vector< vector_2d > OE_curve::discretizeFast |
( |
float |
maxDist | ) |
|
discretise a curve using a level of detail approach
- Parameters
-
maxDist | is a maximum error distance beetween the discretised curve and the real one |
- Returns
- return an array of point, the curve discretised
std::vector< vector_2d > OE_curve::discretizeRegular |
( |
float |
dist | ) |
|
discretise a curve using uniform segment lengths
- Parameters
-
dist | is the length of a segment along the curve |
- Returns
- return an array of point, the curve discretised
calculate the distance beetween a point and a segment
- Parameters
-
pt | -> the point to test |
seg1 | and seg2 -> the extremity of the segment |
- Returns
- return the distance
double OE_curve::evalBezier |
( |
double |
t, |
|
|
double |
p0, |
|
|
double |
p1, |
|
|
double |
p2, |
|
|
double |
p3 |
|
) |
| |
|
staticprotected |
get the position of a 1D point on a bezier segment
- Parameters
-
t | -> the value of the position along the segment |
p0 | to p3 -> the 1D points values |
- Returns
- return the position of the 1D point
void OE_curve::getBound |
( |
float * |
xMin, |
|
|
float * |
yMin, |
|
|
float * |
xMax, |
|
|
float * |
yMax |
|
) |
| |
|
virtual |
calculate the curve bounding box
- Parameters
-
xMin,yMin,xMax,yMax | -> pointers to the bouding box variables to set |
Implements OE_base.
return a segment of the original curve
- Parameters
-
pt1 | to pt4 -> the bezier points of the curve segment |
t | -> the position of the point along the segments |
- Returns
- return an array of 3 point (handle,point,handle)
bool OE_curve::ptInBounds |
( |
vector_2d |
pt, |
|
|
float * |
bounds |
|
) |
| |
|
staticprotected |
check if a point is in a given bounding box
- Parameters
-
pt | -> the point |
bounds | -> an array representing the bounding box |
- Returns
- true if the point is inside the bounding box
void OE_curve::segmentBounds |
( |
float * |
bounds, |
|
|
vector_2d * |
segment |
|
) |
| |
|
staticprotected |
calculate a segment bounding box
- Parameters
-
bounds | -> a pointer to a bounding box array (float[4]) |
curve | -> the curve to be estimated |
std::vector< vector_2d > OE_curve::subCurve |
( |
float |
start, |
|
|
float |
end, |
|
|
bool |
rev |
|
) |
| |
return a segment of the original curve
- Parameters
-
start,end | -> the position of the start and end point of the curve segment integral value is the segment number and float value the position on this segment (ex:2.3 mean pos 0.3 on segment 2) |
rev | invert the path |
- Returns
- return an array of point, the curve segment
unsigned char OE_curve::lineColor = {0,160,192,255} |
|
staticprotected |
Tight bounding box of the shape [minx,miny,maxx,maxy].
color of the curve
The documentation for this class was generated from the following files:
- /home/seb/projets/brodeuse/openembroider/include/curves/OE_curve.h
- /home/seb/projets/brodeuse/openembroider/src/curves/OE_curve.cpp