|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.reprap.geometry.polygons.BooleanGrid.iPolygon
class BooleanGrid.iPolygon
Integer-point polygon
Field Summary | |
---|---|
private boolean |
closed
Does the polygon loop back on itself? |
private java.util.List<BooleanGrid.iPoint> |
points
Auto-extending list of points |
Constructor Summary | |
---|---|
BooleanGrid.iPolygon(boolean c)
|
|
BooleanGrid.iPolygon(BooleanGrid.iPolygon a)
Deep copy |
Method Summary | |
---|---|
void |
add(BooleanGrid.iPoint p)
Add a new point on the end |
void |
add(BooleanGrid.iPolygon a)
Add a whole polygon on the end |
private int |
findAngleStart(int v1)
Find the furthest point from point v1 on the polygon such that the polygon between the two can be approximated by a DDA straight line from v1. |
int |
nearest(BooleanGrid.iPoint a,
long tooFar2)
Find the index of the point in the polygon nearest to another point as long as it's less than tooFar2. |
BooleanGrid.iPolygon |
negate()
Negate (i.e. |
BooleanGrid.iPoint |
point(int i)
Return the point at a given index |
RrPolygon |
realPolygon(Attributes a)
Convert the polygon into a polygon in the real world. |
void |
remove(int i)
Delete a point and close the resulting gap |
BooleanGrid.iPolygon |
simplify()
Generate an equivalent polygon with fewer vertices by removing chains of points that lie in straight lines. |
int |
size()
How many points? |
BooleanGrid.iPolygon |
translate(BooleanGrid.iPoint t)
Transtate by vector t |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.List<BooleanGrid.iPoint> points
private boolean closed
Constructor Detail |
---|
public BooleanGrid.iPolygon(boolean c)
public BooleanGrid.iPolygon(BooleanGrid.iPolygon a)
a
- Method Detail |
---|
public BooleanGrid.iPoint point(int i)
i
-
public int size()
public void add(BooleanGrid.iPoint p)
p
- public void add(BooleanGrid.iPolygon a)
a
- public void remove(int i)
i
- public int nearest(BooleanGrid.iPoint a, long tooFar2)
a
- tooFar2
-
public BooleanGrid.iPolygon negate()
public BooleanGrid.iPolygon translate(BooleanGrid.iPoint t)
t
-
private int findAngleStart(int v1)
v1
-
public BooleanGrid.iPolygon simplify()
public RrPolygon realPolygon(Attributes a)
a
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |