Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cPolygon Class Reference

#include <cPolygon.h>

Inheritance diagram for GrayLib::cPolygon:
GrayLib::cPolygonT< int, cRectI >

Public Member Functions

 cPolygon ()
 
 ~cPolygon ()
 
ITERATE_t _cdecl CreatePolygonValuesF (ITERATE_t nCount,...)
 
bool PtInPoly (DVALUE_t x, DVALUE_t y) const
 
bool PtInPoly (const POINT_t &pt) const
 
- Public Member Functions inherited from GrayLib::cPolygonT< int, cRectI >
 cPolygonT ()
 
const cRectIget_BoundingRect (void) const
 
ITERATE_t get_NumVerts () const
 
bool isPolyEmpty () const
 
const POINT_tGetVert (ITERATE_t i) const
 
POINT_tRefVert (ITERATE_t i)
 
bool IsEqual (const THIS_t &p) const
 
ITERATE_t CreatePolygonPoints (const POINT_t *pPoints, ITERATE_t nCount)
 
void SetEmpty ()
 
void DeleteVert (ITERATE_t i)
 
void InsertVert (ITERATE_t i, const POINT_t &pt)
 
ITERATE_t AddVert (const POINT_t &pt)
 
ITERATE_t AddVert (int x, int y)
 
void UnionPolyRect (cRectI &rect) const
 
void SetCopy (const THIS_t &poly)
 
void put_PolyRect (const cRectI &rect)
 
void put_PolyRect (int fSizeX, int fSizeY)
 
void OffsetPoly (int dx, int dy)
 

Additional Inherited Members

- Public Types inherited from GrayLib::cPolygonT< int, cRectI >
typedef int DVALUE_t
 Dimension value type. More...
 
typedef cVecT2< int > POINT_t
 
typedef cRectI RECT_t
 cRectNT<TYPE> More...
 
- Static Public Attributes inherited from GrayLib::cPolygonT< int, cRectI >
static const ITERATE_t k_MAX_VERTS
 arbitrary max. More...
 
- Protected Attributes inherited from GrayLib::cPolygonT< int, cRectI >
cRectI m_rectUnion
 The union rectangle m_aPoints. inclusive if float, non-inclusive if int. More...
 
cArrayStruct< POINT_tm_aPoints
 k_MAX_VERTS More...
 

Detailed Description

a 2d int polygon shape. n integer 2d points that close.

Constructor & Destructor Documentation

◆ cPolygon()

GrayLib::cPolygon::cPolygon ( )

◆ ~cPolygon()

GrayLib::cPolygon::~cPolygon ( )

Member Function Documentation

◆ CreatePolygonValuesF()

ITERATE_t _cdecl GrayLib::cPolygon::CreatePolygonValuesF ( ITERATE_t  nCount,
  ... 
)

◆ PtInPoly() [1/2]

bool GrayLib::cPolygon::PtInPoly ( const POINT_t pt) const
inline

◆ PtInPoly() [2/2]

bool GrayLib::cPolygon::PtInPoly ( DVALUE_t  x,
DVALUE_t  y 
) const

Is this point inside the polygon? DVALUE_t pnpoly(DVALUE_t npol, DVALUE_t *xp, DVALUE_t *yp, DVALUE_t x, DVALUE_t y)


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