In file include/csgeom/polyint.h:

## class csPolygonInt

> This class indicates what methods a class should use in order to be a 'polygon'

## Inheritance:

### Public Methods

  virtual int | Classify (csPolygonInt* poly) Classify a polygon with regards to this one
  virtual csPlane* | GetPolyPlane () Return the plane of this polygon
  virtual int | GetType () Return some type-id which BSP visitors can use for their own purpose
  virtual bool | SamePlane (csPolygonInt* p) Return true if this polygon and the given polygon are on the same plane
  virtual void | SplitWithPlane (csPolygonInt** front, csPolygonInt** back, csPlane& plane) Split this polygon with the given plane (A,B,C,D) and return the two resulting new polygons in 'front' and 'back'

## Documentation

> This class indicates what methods a class should use in order to be a 'polygon'. It acts as an 'interface' in JAVA terminology. There is no data in this class and no method implementations.

> The BSP tree implementation is an example of a class that uses this csPolygonInt interface. The consequence of this is that the BSP tree can be used for several sorts of polygons (even 3D or 2D ones).

> This class exports methods in three categories:

> - Polygon manipulation (clone, set_parent, get_parent)
> - Vertex manipulation (reset, add_vertex, finish, get_num_vertices)
> - Plane functions (classify, same_plane, get_poly_plane, split_with_plane)

`virtual csPlane* GetPolyPlane()`
  Return the plane of this polygon

`virtual int Classify(csPolygonInt* poly)`
  Classify a polygon with regards to this one. If the poly is on same plane as this one it returns POL_SAME_PLANE. If this poly is completely in front of the given poly it returnes POL_FRONT. If this poly is completely back of the given poly it returnes POL_BACK. Otherwise it returns POL_SPLIT_NEEDED.

`virtual void SplitWithPlane(csPolygonInt** front, csPolygonInt** back, csPlane& plane)`
  Split this polygon with the given plane (A,B,C,D) and return the two resulting new polygons in 'front' and 'back'. The new polygons will mimic the behaviour of the parent polygon as good as possible. This function is mainly used by the BSP splitter.

`virtual bool SamePlane(csPolygonInt* p)`
  Return true if this polygon and the given polygon are on the same plane. If their planes are shared this is automatically the case. Otherwise this function will check their respective plane equations to test for equality.

`virtual int GetType()`
  Return some type-id which BSP visitors can use for their own purpose. The purpose of this is to allow several different types of polygons to be added to the same tree. With this number you can recognize them.

Direct child classes:
  csPolygon3D
  csBspPolygon

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