KiCad PCB EDA Suite
SutherlandHodgman::BoundaryVert< Comp > Class Template Reference
Inheritance diagram for SutherlandHodgman::BoundaryVert< Comp >:
SutherlandHodgman::ClipStage< BoundaryLeft, ClipBottom > SutherlandHodgman::ClipStage< BoundaryRight, ClipTop >

Public Member Functions

 BoundaryVert (REAL x)
 
bool IsInside (const PointF &pnt) const
 
PointF Intersect (const PointF &p0, const PointF &p1) const
 

Private Attributes

REAL m_X
 

Detailed Description

template<class Comp>
class SutherlandHodgman::BoundaryVert< Comp >

Definition at line 153 of file SutherlandHodgmanClipPoly.h.

Constructor & Destructor Documentation

template<class Comp >
SutherlandHodgman::BoundaryVert< Comp >::BoundaryVert ( REAL  x)
inline

Definition at line 156 of file SutherlandHodgmanClipPoly.h.

Member Function Documentation

template<class Comp >
PointF SutherlandHodgman::BoundaryVert< Comp >::Intersect ( const PointF p0,
const PointF p1 
) const
inline

Definition at line 162 of file SutherlandHodgmanClipPoly.h.

References SutherlandHodgman::BoundaryVert< Comp >::m_X, PointF::X, and PointF::Y.

163  {
164  PointF d = p1 - p0;
165  REAL yslope = d.Y / d.X;
166 
167  PointF r;
168 
169  r.X = m_X;
170  r.Y = p0.Y + yslope * (m_X - p0.X);
171  return r;
172  }
double REAL
template<class Comp >
bool SutherlandHodgman::BoundaryVert< Comp >::IsInside ( const PointF pnt) const
inline

Definition at line 158 of file SutherlandHodgmanClipPoly.h.

References SutherlandHodgman::BoundaryVert< Comp >::m_X, and PointF::X.

159  {
160  return Comp() ( pnt.X, m_X );
161  }

Member Data Documentation


The documentation for this class was generated from the following file: