|
|
Representation of a line as a Border. Inherits the astract class BorderBase a line is defined by a begin and an endpoint.
enum LinePoint {BeginPoint , EndPoint } | LinePoint |
to prevent making two functions for begin and endpoint, we introduce a enumerator that makes the difference between the two
K2dBorderLine ()
| K2dBorderLine |
construct an empty Line
K2dBorderLine (const BorderPoint& , const BorderPoint&)
| K2dBorderLine |
construct a line by giving the Begin and the end point.
~K2dBorderLine ()
| ~K2dBorderLine |
[virtual]
void draw (QPainter*,bool meshed = false )
| draw |
[virtual]
draw on a painter the line
Reimplemented from K2dBorderBase.
BorderPoint* lastPoint ()
| lastPoint |
[const virtual]
Implementation of first and lastpoint of base class
Reimplemented from K2dBorderBase.
void changePoint ( BorderPoint& , LinePoint = BeginPoint)
| changePoint |
Change the line by giving another point for begin or end. Last parameter is the LinePoint. If not given BeginPoint is taken
bool onBorder (const double &co1, const double &co2, bool meshed)
| onBorder |
[const virtual]
see if a certain given point is on the border Remark : since we work with double, we take the defined TOPONUMEPS as allowed difference to be equal
Reimplemented from K2dBorderBase.
void minCo (uint coordIndex, double &valueMin)
| minCo |
[const virtual]
we want to be able to retrieve the min and maximum values of border coordIndex is the index, eg 0 for the first, 1 for the second; and value is the present min or max the function changes this if necessary.
Reimplemented from K2dBorderBase.
void maxCo (uint coordIndex, double &valueMax)
| maxCo |
[const virtual]
Reimplemented from K2dBorderBase.
double triaSize (LinePoint = BeginPoint)
| triaSize |
Return trianglesize in begin or endpoint, is default initialized on construction by 1, so 1 is returned if never set before
void changeTriaSize (double size, LinePoint = BeginPoint)
| changeTriaSize |
Change the trianglesize in begin or endpoint
BorderType type ()
| type |
[virtual]
return the type of the Border (something like the name)
Reimplemented from K2dBorderBase.
void printBorder (QTextStream &)
| printBorder |
[virtual]
Implementation of base class printborder
Reimplemented from K2dBorderBase.
friend QTextStream & operator<< ( QTextStream &, const K2dBorderLine & )
| operator<< |
write a line to the ouputstream in a nice text format