SutherlandHodgman::BoundaryHor< Comp > Class Template Reference
Inheritance diagram for SutherlandHodgman::BoundaryHor< Comp >:

## Public Member Functions

BoundaryHor (REAL y)

bool IsInside (const PointF &pnt) const

PointF Intersect (const PointF &p0, const PointF &p1) const

REAL m_Y

## Detailed Description

### template<class Comp> class SutherlandHodgman::BoundaryHor< Comp >

Definition at line 126 of file SutherlandHodgmanClipPoly.h.

## Constructor & Destructor Documentation

template<class Comp >
 SutherlandHodgman::BoundaryHor< Comp >::BoundaryHor ( REAL y )
inline

Definition at line 129 of file SutherlandHodgmanClipPoly.h.

## Member Function Documentation

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

Definition at line 134 of file SutherlandHodgmanClipPoly.h.

References PointF::X, and PointF::Y.

135  { // assumes p0...p1 is not strictly horizontal
136  PointF d = p1 - p0;
137  REAL xslope = d.X / d.Y;
138
139  PointF r;
140
141  r.Y = m_Y;
142  r.X = p0.X + xslope * (m_Y - p0.Y);
143  return r;
144  }
double REAL
template<class Comp >
 bool SutherlandHodgman::BoundaryHor< Comp >::IsInside ( const PointF & pnt ) const
inline

Definition at line 130 of file SutherlandHodgmanClipPoly.h.

References PointF::Y.

131  {
132  return Comp ()( pnt.Y, m_Y );
133  } // return true if pnt.Y is at the inside of the boundary

## Member Data Documentation

template<class Comp >
 REAL SutherlandHodgman::BoundaryHor< Comp >::m_Y
private

Definition at line 148 of file SutherlandHodgmanClipPoly.h.

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