# CS::Geometry::csEarClipper Class Reference

structure for clipping polygon ears More...

## Public Member Functions | |

csVertexSet | ClipEar () |

Returns the index of the vertex clipped. | |

csEarClipper (csContour3 polygon) | |

Constructor. | |

size_t | GetOriginalIndex (size_t at) |

Returns the original index of a vertex. | |

bool | IsFinished () |

Returns whether the ear clipper is finished or not. |

## Detailed Description

structure for clipping polygon ears

A polygon ear is defined as three consecutive ears of a polygon, for which no other vertices are within the triangle formed by these three vertices. A ear is clipped by connecting the two end vertices (on either side of the ear vertex), and removing the ear vertex from the vertices left to be clipped. Ear clipping is used to triangulate polygons.

**Note:**- This ear clipper requires a planar polygon that is located in the x-y plane. If this is not the case, you will need to use the 3D triangulator class to map the polygon to a planar polygon and then rotate it to coincide with the x-y plane.

Definition at line 50 of file triangulate3d.h.

## Constructor & Destructor Documentation

CS::Geometry::csEarClipper::csEarClipper | ( | csContour3 | polygon |
) |

Constructor.

**Parameters:**-
*polygon*A 2D planar polygon within the x-y plane. See the note at the top of the class description for more information.

## Member Function Documentation

csVertexSet CS::Geometry::csEarClipper::ClipEar | ( | ) |

Returns the index of the vertex clipped.

size_t CS::Geometry::csEarClipper::GetOriginalIndex | ( | size_t | at |
) | ` [inline]` |

Returns the original index of a vertex.

Definition at line 89 of file triangulate3d.h.

bool CS::Geometry::csEarClipper::IsFinished | ( | ) |

Returns whether the ear clipper is finished or not.

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

- csgeom/triangulate3d.h

Generated for Crystal Space 1.4.1 by doxygen 1.7.1