|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.DPoint3
public class DPoint3
Point in three dimensional space.
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 | |
---|---|
void |
add(DPoint3 v1)
Add the given point to this one. |
static DPoint3 |
add(DPoint3 v1,
DPoint3 v2)
Calculates the sum of the two vectors |
double |
angle2D(double x2,
double y2)
Calculates the absolute angle in the XY plane of the vector pointing from this point to the other point. |
double |
angle3D(DPoint3 p)
Calculate the angle of two vectors (this and p) in the range 0.0 through pi. |
java.lang.Object |
clone()
Make an identical copy. |
static DPoint3 |
cross(DPoint3 v1,
DPoint3 v2)
Calculates the cross product of the two vectors |
double |
distance(DPoint3 p)
Calculates the distance between two points. |
double |
distance2D(DPoint3 p)
Calculates the distance between two points in the XY plane. |
boolean |
equals(java.lang.Object o)
Two points equal if their coordinates equal. |
void |
readExternal(java.io.ObjectInput in)
Deserializes a 3D point. |
void |
set(DPoint3 p)
Set coordinates. |
void |
subtract(DPoint3 v2)
Subtract the given v2 vector from this one. |
java.lang.String |
toString()
Gets a string representation of the point |
void |
writeExternal(java.io.ObjectOutput out)
Serializes a 3D point. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public transient double x
public transient double y
public transient double z
Constructor Detail |
---|
public DPoint3()
public DPoint3(DPoint3 p)
p
- the point to copypublic DPoint3(double x, double y, double z)
x
- the x coordinatey
- the y coordinatez
- the z coordinateMethod Detail |
---|
public void set(DPoint3 p)
p
- point object containing the new coordinatespublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the other point
public final double distance(DPoint3 p)
p
- the other point
public final double distance2D(DPoint3 p)
p
- the other point
public final double angle2D(double x2, double y2)
x2
- the other point's x coordinatey2
- the other point's y coordinate
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- the object output stream
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- the object input stream
java.io.IOException
java.lang.ClassNotFoundException
public void subtract(DPoint3 v2)
v2
- public double angle3D(DPoint3 p)
p
-
public static DPoint3 cross(DPoint3 v1, DPoint3 v2)
v1
- v2
-
public static DPoint3 add(DPoint3 v1, DPoint3 v2)
v1
- v2
-
public void add(DPoint3 v1)
v1
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |