openEmbroider  0.1
an open source embroidery software
OE_base Class Referenceabstract
Inheritance diagram for OE_base:
OE_curve OE_stitchs OE_joincurve OE_pointcurve OE_subcurve OE_birailstitch OE_linestitch OE_linkstitch

Public Member Functions

 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...
 
virtual void getBound (float *xMin, float *yMin, float *xMax, float *yMax)=0
 calculate the object bounding box More...
 
virtual bool check ()=0
 check if the object is valid.
 
virtual void refresh ()=0
 
 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...
 
virtual void getBound (float *xMin, float *yMin, float *xMax, float *yMax)=0
 calculate the object bounding box More...
 
virtual bool check ()=0
 check if the object is valid.
 
virtual void refresh ()=0
 

Static Protected Member Functions

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

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
 

Constructor & Destructor Documentation

OE_base::OE_base ( )

Default constructor

OE_base::~OE_base ( )
virtual

Default destructor

OE_base::OE_base ( )

Default constructor

virtual OE_base::~OE_base ( )
virtual

Default destructor

Member Function Documentation

void OE_base::addDependency ( OE_base object)

add and remove dependency from the list

Parameters
object-> the dependency object
void OE_base::addDependency ( OE_base object)

add and remove dependency from the list

Parameters
object-> the dependency object
virtual void OE_base::delDependency ( OE_base object)
inlinevirtual

the function called by a reference object when he's deleted

Parameters
object-> the reference object

Reimplemented in OE_linestitch, OE_birailstitch, OE_subcurve, OE_linkstitch, and OE_joincurve.

virtual void OE_base::delDependency ( OE_base object)
inlinevirtual

the function called by a reference object when he's deleted

Parameters
object-> the reference object

Reimplemented in OE_linestitch, OE_birailstitch, OE_subcurve, OE_linkstitch, and OE_joincurve.

virtual void OE_base::getBound ( float *  xMin,
float *  yMin,
float *  xMax,
float *  yMax 
)
pure virtual

calculate the object bounding box

Parameters
xMin,yMin,xMax,yMax-> pointers to the bouding box variables to set

Implemented in OE_stitchs, and OE_curve.

virtual void OE_base::getBound ( float *  xMin,
float *  yMin,
float *  xMax,
float *  yMax 
)
pure virtual

calculate the object bounding box

Parameters
xMin,yMin,xMax,yMax-> pointers to the bouding box variables to set

Implemented in OE_stitchs, and OE_curve.

bool OE_base::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
static bool OE_base::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

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