org.newdawn.slick.geom
Class MannTriangulator.PointBag

java.lang.Object
  extended by org.newdawn.slick.geom.MannTriangulator.PointBag
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
MannTriangulator

protected class MannTriangulator.PointBag
extends java.lang.Object
implements java.io.Serializable

A bag/pool of point objects

Author:
kevin
See Also:
Serialized Form

Field Summary
protected  org.newdawn.slick.geom.MannTriangulator.Point first
          The first point in the bag - head of the list
protected  MannTriangulator.PointBag next
          The next bag in the list of bags
 
Constructor Summary
protected MannTriangulator.PointBag()
           
 
Method Summary
 void add(org.newdawn.slick.geom.MannTriangulator.Point p)
          Add a point to the bag
 void clear()
          Clear all the points from this bag
 void computeAngles()
          Compute the angles for the points in this bag
 boolean contains(Vector2f point)
          Check if the point provided was contained
 int countPoints()
          Get the number of points in the bag
 boolean doesIntersectSegment(Vector2f v1, Vector2f v2)
          Check if the points in this bag form a path intersecting with the specified path
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

first

protected org.newdawn.slick.geom.MannTriangulator.Point first
The first point in the bag - head of the list


next

protected MannTriangulator.PointBag next
The next bag in the list of bags

Constructor Detail

MannTriangulator.PointBag

protected MannTriangulator.PointBag()
Method Detail

clear

public void clear()
Clear all the points from this bag


add

public void add(org.newdawn.slick.geom.MannTriangulator.Point p)
Add a point to the bag

Parameters:
p - The point to add

computeAngles

public void computeAngles()
Compute the angles for the points in this bag


doesIntersectSegment

public boolean doesIntersectSegment(Vector2f v1,
                                    Vector2f v2)
Check if the points in this bag form a path intersecting with the specified path

Parameters:
v1 - The start point of the segment
v2 - The end point of the segment
Returns:
True if points in this contour intersect with the segment

countPoints

public int countPoints()
Get the number of points in the bag

Returns:
The number of points in the bag

contains

public boolean contains(Vector2f point)
Check if the point provided was contained

Parameters:
point - The point provided
Returns:
True if it's in the bag


Copyright © 2006 New Dawn Software. All Rights Reserved.