In file include/csgeom/polyclip.h:

## class csBoxClipper : public csClipper

> The csBoxClipper class is able to clip convex polygons to a rectangle (such as the screen)

## Inheritance:

### Public Methods

virtual bool Clip(csVector2 *Polygon, int &Count, int MaxCount, csBox *BoundingBox)
  Clip a set of 2D points and return them in the same array
virtual bool Clip(csVector2 *Polygon, csVector2* dest_poly, int Count, int &OutCount)
  Clip a to dest_poly.
csBoxClipper(float x1, float y1, float x2, float y2)
  Initializes the clipper object to a rectangle with the given coords.
csBoxClipper(const csBox& b)
  Initializes the clipper object to the given bounding region.
virtual int GetNumVertices()
  Return number of vertices for this clipper polygon.
virtual const csVector2 GetVertex(int i)
  Return vertex at index for this clipper polygon.
virtual bool IsInside(float x, float y)
  Return true if given point is inside (or on bound) of clipper polygon.

### Private Fields

csBox region

### Inherited from csClipper:

### Protected Fields

static csPoly2DPool polypool

## Documentation

> The csBoxClipper class is able to clip convex polygons to a rectangle (such as the screen)

`csBox region`

`csBoxClipper(const csBox& b)`
  Initializes the clipper object to the given bounding region.

`csBoxClipper(float x1, float y1, float x2, float y2)`
  Initializes the clipper object to a rectangle with the given coords.

`virtual bool Clip(csVector2 *Polygon, csVector2* dest_poly, int Count, int &OutCount)`
  Clip a to dest_poly.

`virtual bool Clip(csVector2 *Polygon, int &Count, int MaxCount, csBox *BoundingBox)`
  Clip a set of 2D points and return them in the same array. On input MaxCount contains number of elements that Output can hold. On output Count is set to number of vertices in output polygon

`virtual bool IsInside(float x, float y)`
  Return true if given point is inside (or on bound) of clipper polygon.

`virtual int GetNumVertices()`
  Return number of vertices for this clipper polygon.

`virtual const csVector2 GetVertex(int i)`
  Return vertex at index for this clipper polygon.

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de