a2dVpathArcSegment Class Reference
[vector path a2dCanvasObject plus segment classes]

Arc Segment. More...

#include <polyver.h>

Inheritance diagram for a2dVpathArcSegment:

Inheritance graph
[legend]
Collaboration diagram for a2dVpathArcSegment:

Collaboration graph
[legend]

List of all members.

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
 a2dVpathArcSegment (const a2dVpathSegment &prev, double xc, double yc, double angle, a2dPATHSEG type=a2dPATHSEG_ARCTO, a2dPATHSEG_END close=a2dPATHSEG_END_OPEN)
 create arc segment
 a2dVpathArcSegment (const a2dVpathSegment &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
 a2dVpathArcSegment (const a2dVpathArcSegment &other)
 constructor
 ~a2dVpathArcSegment ()
 destructor
virtual a2dVpathSegmentClone ()
 create exact copy
bool CalcR (const a2dVpathSegment &prev, double &radius, double &center_x, double &center_y, double &beginrad, double &midrad, double &endrad, double &phit)
 Calculation of center for the Arc.
virtual double Length (const a2dVpathSegment &prev)
 calculate length

Public Attributes

double m_x2
 second control point
double m_y2
 second control point


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 1069 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:
x1 x of arc endpoint
y1 y of arc endpoint
x2 x of arc midpoint
y2 y of arc midpoint
type draw or move towards point
close if true close this path with the last move command/segment

Definition at line 3720 of file polyver.cpp.

a2dVpathArcSegment::a2dVpathArcSegment ( const a2dVpathSegment 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:
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)
type draw or move towards point
close if true close this path with the last move command/segment

Definition at line 3732 of file polyver.cpp.

a2dVpathArcSegment::a2dVpathArcSegment ( const a2dVpathSegment 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:
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
type draw or move towards point
close if 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 3753 of file polyver.cpp.


Member Function Documentation

bool a2dVpathArcSegment::CalcR ( const a2dVpathSegment 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:
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 )
Returns:
true if the arc is indeed an Arc if a straight line return false.

Definition at line 3803 of file polyver.cpp.


The documentation for this class was generated from the following files:
a2dVpathArcSegment Class Reference -- Tue Aug 31 18:36:49 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation