All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.vecmath.Point2f

java.lang.Object
   |
   +----java.vecmath.Tuple2f
           |
           +----java.vecmath.Point2f

public class Point2f
extends Tuple2f
A 2 element point that is represented by single precision floating point x,y coordinates.


Constructor Index

 o Point2f()
Constructs and initializes a Point2f to (0,0).
 o Point2f(float, float)
Constructs and initializes a Point2f from the specified xy coordinates.
 o Point2f(float[])
Constructs and initializes a Point2f from the specified array.
 o Point2f(Point2f)
Constructs and initializes a Point2f from the specified Point2f.

Method Index

 o distance(Point2f)
Computes the distance between this point and point p1.
 o distanceL1(Point2f)
Computes the L-1 (Manhattan) distance between this point and point p1.
 o distanceLinf(Point2f)
Computes the L-infinite distance between this point and point p1.
 o distanceSquared(Point2f)
Computes the square of the distance between this point and point p1.

Constructors

 o Point2f
 public Point2f(float x,
                float y)
Constructs and initializes a Point2f from the specified xy coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
 o Point2f
 public Point2f(float p[])
Constructs and initializes a Point2f from the specified array.

Parameters:
p - the array of length 2 containing xy in order
 o Point2f
 public Point2f(Point2f p1)
Constructs and initializes a Point2f from the specified Point2f.

Parameters:
p1 - the Point2f containing the initialization x y data
 o Point2f
 public Point2f()
Constructs and initializes a Point2f to (0,0).

Methods

 o distanceSquared
 public final float distanceSquared(Point2f p1)
Computes the square of the distance between this point and point p1.

Parameters:
p1 - the other point
 o distance
 public final float distance(Point2f p1)
Computes the distance between this point and point p1.

Parameters:
p1 - the other point
 o distanceL1
 public final float distanceL1(Point2f p1)
Computes the L-1 (Manhattan) distance between this point and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).

 o distanceLinf
 public final float distanceLinf(Point2f p1)
Computes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].


All Packages  Class Hierarchy  This Package  Previous  Next  Index