|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.core.datatypes.MTBPoint3D
public class MTBPoint3D
The Point3D class defines a point representing a location in (x, y, z) coordinate space. The coordinates are specified in double precision.
Field Summary | |
---|---|
double |
x
Point coordinate at x-dimension. |
double |
y
Point coordinate at y-dimension. |
double |
z
Point coordinate at z-dimension. |
Constructor Summary | |
---|---|
MTBPoint3D()
Standardconstructor to create an new empty 3D point object. |
|
MTBPoint3D(double x,
double y,
double z)
Construct a new 3D point with the given coordinates. |
|
MTBPoint3D(MTBPoint3D p)
Construct a new 3D point from the given 3D point. |
|
MTBPoint3D(de.unihalle.informatik.MiToBo_xml.MTBXMLPoint3DType p)
Construct a new MTBPoint3D from a 3D-point object constructed from xml-representation. |
Method Summary | |
---|---|
int |
compareTo(MTBPoint3D q)
|
double |
distance(double px,
double py,
double pz)
Compute the Euclidean distance between this 3D point object and the given location. |
double |
distance(MTBPoint3D p)
Compute the Euclidean distance between this 3D point object and the given 3D point object. |
boolean |
equals(java.lang.Object obj)
|
double |
getX()
Return coordinate of x-dimension. |
double |
getY()
Return coordinate of y-dimension. |
double |
getZ()
Return coordinate of z-dimension. |
void |
setLocation(double x,
double y,
double z)
Set coordinates of current 3D point object. |
void |
setX(double x)
Set coordinate of x-dimension. |
void |
setY(double y)
Set coordinate of y-dimension. |
void |
setZ(double z)
Set coordinate of z-dimension. |
de.unihalle.informatik.MiToBo_xml.MTBXMLPoint3DType |
toXMLType()
Generate xml-representation of this 3D-point. |
void |
translate(double x,
double y,
double z)
Translate current coordinates of the 3D point object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double x
public double y
public double z
Constructor Detail |
---|
public MTBPoint3D()
public MTBPoint3D(double x, double y, double z)
x
- coordinate for x-dimensiony
- coordinate for y-dimensionz
- coordinate for z-dimensionpublic MTBPoint3D(MTBPoint3D p)
p
- 3D pointpublic MTBPoint3D(de.unihalle.informatik.MiToBo_xml.MTBXMLPoint3DType p)
p
- 3D-point in xml-representationMethod Detail |
---|
public int compareTo(MTBPoint3D q)
compareTo
in interface java.lang.Comparable<MTBPoint3D>
public double distance(double px, double py, double pz)
px
- x-coordinate of the locationpy
- y-coordinate of the locationpz
- z-coordinate of the location
public double distance(MTBPoint3D p)
p
- 3D point object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public double getX()
public double getY()
public double getZ()
public void setLocation(double x, double y, double z)
x
- coordinate of x-dimensiony
- coordinate of y-dimensionz
- coordinate of z-dimensionpublic void setX(double x)
x
- x-coordinatepublic void setY(double y)
y
- y-coordinatepublic void setZ(double z)
z
- z-coordinatepublic de.unihalle.informatik.MiToBo_xml.MTBXMLPoint3DType toXMLType()
public void translate(double x, double y, double z)
x
- value to ad at x-coordinatey
- value to ad at y-coordinatez
- value to ad at z-coordinate
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |