cz.cuni.utils.math.extended
Class Vertex3D
java.lang.Object
cz.cuni.utils.math.Tuple3D
cz.cuni.utils.math.extended.Vertex3D
- All Implemented Interfaces:
- java.lang.Cloneable
public class Vertex3D
- extends Tuple3D
It differs from Tuple3D in the way, that xyz shouldn't be changed
after Vertex3D was created, because hash code was counted from them.
Field Summary |
protected int |
hashCode
Hash code is counted upon creation of the object and is counted
only from xyz[] ... don't change xyz[] afterwards! |
Fields inherited from class cz.cuni.utils.math.Tuple3D |
xyz |
Methods inherited from class cz.cuni.utils.math.Tuple3D |
abs, assign, assign, equals, equals, equals, getInverse, inverse, length, normalize, plus, plus, sqrLength, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
hashCode
protected final int hashCode
- Hash code is counted upon creation of the object and is counted
only from xyz[] ... don't change xyz[] afterwards!
Vertex3D
public Vertex3D(double[] iXYZ)
Vertex3D
public Vertex3D(double x,
double y,
double z)
Vertex3D
public Vertex3D(Tuple3D tuple)
Vertex3D
public Vertex3D(Tuple3D tuple1,
Tuple3D tuple2)
clone
public java.lang.Object clone()
- Overrides:
clone
in class Tuple3D
countHashCode
protected int countHashCode()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
equals
public boolean equals(Vertex3D vertex)
getRoundDigits
public Vertex3D getRoundDigits(int digits)
- Parameters:
digits
-
- Returns:
- new Vertex3D with rounded coordinates