Parallelotope, Shapepublic class Parallelepiped extends Hexahedron implements Parallelotope
edges, facesD, embeddedSpace, hyperPlanes, position, vertices| Constructor | Description |
|---|---|
Parallelepiped(Space embeddedSpace) |
Default constructor makes a cube of unit size
|
Parallelepiped(Space embeddedSpace,
Vector a,
Vector b,
Vector c) |
Constructs a parallelepiped 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 |
getPerimeter() |
Returns the sum of the length of the edges of the polyhedron
|
double |
getSurfaceArea() |
Returns the sum the area of the faces of the polyhedron
|
double |
getVolume() |
Calculated parallelepiped volume using (a X b) .
|
void |
setEdgeVectors(Vector[] vectors) |
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, waitdistanceTo, getEdges, getFacesapplyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toStringpublic Parallelepiped(Space embeddedSpace)
public double getVolume()
public double getSurfaceArea()
PolyhedrongetSurfaceArea in class Polyhedronpublic double getPerimeter()
PolyhedrongetPerimeter in class Polyhedronpublic 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[] vectors)
setEdgeVectors in interface Parallelotope