wxArt2D
Classes | Typedefs | Enumerations | Functions
polyver.h File Reference

general vertexlist and array and vector path functions and classes. More...

#include "wx/geometry.h"
#include "wx/general/gen.h"
#include "wx/artbase/artglob.h"
#include "wx/artbase/afmatrix.h"
#include "wx/artbase/liner.h"
#include "wx/artbase/bbox.h"
#include <vector>
#include <wx/listimpl.cpp>
Include dependency graph for polyver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  a2dHit
 struct for how a single object on one layer was hit More...
 
class  a2dLineSegment
 Normal straight line segment in a2dVertexList and a2dVertexArray. More...
 
class  a2dArcSegment
 Arc Segment in a2dVertexList. More...
 
class  a2dVertexArray
 vertex array of line and arc segments. More...
 
class  a2dVertexList
 vertex list of line and arc segments. More...
 
class  a2dVpathSegment
 Normal straight line segment in a2dVpath. More...
 
class  a2dVpathQBCurveSegment
 Quadratic Bezier curve. More...
 
class  a2dVpathCBCurveSegment
 Cubic Bezier curve. More...
 
class  a2dVpathArcSegment
 Arc Segment. More...
 
class  a2dVpath
 Vector Path. More...
 

Typedefs

typedef a2dSmrtPtr
< a2dLineSegment
a2dLineSegmentPtr
 smart pointer to line segment
 
typedef a2dSmrtPtr< a2dVertexLista2dVertexListPtr
 
typedef a2dVertexList::iterator a2dVertexListIter
 
typedef a2dSmrtPtrList
< a2dVertexList
a2dListOfa2dVertexList
 
typedef a2dSmrtPtr
< a2dVpathSegment
a2dVpathSegmentPtr
 smart pointer to path segment
 

Enumerations

enum  a2dPATH_END_TYPE { a2dPATH_END_SQAURE, a2dPATH_END_ROUND, a2dPATH_END_SQAURE_EXT }
 defines the way a polyline with a contour width is ended.
 
enum  a2dSegType { a2dNORMAL_SEG = 0x0000, a2dLINK_SEG = 0x0001, a2dHOLE_SEG = 0x0002 }
 defines the type of a segment in a a2dLineSegment More...
 
enum  a2dPATHSEG {
  a2dPATHSEG_MOVETO, a2dPATHSEG_LINETO, a2dPATHSEG_LINETO_NOSTROKE, a2dPATHSEG_QBCURVETO,
  a2dPATHSEG_QBCURVETO_NOSTROKE, a2dPATHSEG_CBCURVETO, a2dPATHSEG_CBCURVETO_NOSTROKE, a2dPATHSEG_ARCTO,
  a2dPATHSEG_ARCTO_NOSTROKE
}
 how do we move to the point of the segment More...
 
enum  a2dPATHSEG_END { a2dPATHSEG_END_OPEN, a2dPATHSEG_END_CLOSED, a2dPATHSEG_END_CLOSED_NOSTROKE }
 end of a segment type More...
 

Functions

bool InArc (double angle, double start, double end, bool clockwise)
 
double ClclDistSqrPntPnt (const a2dPoint2D &a, const a2dPoint2D &b)
 Calculate the square distance between two points.
 
double ClclDistSqrPntLine (const a2dPoint2D &p, const a2dPoint2D &p1, const a2dPoint2D &p2)
 Calculate the square distance between a point and a line. More...
 
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...
 

Detailed Description

general vertexlist and array and vector path functions and classes.

All ways to have polygons and polylines stored and drawn by a drawing context are placed here. Polygon or polylines can be list based or array based. The vector path is the structure which can be used to drawn almost anything. Basic primtives can always be converted to a vector path, and drawn that way.

Author
Klaas Holwerda, Michael Sögtrop, Faust Nijhuis
Date
Created 01/09/04

Copyright: 2001-2004 (C) Klaas Holwerda, Michael Sögtrop

Licence: wxWidgets licence

RCS-ID:

Id:
polyver.h,v 1.37 2009/09/30 18:38:56 titato Exp

Definition in file polyver.h.

Enumeration Type Documentation

enum a2dSegType

defines the type of a segment in a a2dLineSegment

Enumerator
a2dNORMAL_SEG 

not specific or part of outer contour

a2dLINK_SEG 

links an outside contour with a hole

a2dHOLE_SEG 

this segmnet is part of a hole

Definition at line 145 of file polyver.h.

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.h File Reference -- Sun Oct 12 2014 17:04:27 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation