cz.cuni.utils.math.extended
Class Vertex3D

java.lang.Object
  extended by cz.cuni.utils.math.Tuple3D
      extended by 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
 
Constructor Summary
Vertex3D(double[] iXYZ)
           
Vertex3D(double x, double y, double z)
           
Vertex3D(Tuple3D tuple)
           
Vertex3D(Tuple3D tuple1, Tuple3D tuple2)
           
 
Method Summary
 java.lang.Object clone()
           
protected  int countHashCode()
           
 boolean equals(java.lang.Object o)
           
 boolean equals(Vertex3D vertex)
           
 Vertex3D getRoundDigits(int digits)
           
 int hashCode()
           
 
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
 

Field Detail

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!

Constructor Detail

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)
Method Detail

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