wxArt2D
Public Member Functions | Public Attributes | List of all members
a2dVpathArcSegment Class Reference

Arc Segment. More...

#include <polyver.h>

Inheritance diagram for a2dVpathArcSegment:
Inheritance graph
[legend]
Collaboration diagram for a2dVpathArcSegment:
Collaboration graph
[legend]

Public Member Functions

 a2dVpathArcSegment (double x1, double y1, double x2, double y2, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 create arc segment More...
 
 a2dVpathArcSegment (a2dVpathSegmentPtr prev, double xc, double yc, double angle, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 create arc segment More...
 
 a2dVpathArcSegment (a2dVpathSegmentPtr prev, double xc, double yc, double x1, double y1, double x2, double y2, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 create arc segment More...
 
 a2dVpathArcSegment (const a2dVpathArcSegment &other)
 constructor
 
 ~a2dVpathArcSegment ()
 destructor
 
virtual a2dVpathSegmentClone ()
 create exact copy
 
bool CalcR (a2dVpathSegmentPtr prev, double &radius, double &center_x, double &center_y, double &beginrad, double &midrad, double &endrad, double &phit)
 Calculation of center for the Arc. More...
 
virtual double Length (a2dVpathSegmentPtr prev)
 calculate length
 
- Public Member Functions inherited from a2dVpathSegment
 a2dVpathSegment (double x, double y, a2dPATHSEG type=a2dPATHSEG_LINETO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 constructor More...
 
 a2dVpathSegment (const a2dVpathSegment &other)
 constructor
 
virtual ~a2dVpathSegment ()
 destructor
 
a2dPATHSEG GetType () const
 easy way to test type of segment
 
bool GetBin () const
 used in processing
 
void SetBin (bool bin)
 used in processing
 
a2dPATHSEG_END GetClose () const
 is this segment the closing a part since the last move
 
void SetClose (a2dPATHSEG_END close)
 set this segment is closing a part since the last move
 

Public Attributes

double m_x2
 second control point
 
double m_y2
 second control point
 
- Public Attributes inherited from a2dVpathSegment
double m_x1
 x endpoint of line
 
double m_y1
 y endpoint of line
 
bool m_bin: 1
 Marker for walking over the segments.
 
a2dPATHSEG m_type: 5
 easy way to test type of segment
 
a2dPATHSEG_END m_close: 3
 is the path closing here or not
 

Detailed Description

Arc Segment.

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.

Definition at line 1112 of file polyver.h.

Constructor & Destructor Documentation

a2dVpathArcSegment::a2dVpathArcSegment ( double  x1,
double  y1,
double  x2,
double  y2,
a2dPATHSEG  type = a2dPATHSEG_ARCTO,
a2dPATHSEG_END  close = a2dPATHSEG_END_OPEN 
)

create arc segment

Begin point of arc is position/endpoint of previous segment

Parameters
x1x of arc endpoint
y1y of arc endpoint
x2x of arc midpoint
y2y of arc midpoint
typedraw or move towards point
closeif true close this path with the last move command/segment

Definition at line 3737 of file polyver.cpp.

a2dVpathArcSegment::a2dVpathArcSegment ( a2dVpathSegmentPtr  prev,
double  xc,
double  yc,
double  angle,
a2dPATHSEG  type = a2dPATHSEG_ARCTO,
a2dPATHSEG_END  close = a2dPATHSEG_END_OPEN 
)

create arc segment

Begin point of arc is position/endpoint of previous segment

Parameters
prevprevious segment
xcx of arc center
ycy of arc center
angleangle of arc in degrees relative from the previous segment endpoint (negatif for clockwise)
typedraw or move towards point
closeif true close this path with the last move command/segment

Definition at line 3749 of file polyver.cpp.

a2dVpathArcSegment::a2dVpathArcSegment ( a2dVpathSegmentPtr  prev,
double  xc,
double  yc,
double  x1,
double  y1,
double  x2,
double  y2,
a2dPATHSEG  type = a2dPATHSEG_ARCTO,
a2dPATHSEG_END  close = a2dPATHSEG_END_OPEN 
)

create arc segment

Begin point of arc is position/endpoint of previous segment

Parameters
prevprevious segment
xcx of arc center
ycy of arc center
x1x of arc endpoint
y1y of arc endpoint
x2x (xc,yc) ( x2,y2) define a line which the arc will cross
y2y (xc,yc) ( x2,y2) define a line which the arc will cross
typedraw or move towards point
closeif true close this path with the last move command/segment
Remarks
radius is defined by prev segment endpoint and (xc,yc), x1,y1 is adjusted to fit radius.

Definition at line 3770 of file polyver.cpp.

Member Function Documentation

bool a2dVpathArcSegment::CalcR ( a2dVpathSegmentPtr  prev,
double &  radius,
double &  center_x,
double &  center_y,
double &  beginrad,
double &  midrad,
double &  endrad,
double &  phit 
)

Calculation of center for the Arc.

output :

Parameters
prevthe previous segment, to get start point of arc.
radiusradius of the circle calculated
center_xx of the center calculated
center_yy of the center calculated
beginradcalculated starting angle in radians
midradcalculated middle angle in radians
endradcalculated end angle in radians
phittotal calculated in radians (AntiClockwise positif, else negatif )
Returns
true if the arc is indeed an Arc if a straight line return false.

Definition at line 3820 of file polyver.cpp.


The documentation for this class was generated from the following files:
a2dVpathArcSegment Class Reference -- Sun Oct 12 2014 17:04:53 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation