org.jzy3d.plot3d.builder.delaunay.jdt
Class Point_dt

java.lang.Object
  extended by org.jzy3d.plot3d.builder.delaunay.jdt.Point_dt

public class Point_dt
extends java.lang.Object

This class represents a 3D point, with some simple geometric methods (pointLineTest).


Field Summary
static int BEHINDB
          ������a---------b���+���
static int ERROR
           
static int INFRONTOFA
          ��+��a---------b������
static int LEFT
          +
�����a---------b������
static int ONSEGMENT
          �����a----+----b������
static int RIGHT
          �����a---------b������
+
 
Constructor Summary
Point_dt()
          Default Constructor.
Point_dt(double x, double y)
          constructs a 3D point with a z value of 0.
Point_dt(double x, double y, double z)
          constructs a 3D point
Point_dt(Point_dt p)
          simple copy constructor
 
Method Summary
 double distance(Point_dt p)
           
 double distance3D(Point_dt p)
           
 boolean equals(Point_dt p)
          return true iff this point [x,y] coordinates are the same as p [x,y] coordinates.
 Coord3d getAsCoord3d()
          Returns a jzy3d Coord3d instance
static java.util.Comparator<Point_dt> getComparator()
           
static java.util.Comparator<Point_dt> getComparator(int flag)
           
 int pointLineTest(Point_dt a, Point_dt b)
          tests the relation between this point (as a 2D [x,y] point) and a 2D segment a,b (the Z values are ignored), returns one of the following: LEFT, RIGHT, INFRONTOFA, BEHINDB, ONSEGMENT
 java.lang.String toFile()
          return a String: x y z (used by the save to file - write_tsin method).
 java.lang.String toString()
          return a String in the [x,y,z] format
 double x()
          returns the x-coordinate of this point.
 double y()
          returns the y-coordinate of this point.
 double z()
          returns the z-coordinate of this point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ONSEGMENT

public static final int ONSEGMENT
�����a----+----b������

See Also:
Constant Field Values

LEFT

public static final int LEFT
+
�����a---------b������

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
�����a---------b������
+

See Also:
Constant Field Values

INFRONTOFA

public static final int INFRONTOFA
��+��a---------b������

See Also:
Constant Field Values

BEHINDB

public static final int BEHINDB
������a---------b���+���

See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values
Constructor Detail

Point_dt

public Point_dt()
Default Constructor.
constructs a 3D point at (0,0,0).


Point_dt

public Point_dt(double x,
                double y,
                double z)
constructs a 3D point


Point_dt

public Point_dt(double x,
                double y)
constructs a 3D point with a z value of 0.


Point_dt

public Point_dt(Point_dt p)
simple copy constructor

Method Detail

x

public double x()
returns the x-coordinate of this point.


y

public double y()
returns the y-coordinate of this point.


z

public double z()
returns the z-coordinate of this point.


getAsCoord3d

public Coord3d getAsCoord3d()
Returns a jzy3d Coord3d instance


equals

public boolean equals(Point_dt p)
return true iff this point [x,y] coordinates are the same as p [x,y] coordinates. (the z value is ignored).


toString

public java.lang.String toString()
return a String in the [x,y,z] format

Overrides:
toString in class java.lang.Object

distance

public double distance(Point_dt p)
Returns:
the L2 distanse NOTE: 2D only!!!

distance3D

public double distance3D(Point_dt p)
Returns:
the L2 distanse NOTE: 2D only!!!

toFile

public java.lang.String toFile()
return a String: x y z (used by the save to file - write_tsin method).


pointLineTest

public int pointLineTest(Point_dt a,
                         Point_dt b)
tests the relation between this point (as a 2D [x,y] point) and a 2D segment a,b (the Z values are ignored), returns one of the following: LEFT, RIGHT, INFRONTOFA, BEHINDB, ONSEGMENT

Parameters:
a - the first point of the segment.
b - the second point of the segment.
Returns:
the value (flag) of the relation between this point and the a,b line-segment.

getComparator

public static java.util.Comparator<Point_dt> getComparator(int flag)

getComparator

public static java.util.Comparator<Point_dt> getComparator()