Shape
public class PolygonGeneral extends Polygon
D, embeddedSpace, hyperPlanes, position, vertices
Constructor | Description |
---|---|
PolygonGeneral(LineSegment[] edges) |
|
PolygonGeneral(Space embeddedSpace,
int nSides) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
contains(Vector vector) |
Returns true if the given point lies inside or on an edge of the polygon
|
double |
getArea() |
Returns the value of the area enclosed by the polygon
|
void |
updateVertices() |
This method should be defined by the subclass to calculate the vertices
in accordance with the internal representation of the polytope.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEdges, getPerimeter, getVolume
applyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toString
public PolygonGeneral(Space embeddedSpace, int nSides)
embeddedSpace
- nSides
- public PolygonGeneral(LineSegment[] edges)
edges
- public double getArea()
public boolean contains(Vector vector)
public void updateVertices()
Polytope
updateVertices
in class Polytope