|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.utils.math.Polygon3D
public class Polygon3D
Field Summary | |
---|---|
double[] |
max
contains maximums from vertices x, y ... indexed 0 == X, 1 == Y |
double[] |
min
contains minimums from vertices x, y ... indexed 0 == X, 1 == Y |
protected Plane3D |
plane
|
java.util.ArrayList |
vertices
List of polygon's vertices. |
Constructor Summary | |
---|---|
Polygon3D()
|
|
Polygon3D(java.util.AbstractList iVertices)
|
|
Polygon3D(java.util.ArrayList iVertices)
|
|
Polygon3D(Polygon3D p)
|
|
Polygon3D(Vertex3D[] iVertices)
|
|
Polygon3D(Vertex3D[] iVertices,
Tuple3D normal)
|
Method Summary | |
---|---|
void |
add(Vertex3D v)
|
void |
deleteColinear()
Deletes collinear points from polygon. |
void |
deleteColinear(double precision)
Deletes collinear points from polygon. |
Vertex3D |
get(int index)
|
Vertex3D |
getCircular(int index)
|
int |
getCircularIndex(int index)
|
Tuple3D |
getEstimatedMiddlePoint()
"Guess" the inner point ... average of all vertices |
Tuple3D |
getNormal()
Returns normal of property 'plane'. |
Plane3D |
getPlane()
Returns property 'plane'. |
protected void |
checkAddMinMax(Vertex3D v)
Is called when new vertex was added into polygon to check the min / max properties. |
protected void |
checkRemoveMinMax(Vertex3D v)
Is called when vertex has been removed from polygon. |
protected void |
recountMinMax()
Recount min / max properties. |
boolean |
recountPlane()
Recounts plane equation, taking first three vertices from property 'vertices'. |
boolean |
recountPlane(Tuple3D normal)
Recounts plane equation using normal provided. |
Vertex3D |
remove(int index)
|
boolean |
remove(Vertex3D v)
|
int |
size()
|
void |
swapVertex(int index,
Vertex3D newVertex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.ArrayList vertices
protected Plane3D plane
public double[] min
public double[] max
Constructor Detail |
---|
public Polygon3D()
public Polygon3D(Vertex3D[] iVertices)
public Polygon3D(Vertex3D[] iVertices, Tuple3D normal)
public Polygon3D(java.util.AbstractList iVertices)
public Polygon3D(java.util.ArrayList iVertices)
public Polygon3D(Polygon3D p)
Method Detail |
---|
protected void checkAddMinMax(Vertex3D v)
v
- protected void checkRemoveMinMax(Vertex3D v)
v
- protected void recountMinMax()
public void add(Vertex3D v)
public int size()
public Vertex3D get(int index)
public void swapVertex(int index, Vertex3D newVertex)
public int getCircularIndex(int index)
public Vertex3D getCircular(int index)
public Vertex3D remove(int index)
public boolean remove(Vertex3D v)
public boolean recountPlane()
public boolean recountPlane(Tuple3D normal)
public Plane3D getPlane()
public Tuple3D getNormal()
public void deleteColinear()
public void deleteColinear(double precision)
public Tuple3D getEstimatedMiddlePoint()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |