All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.vecmath.Point2d

java.lang.Object
   |
   +----javax.vecmath.Tuple2d
           |
           +----javax.vecmath.Point2d

public class Point2d
extends javax.vecmath.Tuple2d
implements java.io.Serializable
A 2 element point that is represented by double precision doubleing point x,y coordinates.

Version:
specification 1.1, implementation $Revision: 1.4 $, $Date: 1999/03/04 09:16:33 $
Author:
Kenji hiranabe

Constructor Index

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

Method Index

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

Constructors

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

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

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

Parameters:
p1 - the Point2d containing the initialization x y data
 o Point2d
 public Point2d(javax.vecmath.Point2f p1)
Constructs and initializes a Point2d from the specified Point2f.

Parameters:
p1 - the Point2f containing the initialization x y data
 o Point2d
 public Point2d(javax.vecmath.Tuple2d t1)
Constructs and initializes a Point2d from the specified Tuple2d.

Parameters:
t1 - the Tuple2d containing the initialization x y data
 o Point2d
 public Point2d(javax.vecmath.Tuple2f t1)
Constructs and initializes a Point2d from the specified Tuple2f.

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

Methods

 o distanceSquared
 public final double distanceSquared(javax.vecmath.Point2d p1)
Computes the square of the distance between this point and point p1.

Parameters:
p1 - the other point
 o distance
 public final double distance(javax.vecmath.Point2d p1)
Computes the distance between this point and point p1.

Parameters:
p1 - the other point
 o distanceL1
 public final double distanceL1(javax.vecmath.Point2d 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).

Parameters:
p1 - the other point
 o distanceLinf
 public final double distanceLinf(javax.vecmath.Point2d 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)].

Parameters:
p1 - the other point

All Packages  Class Hierarchy  This Package  Previous  Next  Index