# OverTriangulator (Slick - The 2D Library)
Date: 2013-06-03

## org.newdawn.slick.geom
Class OverTriangulator

    java.lang.Object
      org.newdawn.slick.geom.OverTriangulator

All Implemented Interfaces:
  java.io.Serializable, Triangulator

    public class OverTriangulator

extends java.lang.Object
implements Triangulator

A triangulator implementation that splits the triangules of another, subdividing to give a higher tesselation - and hence smoother transitions.

Author:
  kevin
See Also:
  Serialized Form

Constructor Summary
`OverTriangulator(Triangulator tris)` Create a new triangulator

Method Summary
`void` `addPolyPoint(float x, float y)` Add a point that forms part of the outer polygon
`int` `getTriangleCount()` Get a count of the number of triangles produced
`float[]` `getTrianglePoint(int tri, int i)` Get a point on a specified generated triangle
`void` `startHole()` Start a hole in the polygon
`boolean` `triangulate()` Run the triangulation

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OverTriangulator

    public OverTriangulator(Triangulator tris)

  Create a new triangulator

  Parameters:
    `tris` - The original set of triangles to be sub-dividied

Method Detail

### addPolyPoint

    public void addPolyPoint(float x,
                             float y)

  Description copied from interface: `Triangulator`
  Add a point that forms part of the outer polygon

  Specified by:
    `addPolyPoint` in interface `Triangulator`
  Parameters:
    `x` - The x coordinate of the point
    `y` - The y coordiante of the point
  See Also:
    `Triangulator.addPolyPoint(float, float)`

### getTriangleCount

    public int getTriangleCount()

  Description copied from interface: `Triangulator`
  Get a count of the number of triangles produced

  Specified by:
    `getTriangleCount` in interface `Triangulator`
  Returns:
    The number of triangles produced
  See Also:
    `Triangulator.getTriangleCount()`

### getTrianglePoint

    public float[] getTrianglePoint(int tri,
                                    int i)

  Description copied from interface: `Triangulator`
  Get a point on a specified generated triangle

  Specified by:
    `getTrianglePoint` in interface `Triangulator`
  Parameters:
    `tri` - The index of the triangle to interegate
    `i` - The index of the point within the triangle to retrieve (0 - 2)
  Returns:
    The x,y coordinate pair for the point
  See Also:
    `Triangulator.getTrianglePoint(int, int)`

### startHole

    public void startHole()

  Description copied from interface: `Triangulator`
  Start a hole in the polygon

  Specified by:
    `startHole` in interface `Triangulator`
  See Also:
    `Triangulator.startHole()`

### triangulate

    public boolean triangulate()

  Description copied from interface: `Triangulator`
  Run the triangulation

  Specified by:
    `triangulate` in interface `Triangulator`
  Returns:
    True if successful
  See Also:
    `Triangulator.triangulate()`

Copyright © 2006 New Dawn Software. All Rights Reserved.