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.util.pathfinding.navmesh
Class Link

    java.lang.Object
      org.newdawn.slick.util.pathfinding.navmesh.Link

    public class Link

extends java.lang.Object

A link between this space and another

Author:
  kevin

Constructor Summary
`Link(float px, float py, Space target)` Create a new link

Method Summary
`float` | `distance2(float tx, float ty)` Get the distance squared from this link to the given position
`Space` | `getTarget()` Get the space this object links to
`float` | `getX()` Get the x coordinate of the link
`float` | `getY()` Get the y coordinate of the link

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

Constructor Detail

### Link

    public Link(float px,
                float py,
                Space target)

  Create a new link

  Parameters:
    `px` - The x coordinate of the linking point
    `py` - The y coordinate of the linking point
    `target` - The target space we're linking to

Method Detail

### distance2

    public float distance2(float tx,
                           float ty)

  Get the distance squared from this link to the given position

  Parameters:
    `tx` - The x coordinate of the target location
    `ty` - The y coordinate of the target location
  Returns:
    The distance squared from this link to the target

### getX

    public float getX()

  Get the x coordinate of the link

  Returns:
    The x coordinate of the link

### getY

    public float getY()

  Get the y coordinate of the link

  Returns:
    The y coordinate of the link

### getTarget

    public Space getTarget()

  Get the space this object links to

  Returns:
    The space this object links to

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.