Parallelotope
, Shape
public 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, wait
applyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toString
public Parallelogram(Space embeddedSpace)
public double getPerimeter()
Polygon
getPerimeter
in class Polygon
public void updateVertices()
updateVertices
in class Polytope
public 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