@ALDParametrizedClass public class MTBPoint3D extends Object implements Comparable<MTBPoint3D>
Modifier and Type | Field and Description |
---|---|
double |
x
Point coordinate at x-dimension.
|
double |
y
Point coordinate at y-dimension.
|
double |
z
Point coordinate at z-dimension.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(Object obj) |
double |
getX()
Return coordinate of x-dimension.
|
double |
getY()
Return coordinate of y-dimension.
|
double |
getZ()
Return coordinate of z-dimension.
|
int |
hashCode() |
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.
|
@ALDClassParameter(label="x coordinate") public double x
@ALDClassParameter(label="y coordinate") public double y
@ALDClassParameter(label="z coordinate") public double z
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-representationpublic de.unihalle.informatik.MiToBo_xml.MTBXMLPoint3DType toXMLType()
public double getX()
public double getY()
public double getZ()
public void setX(double x)
x
- x-coordinatepublic void setY(double y)
y
- y-coordinatepublic void setZ(double z)
z
- z-coordinatepublic void setLocation(double x, double y, double z)
x
- coordinate of x-dimensiony
- coordinate of y-dimensionz
- coordinate of z-dimensionpublic 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-coordinatepublic double distance(MTBPoint3D p)
p
- 3D point objectpublic double distance(double px, double py, double pz)
px
- x-coordinate of the locationpy
- y-coordinate of the locationpz
- z-coordinate of the locationpublic int compareTo(MTBPoint3D q)
compareTo
in interface Comparable<MTBPoint3D>
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.