|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reprap.geometry.polygons.RrLine
public class RrLine
Class to hold and manipulate parametric lines
Field Summary | |
---|---|
private boolean |
beingDestroyed
Flag to prevent cyclic graphs going round forever |
private Rr2Point |
direction
direction |
private Rr2Point |
origin
origin |
Constructor Summary | |
---|---|
RrLine(Rr2Point a,
Rr2Point b)
Line between two points |
|
RrLine(RrLine r)
Copy constructor |
Method Summary | |
---|---|
RrLine |
add(Rr2Point b)
Move the origin |
Rr2Point |
cross_point(RrLine a)
The point where another line crosses |
double |
cross_t(RrLine a)
The parameter value where another line crosses |
Rr2Point |
d_2(Rr2Point p)
The squared distance of a point from a line |
void |
destroy()
Destroy me and all that I point to |
Rr2Point |
direction()
|
double |
nearest(Rr2Point p)
The nearest point on a line to another as a line parameter |
RrLine |
neg()
Arithmetic |
void |
norm()
Normalise the direction vector |
RrLine |
offset(double d)
Offset by a distance |
Rr2Point |
origin()
|
Rr2Point |
point(double t)
The point at a given parameter value |
double |
projection(Rr2Point p)
The parameter value of the point on the line closest to point p |
RrLine |
sub(Rr2Point b)
|
java.lang.String |
toString()
Make from an implicit half-plane |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Rr2Point direction
private Rr2Point origin
private boolean beingDestroyed
Constructor Detail |
---|
public RrLine(Rr2Point a, Rr2Point b)
a
- b
- public RrLine(RrLine r)
r
- Method Detail |
---|
public void destroy()
public java.lang.String toString()
toString
in class java.lang.Object
public Rr2Point direction()
public Rr2Point origin()
public Rr2Point point(double t)
t
-
public void norm()
public RrLine neg()
public RrLine add(Rr2Point b)
b
-
public RrLine sub(Rr2Point b)
b
-
public RrLine offset(double d)
d
-
public double cross_t(RrLine a) throws RrParallelLineException
a
-
rr_ParallelLineException
RrParallelLineException
public Rr2Point cross_point(RrLine a) throws RrParallelLineException
a
-
rr_ParallelLineException
RrParallelLineException
public double nearest(Rr2Point p)
p
-
public Rr2Point d_2(Rr2Point p)
p
-
public double projection(Rr2Point p)
p
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |