org.newdawn.slick.geom
Class Point

java.lang.Object
  extended by org.newdawn.slick.geom.Shape
      extended by org.newdawn.slick.geom.Point
All Implemented Interfaces:
java.io.Serializable

public class Point
extends Shape

A single point shape

Author:
Kova
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.newdawn.slick.geom.Shape
boundingCircleRadius, center, maxX, maxY, minX, minY, points, pointsDirty, trianglesDirty, tris, x, y
 
Constructor Summary
Point(float x, float y)
          Create a new point
 
Method Summary
protected  void calculateRadius()
          Calculate the radius of a circle that can completely enclose this shape.
protected  void createPoints()
          Subclasses implement this to create the points of the shape.
protected  void findCenter()
          Get the center of this polygon.
 Shape transform(Transform transform)
          Apply a transformation and return a new shape.
 
Methods inherited from class org.newdawn.slick.geom.Shape
calculateTriangles, checkPoints, closed, contains, contains, getBoundingCircleRadius, getCenter, getCenterX, getCenterY, getHeight, getLocation, getMaxX, getMaxY, getMinX, getMinY, getNormal, getPoint, getPointCount, getPoints, getTriangles, getWidth, getX, getY, hasVertex, includes, increaseTriangulation, indexOf, intersects, preCache, prune, setCenterX, setCenterY, setLocation, setLocation, setX, setY, subtract, union
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Point

public Point(float x,
             float y)
Create a new point

Parameters:
x - The x coordinate of the point
y - The y coordinate of the point
Method Detail

transform

public Shape transform(Transform transform)
Description copied from class: Shape
Apply a transformation and return a new shape. This will not alter the current shape but will return the transformed shape.

Specified by:
transform in class Shape
Parameters:
transform - The transform to be applied
Returns:
The transformed shape.
See Also:
Shape.transform(org.newdawn.slick.geom.Transform)

createPoints

protected void createPoints()
Description copied from class: Shape
Subclasses implement this to create the points of the shape.

Specified by:
createPoints in class Shape
See Also:
Shape.createPoints()

findCenter

protected void findCenter()
Description copied from class: Shape
Get the center of this polygon.

Overrides:
findCenter in class Shape
See Also:
Shape.findCenter()

calculateRadius

protected void calculateRadius()
Description copied from class: Shape
Calculate the radius of a circle that can completely enclose this shape.

Overrides:
calculateRadius in class Shape
See Also:
Shape.calculateRadius()


Copyright © 2006 New Dawn Software. All Rights Reserved.