Parallelotope
, Shape
public class Parallelepiped extends Hexahedron implements Parallelotope
edges, faces
D, 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, wait
distanceTo, getEdges, getFaces
applyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toString
public Parallelepiped(Space embeddedSpace)
public double getVolume()
public double getSurfaceArea()
Polyhedron
getSurfaceArea
in class Polyhedron
public double getPerimeter()
Polyhedron
getPerimeter
in class Polyhedron
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[] vectors)
setEdgeVectors
in interface Parallelotope