Parallelotope, Shapepublic class Parallelogram extends Polygon implements Parallelotope
D, embeddedSpace, hyperPlanes, position, vertices| Constructor | Description |
|---|---|
Parallelogram(Space embeddedSpace) |
Default constructor makes a square of unit size
|
Parallelogram(Space embeddedSpace,
Vector a,
Vector b) |
Constructs a parallelogram with the given edge vectors.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
contains(Vector v) |
Returns
true if the given vector lies inside (or on the
surface of) this cell, false otherwise. |
double |
getArea() |
|
double |
getPerimeter() |
Returns the sum of the length of the edges of the polygon
|
void |
setEdgeVectors(Vector[] edgeVectors) |
Sets the lengths and directions of all edges of the parellelepiped.
|
void |
updateVertices() |
Calculated vertices based on current values of edge vectors.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toStringpublic Parallelogram(Space embeddedSpace)
public double getPerimeter()
PolygongetPerimeter in class Polygonpublic void updateVertices()
updateVertices in class Polytopepublic boolean contains(Vector v)
true if the given vector lies inside (or on the
surface of) this cell, false otherwise.public void setEdgeVectors(Vector[] edgeVectors)
setEdgeVectors in interface Parallelotope