![]() |
Public API Reference |
![]() |
The csBoxClipper class is able to clip convex polygons to a rectangle (such as the screen). More...
#include <csgeom/polyclip.h>
Public Member Functions | |
virtual int | ClassifyBox (const csBox2 &box) |
Classify some bounding box against this clipper. | |
virtual uint8 | Clip (const csVector2 *InPolygon, size_t InCount, csVector2 *OutPolygon, size_t &OutCount) |
Simple clipping. | |
virtual uint8 | Clip (const csVector2 *InPolygon, size_t InCount, csVector2 *OutPolygon, size_t &OutCount, csBox2 &BoundingBox) |
Clip and compute the bounding box. | |
virtual uint8 | Clip (const csVector2 *InPolygon, size_t InCount, csVector2 *OutPolygon, size_t &OutCount, csVertexStatus *OutStatus) |
Clip and return additional information about each vertex. | |
csBoxClipper (const csBox2 &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 ClipperType | GetClipperType () const |
Retrieve the type of this clipper. | |
virtual const csVector2 * | GetClipPoly () |
Return a pointer to the array of csVector2's. | |
virtual size_t | GetVertexCount () |
Return number of vertices for this clipper polygon. | |
virtual bool | IsInside (const csVector2 &v) |
Return true if given point is inside (or on bound) of clipper polygon. |
The csBoxClipper class is able to clip convex polygons to a rectangle (such as the screen).
Definition at line 78 of file polyclip.h.
csBoxClipper::csBoxClipper | ( | const csBox2 & | b | ) | [inline] |
Initializes the clipper object to the given bounding region.
Definition at line 96 of file polyclip.h.
csBoxClipper::csBoxClipper | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2 | ||
) | [inline] |
Initializes the clipper object to a rectangle with the given coords.
Definition at line 99 of file polyclip.h.
virtual int csBoxClipper::ClassifyBox | ( | const csBox2 & | box | ) | [virtual] |
Classify some bounding box against this clipper.
Implements iClipper2D.
virtual uint8 csBoxClipper::Clip | ( | const csVector2 * | InPolygon, |
size_t | InCount, | ||
csVector2 * | OutPolygon, | ||
size_t & | OutCount | ||
) | [virtual] |
Simple clipping.
Implements iClipper2D.
virtual uint8 csBoxClipper::Clip | ( | const csVector2 * | InPolygon, |
size_t | InCount, | ||
csVector2 * | OutPolygon, | ||
size_t & | OutCount, | ||
csBox2 & | BoundingBox | ||
) | [virtual] |
Clip and compute the bounding box.
Implements iClipper2D.
virtual uint8 csBoxClipper::Clip | ( | const csVector2 * | InPolygon, |
size_t | InCount, | ||
csVector2 * | OutPolygon, | ||
size_t & | OutCount, | ||
csVertexStatus * | OutStatus | ||
) | [virtual] |
Clip and return additional information about each vertex.
Implements iClipper2D.
virtual ClipperType csBoxClipper::GetClipperType | ( | ) | const [inline, virtual] |
Retrieve the type of this clipper.
Implements iClipper2D.
Definition at line 129 of file polyclip.h.
virtual const csVector2* csBoxClipper::GetClipPoly | ( | ) | [inline, virtual] |
Return a pointer to the array of csVector2's.
Implements iClipper2D.
Definition at line 126 of file polyclip.h.
virtual size_t csBoxClipper::GetVertexCount | ( | ) | [inline, virtual] |
Return number of vertices for this clipper polygon.
Implements iClipper2D.
Definition at line 122 of file polyclip.h.
virtual bool csBoxClipper::IsInside | ( | const csVector2 & | v | ) | [inline, virtual] |
Return true if given point is inside (or on bound) of clipper polygon.
Implements iClipper2D.
Definition at line 118 of file polyclip.h.