wxArt2D
Classes | Macros | Typedefs | Functions | Variables
polyver.cpp File Reference
#include "a2dprec.h"
#include "wx/wx.h"
#include <float.h>
#include "wx/general/gen.h"
#include "wx/general/id.h"
#include "wx/artbase/polyver.h"
#include "wx/artbase/liner.h"
#include "wx/artbase/artglob.h"
Include dependency graph for polyver.cpp:

Go to the source code of this file.

Classes

struct  gds_spline_stack_struct
 

Macros

#define KLEIN   1.0e-30
 
#define GROOT   1.0e30
 
#define PHI_MARGE   0.3
 
#define SEG_MARGE   0.3
 
#define half(z1, z2)   ((z1+z2)/2.0)
 
#define SPLINE_STACK_DEPTH   20
 

Typedefs

typedef struct
gds_spline_stack_struct 
Stack
 

Functions

double ClclDistSqrPntLine (const a2dPoint2D &p, const a2dPoint2D &p1, const a2dPoint2D &p2)
 Calculate the square distance between a point and a line. More...
 
bool InArc (double angle, double start, double end, bool clockwise)
 
bool CalcR (double begin_x, double begin_y, double middle_x, double middle_y, double end_x, double end_y, double &radius, a2dPoint2D &center_p)
 Calculation of center for the Arc. More...
 
bool CalcR (double begin_x, double begin_y, double middle_x, double middle_y, double end_x, double end_y, double &radius, double &center_x, double &center_y, double &beginrad, double &midrad, double &endrad, double &phit)
 Calculation of center for the Arc. More...
 

Variables

const int VPATHSPLINE_STEP = 20
 

Detailed Description

Author
Klaas Holwerda

Copyright: 2000-2004 (c) Klaas Holwerda

Licence: wxWidgets Licence

RCS-ID:

Id:
polyver.cpp,v 1.56 2009/09/30 18:38:57 titato Exp

Definition in file polyver.cpp.

Function Documentation

bool CalcR ( double  begin_x,
double  begin_y,
double  middle_x,
double  middle_y,
double  end_x,
double  end_y,
double &  radius,
a2dPoint2D center_p 
)

Calculation of center for the Arc.

Parameters
begin_xx start point of arc.
begin_yy start point of arc.
middle_xx middle point of arc.
middle_yy middle point of arc.
end_xx end point of arc.
end_yy end point of arc.
radiusradius of the circle calculated
center_pthe center calculated
Returns
true if the arc is indeed an Arc if a straight line return false.

Definition at line 4786 of file polyver.cpp.

bool CalcR ( double  begin_x,
double  begin_y,
double  middle_x,
double  middle_y,
double  end_x,
double  end_y,
double &  radius,
double &  center_x,
double &  center_y,
double &  beginrad,
double &  midrad,
double &  endrad,
double &  phit 
)

Calculation of center for the Arc.

Parameters
begin_xx start point of arc.
begin_yy start point of arc.
middle_xx middle point of arc.
middle_yy middle point of arc.
end_xx end point of arc.
end_yy end 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 4797 of file polyver.cpp.

double ClclDistSqrPntLine ( const a2dPoint2D p,
const a2dPoint2D p1,
const a2dPoint2D p2 
)

Calculate the square distance between a point and a line.

This returns DBL_MAX if the point is beyond the edges

Definition at line 103 of file polyver.cpp.

bool InArc ( double  angle,
double  start,
double  end,
bool  clockwise 
)

is the angle within the arc segment taking into account drawing from start to end in clockwise or anti clocwise direction.

Definition at line 148 of file polyver.cpp.

polyver.cpp File Reference -- Sun Oct 12 2014 17:04:27 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation