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 <wx/arrimpl.cpp>

Include dependency graph for polyver.cpp:

Go to the source code of this file.

Classes

struct  gds_spline_stack_struct

Defines

#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.
bool InArc (double angle, double start, double end, bool clockwise)
 WX_DEFINE_OBJARRAY (a2dVpathArray)
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.
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.

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,
double &  center_x,
double &  center_y,
double &  beginrad,
double &  midrad,
double &  endrad,
double &  phit 
)

Calculation of center for the Arc.

Parameters:
begin_x x start point of arc.
begin_y y start point of arc.
middle_x x middle point of arc.
middle_y y middle point of arc.
end_x x end point of arc.
end_y y end 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 4752 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,
a2dPoint2D center_p 
)

Calculation of center for the Arc.

Parameters:
begin_x x start point of arc.
begin_y y start point of arc.
middle_x x middle point of arc.
middle_y y middle point of arc.
end_x x end point of arc.
end_y y end point of arc.
radius radius of the circle calculated
center_p the center calculated
Returns:
true if the arc is indeed an Arc if a straight line return false.

Definition at line 4741 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 -- Tue Aug 31 18:06:45 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation