Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.newdawn.slick.geom
Interface Triangulator

All Superinterfaces:
  java.io.Serializable

All Known Implementing Classes:
  BasicTriangulator, MannTriangulator, NeatTriangulator, OverTriangulator

    public interface Triangulator

extends java.io.Serializable

A collection of triangles

Author:
  kevin

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

Method Detail

### getTriangleCount

    int getTriangleCount()

  Get a count of the number of triangles produced

  Returns:
    The number of triangles produced

### getTrianglePoint

    float[] getTrianglePoint(int tri,
                             int i)

  Get a point on a specified generated triangle

  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

### addPolyPoint

    void addPolyPoint(float x,
                      float y)

  Add a point that forms part of the outer polygon

  Parameters:
    `x` - The x coordinate of the point
    `y` - The y coordiante of the point

### startHole

    void startHole()

  Start a hole in the polygon

### triangulate

    boolean triangulate()

  Run the triangulation

  Returns:
    True if successful

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 New Dawn Software. All Rights Reserved.