openEmbroider  0.1
an open source embroidery software
OE_pointcurve Class Reference
Inheritance diagram for OE_pointcurve:
OE_curve OE_base

Public Member Functions

 OE_pointcurve ()
 
 OE_pointcurve (std::vector< vector_2d > points, bool closed)
 
virtual ~OE_pointcurve ()
 
bool getPoint (uint16_t nb, float *x, float *y)
 to get a point in the curve.
 
bool getPoint (uint16_t nb, vector_2d *pt)
 
bool setPoint (uint16_t nb, float x, float y)
 to set a point in the curve.
 
bool addPoint (float x, float y)
 to add a point at the end of the curve.
 
bool addPoint (vector_2d pt)
 
void lineTo (float x, float y)
 to add a linear segment at the end of the curve.
 
void lineTo (vector_2d pt)
 
void cubicBezTo (float cpx1, float cpy1, float cpx2, float cpy2, float x, float y)
 
virtual void refresh ()
 refresh the pts array.
 
- Public Member Functions inherited from OE_curve
 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_2dsubCurve (float start, float end, bool rev)
 return a segment of the original curve More...
 
std::vector< vector_2ddiscretizeFast (float maxDist)
 discretise a curve using a level of detail approach More...
 
std::vector< vector_2ddiscretizeRegular (float dist)
 discretise a curve using uniform segment lengths More...
 
void reverse ()
 reverse the curve.
 
virtual bool check ()
 check if the curve is valid.
 
bool refresh (float dpi)
 refresh the discPts array.
 
- Public Member Functions inherited from OE_base
 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)
 
virtual void delDependency (OE_base *object)
 the function called by a reference object when he's deleted More...
 
 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)
 
virtual void delDependency (OE_base *object)
 the function called by a reference object when he's deleted More...
 

Additional Inherited Members

- Public Attributes inherited from OE_curve
bool controls = false
 is displaying controls.
 
std::vector< vector_2ddiscPts
 the curve array of discretized points
 
std::vector< vector_2dpts
 the bezier curve array of points
 
- Protected Member Functions inherited from OE_curve
std::vector< vector_2ddiscretizeCubicBez (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_2dinterPoint (vector_2d pt1, vector_2d pt2, vector_2d pt3, vector_2d pt4, float t)
 return a segment of the original curve More...
 
- Static Protected Member Functions inherited from OE_curve
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 Protected Member Functions inherited from OE_base
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...
 
- Protected Attributes inherited from OE_curve
bool closed = false
 Flag indicating if shapes should be treated as closed.
 
- Protected Attributes inherited from OE_base
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 Protected Attributes inherited from OE_curve
static unsigned char lineColor [4] = {0,160,192,255}
 Tight bounding box of the shape [minx,miny,maxx,maxy]. More...
 

Constructor & Destructor Documentation

OE_pointcurve::OE_pointcurve ( )

Default constructor

OE_pointcurve::~OE_pointcurve ( )
virtual

Default destructor


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