|
wxArt2D
|
Arc Segment in a2dVertexList. More...
#include <polyver.h>


Public Member Functions | |
| a2dArcSegment (double x1=0, double y1=0, double x2=0, double y2=0) | |
| create arc segment More... | |
| a2dArcSegment (const a2dLineSegment &prev, double xc, double yc, double angle) | |
| create arc segment More... | |
| a2dArcSegment (const a2dLineSegment &prev, double xc, double yc, double x1, double y1, double x2, double y2) | |
| create arc segment More... | |
| a2dArcSegment (const a2dArcSegment &other) | |
| copy constructor | |
| ~a2dArcSegment () | |
| destructor | |
| virtual a2dLineSegment * | Clone () |
| create exact copy | |
| bool | CalcR (const a2dLineSegment &prev, double &radius, double ¢er_x, double ¢er_y, double &beginrad, double &midrad, double &endrad, double &phit) const |
| Calculation of center for the Arc. More... | |
| virtual double | Length (const a2dLineSegment &prev) |
| calculate length | |
| void | CalcMidPoint (const a2dLineSegment &prev, double center_x, double center_y, double radius, bool clockwise) |
| calculate new mid point bsed on prev segment radius and center. More... | |
| a2dPoint2D | GetMidPoint () const |
| get middle on arc segment between end and start | |
| void | SetMidPoint (const a2dLineSegment &prev, double xm, double ym) |
| set middle point of arc segment More... | |
| double | GetOx (const a2dLineSegment &prev) const |
| Get origin X of arc. | |
| double | GetOy (const a2dLineSegment &prev) const |
| Get origin Y of arc. | |
| a2dPoint2D | GetOrigin (const a2dLineSegment &prev) const |
| Get origin of arc. | |
| a2dBoundingBox | GetBbox (const a2dLineSegment &prev, const a2dAffineMatrix &lworld=a2dIDENTITY_MATRIX) const |
| Get bounding box of arc. | |
Public Member Functions inherited from a2dLineSegment | |
| a2dLineSegment (double x=0, double y=0) | |
| constructor More... | |
| a2dLineSegment (const a2dPoint2D &point) | |
| a2dLineSegment (const a2dLineSegment &other) | |
| bool | GetArc () const |
| int | GetPointCount () const |
| bool | GetBin () const |
| void | SetBin (bool bin) |
| a2dPoint2D | GetPoint () |
| void | SetPoint (a2dPoint2D pos) |
| void | SetSegType (a2dSegType type) |
| Set the type of the segment. | |
| a2dSegType | GetSegType () |
| get the type of the segment | |
| virtual a2dBoundingBox | GetBbox (const a2dLineSegment &prev, const a2dAffineMatrix &lworld=a2dIDENTITY_MATRIX) |
Public Attributes | |
| double | m_x2 |
| x2 x of arc midpoint | |
| double | m_y2 |
| y2 y of arc midpoint | |
Public Attributes inherited from a2dLineSegment | |
| double | m_x |
| x endpoint of line | |
| double | m_y |
| y endpoint of line | |
| bool | m_bin: 1 |
| Marker for walking over the segments. | |
| bool | m_arc: 1 |
| arc segment | |
| unsigned int | m_pntCnt: 2 |
| a2dSegType | m_segtype: 3 |
| type of segment | |
Arc Segment in a2dVertexList.
Create an circular Arc segment. From the previous segment to this segment position, create an arc passing through a thrid point. The Third point defines the Arc segment going clockwise or anticlockwise from begin to end point.
| a2dArcSegment::a2dArcSegment | ( | double | x1 = 0, |
| double | y1 = 0, |
||
| double | x2 = 0, |
||
| double | y2 = 0 |
||
| ) |
create arc segment
Begin point of arc is position/endpoint of previous segment
| x1 | x of arc endpoint |
| y1 | y of arc endpoint |
| x2 | x of arc midpoint |
| y2 | y of arc midpoint |
Definition at line 302 of file polyver.cpp.
| a2dArcSegment::a2dArcSegment | ( | const a2dLineSegment & | prev, |
| double | xc, | ||
| double | yc, | ||
| double | angle | ||
| ) |
create arc segment
Begin point of arc is position/endpoint of previous segment
| prev | previous segment |
| xc | x of arc center |
| yc | y of arc center |
| angle | angle of arc in degrees relative from the previous segment endpoint (negatif for clockwise) |
Definition at line 310 of file polyver.cpp.
| a2dArcSegment::a2dArcSegment | ( | const a2dLineSegment & | prev, |
| double | xc, | ||
| double | yc, | ||
| double | x1, | ||
| double | y1, | ||
| double | x2, | ||
| double | y2 | ||
| ) |
create arc segment
Begin point of arc is position/endpoint of previous segment
| prev | previous segment |
| xc | x of arc center |
| yc | y of arc center |
| x1 | x of arc endpoint |
| y1 | y of arc endpoint |
| x2 | x (xc,yc) ( x2,y2) define a line which the arc will cross |
| y2 | y (xc,yc) ( x2,y2) define a line which the arc will cross |
Definition at line 328 of file polyver.cpp.
| void a2dArcSegment::CalcMidPoint | ( | const a2dLineSegment & | prev, |
| double | center_x, | ||
| double | center_y, | ||
| double | radius, | ||
| bool | clockwise | ||
| ) |
calculate new mid point bsed on prev segment radius and center.
| prev | the previous segment, to get start point of arc. |
| radius | radius of the circle calculated |
| center_x | x of the center calculated |
| center_y | y of the center calculated |
| clockwise | if true a clockwise arc segment is assumed for creating the mid point |
Definition at line 389 of file polyver.cpp.
| bool a2dArcSegment::CalcR | ( | const a2dLineSegment & | prev, |
| double & | radius, | ||
| double & | center_x, | ||
| double & | center_y, | ||
| double & | beginrad, | ||
| double & | midrad, | ||
| double & | endrad, | ||
| double & | phit | ||
| ) | const |
Calculation of center for the Arc.
output :
| prev | the previous segment, to get start point of arc. |
| radius | radius of the circle calculated |
| center_x | x of the center calculated |
| center_y | y of the center calculated |
| beginrad | calculated starting angle in radians |
| midrad | calculated middle angle in radians |
| endrad | calculated end angle in radians |
| phit | total calculated in radians (AntiClockwise positif, else negatif ) |
Definition at line 411 of file polyver.cpp.
| void a2dArcSegment::SetMidPoint | ( | const a2dLineSegment & | prev, |
| double | xm, | ||
| double | ym | ||
| ) |
set middle point of arc segment
| prev | the previous segment, to get start point of arc. |
| xm | x of middle point |
| ym | y of middle point |
Definition at line 362 of file polyver.cpp.