|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reprap.geometry.polygons.RrHalfPlane
public class RrHalfPlane
Class to hold and manipulate linear half-planes
Field Summary | |
---|---|
private boolean |
beingDestroyed
Flag to prevent cyclic graphs going round forever |
private Rr2Point |
normal
The half-plane is normal*(x, y) + offset <= 0 |
private double |
offset
|
private RrLine |
p
Keep the parametric equivalent to save computing it |
Constructor Summary | |
---|---|
RrHalfPlane(Rr2Point a,
Rr2Point b)
Make one from two points on its edge |
|
RrHalfPlane(RrHalfPlane a)
Deep copy |
|
RrHalfPlane(RrLine l)
Convert a parametric line |
Method Summary | |
---|---|
RrHalfPlane |
complement()
Change the sense |
Rr2Point |
cross_point(RrHalfPlane a)
The point where another line crosses |
Rr2Point |
cross_point(RrLine a)
Point where a parametric line crosses |
double |
cross_t(RrLine a)
Parameter value where a line crosses |
void |
destroy()
Destroy me and all that I point to |
Rr2Point |
normal()
Get the components |
double |
offset()
|
RrHalfPlane |
offset(double d)
Move |
RrLine |
pLine()
Get the parametric equivalent |
static int |
same(RrHalfPlane a,
RrHalfPlane b,
double tolerance)
Is another line the same within a tolerance? |
java.lang.String |
toString()
Return the plane as a string |
double |
value(Rr2Point p)
Find the potential value of a point |
RrInterval |
value(RrRectangle b)
Find the potential interval of a box |
RrInterval |
wipe(RrLine a,
RrInterval range)
Take a range of parameter values and a line, and find the intersection of that range with the part of the line (if any) on the solid side of the half-plane. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Rr2Point normal
private double offset
private RrLine p
private boolean beingDestroyed
Constructor Detail |
---|
public RrHalfPlane(RrLine l)
l
- public RrHalfPlane(Rr2Point a, Rr2Point b)
a
- b
- public RrHalfPlane(RrHalfPlane a)
a
- Method Detail |
---|
public void destroy()
public RrLine pLine()
public java.lang.String toString()
toString
in class java.lang.Object
public Rr2Point normal()
public double offset()
public static int same(RrHalfPlane a, RrHalfPlane b, double tolerance)
a
- b
- tolerance
-
public RrHalfPlane complement()
public RrHalfPlane offset(double d)
d
-
public double value(Rr2Point p)
p
-
public RrInterval value(RrRectangle b)
b
-
public Rr2Point cross_point(RrHalfPlane a) throws RrParallelLineException
a
-
RrParallelLineException
public double cross_t(RrLine a) throws RrParallelLineException
a
-
RrParallelLineException
public Rr2Point cross_point(RrLine a) throws RrParallelLineException
a
-
RrParallelLineException
public RrInterval wipe(RrLine a, RrInterval range)
a
- range
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |