|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.utils.math.extended.Segment3D
public class Segment3D
Contains hash code + method equals (endpoints of the segment must be the same, ordering doesn't metter), once created - shouldn't be changed.
Field Summary | |
---|---|
Vertex3D[] |
ab
Endpoints of the segment. |
Vertex3D[] |
abN
Normalized order of ab[]. |
int |
hashCode
|
double |
length
|
Line3DExtended |
line
Line in which segment lies. |
Constructor Summary | |
---|---|
Segment3D(Segment3D s)
|
|
Segment3D(Vertex3D a,
Vertex3D b)
|
Method Summary | |
---|---|
protected int |
countHashCode()
we have to add the points in the right order to obtain the same hash code ... we will compare their coordinates doesn't work for degenerated segments (a == b), that's why all degenerated segments have hash code == 0 |
boolean |
equals(java.lang.Object o)
|
boolean |
equals(Segment3D s)
|
Vertex3D |
getOtherVertex(Vertex3D previousVertex)
|
int |
hashCode()
|
boolean |
hasVertex(Vertex3D v)
Wether v is one of the endpoint of this segment. |
boolean |
inLine(Line3D iLine)
Test wether the segment lines in this line. |
double |
length()
|
Vertex3D |
sharedVertex(Segment3D s)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Line3DExtended line
public Vertex3D[] ab
public Vertex3D[] abN
public double length
public final int hashCode
Constructor Detail |
---|
public Segment3D(Vertex3D a, Vertex3D b)
public Segment3D(Segment3D s)
Method Detail |
---|
protected int countHashCode()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Segment3D s)
public int hashCode()
hashCode
in class java.lang.Object
public double length()
public boolean hasVertex(Vertex3D v)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean inLine(Line3D iLine)
iLine
- public Vertex3D getOtherVertex(Vertex3D previousVertex)
public Vertex3D sharedVertex(Segment3D s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |