|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.geometry.LineSeg3D
public class LineSeg3D
A simple line segment with two endpoints (expressed as
Coord3D
)
Field Summary | |
---|---|
protected Coord3D |
a
The start of the line |
protected Coord3D |
b
The end of the line |
Constructor Summary | |
---|---|
LineSeg3D(Coord3D start,
Coord3D end)
Construct a line segment with the given start and end points |
Method Summary | |
---|---|
LineSeg3D |
add(Coord3D delta)
translate the line segment's end points by the amount of the coördinates provided |
Vector3D |
asVector()
|
boolean |
equals(Object obj)
|
Coord3D |
getEnd()
Get the final (B) coördinates of this segment |
Coord3D |
getStart()
Get the initial (A) coördinates of this segment |
boolean |
hasEndpoint(Coord3D p)
|
int |
hashCode()
|
LineSeg3D |
toOrigin()
Create a copy of the line transformed so that it starts at the origin. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Coord3D a
protected final Coord3D b
Constructor Detail |
---|
public LineSeg3D(Coord3D start, Coord3D end)
start
- the start (A) coördinatesend
- the end (B) coördinatesMethod Detail |
---|
public LineSeg3D add(Coord3D delta)
delta
- the amount to alter the line segment
public Vector3D asVector()
public boolean equals(Object obj)
equals
in class Object
Note, two lines
are equal if (and only if) they share the same two
endpoints; however, a line from A to B is identical to a
line from B to A for these purposes.
public Coord3D getEnd()
public Coord3D getStart()
public boolean hasEndpoint(Coord3D p)
p
- any point
public int hashCode()
hashCode
in class Object
Object.hashCode()
public LineSeg3D toOrigin()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |