chemaxon.struc
Class DPoint3

java.lang.Object
  extended bychemaxon.struc.DPoint3
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DPoint3
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Point in three dimensional space.

Version:
3.1.4, 06/09/2002
Author:
Peter Csizmadia
See Also:
Serialized Form

Field Summary
 double x
          The x coordinate.
 double y
          The y coordinate.
 double z
          The z coordinate.
 
Constructor Summary
DPoint3()
          Construct a zero point.
DPoint3(double x, double y, double z)
          Construct a point from the specified coordinates.
DPoint3(DPoint3 p)
          Copy constructor.
 
Method Summary
 double angle2D(double x2, double y2)
          Calculates the absolute angle of the vector to the other point on the 2D plane.
 java.lang.Object clone()
          Make an identical copy.
 double distance(DPoint3 p)
          Calculates the distance between two points.
 boolean equals(java.lang.Object o)
          Two points equal if their coordinates equal.
 java.lang.String toString()
          Gets a string representation of the point
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public transient double x
The x coordinate.


y

public transient double y
The y coordinate.


z

public transient double z
The z coordinate.

Constructor Detail

DPoint3

public DPoint3()
Construct a zero point.


DPoint3

public DPoint3(DPoint3 p)
Copy constructor.

Parameters:
p - the point to copy

DPoint3

public DPoint3(double x,
               double y,
               double z)
Construct a point from the specified coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
z - the z coordinate
Method Detail

equals

public boolean equals(java.lang.Object o)
Two points equal if their coordinates equal.

Parameters:
o - the other point
Returns:
true if the coordinates equal, false otherwise

distance

public final double distance(DPoint3 p)
Calculates the distance between two points.

Parameters:
p - the other point
Returns:
the distance

angle2D

public final double angle2D(double x2,
                            double y2)
Calculates the absolute angle of the vector to the other point on the 2D plane.

Parameters:
x2 - the other point's x coordinate
y2 - the other point's y coordinate
Returns:
the angle
Since:
3.0

clone

public java.lang.Object clone()
Make an identical copy.

Returns:
the clone

toString

public java.lang.String toString()
Gets a string representation of the point

Returns:
the string representation