Rectangular, Shapepublic class Cuboid extends Hexahedron implements Rectangular
edges, facesD, embeddedSpace, hyperPlanes, position, vertices| Constructor | Description |
|---|---|
Cuboid(Space embeddedSpace) |
Constructs a cuboid with equal faces of unit size (a cube).
|
Cuboid(Space embeddedSpace,
double a,
double b,
double c) |
Constructs a cuboid with edges of lengths having the given values.
|
| 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. |
Vector |
getEdgeLengths() |
Returns a vector with elements equal to the
edge lengths of the cuboid.
|
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() |
Returns the (hyper)volume enclosed by the polytope.
|
void |
setEdgeLengths(double a,
double b,
double c) |
Sets the lengths of all edges of the cuboid.
|
void |
setEdgeLengths(Vector e) |
Sets the three edge lengths of the cuboid, taking
each element of the given vector for the length of
the corresponding cuboid edge.
|
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, waitdistanceTo, getEdges, getFacesapplyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toStringpublic Cuboid(Space embeddedSpace)
public Cuboid(Space embeddedSpace, double a, double b, double c)
public double getVolume()
Polytopepublic double getSurfaceArea()
PolyhedrongetSurfaceArea in class Polyhedronpublic double getPerimeter()
PolyhedrongetPerimeter in class Polyhedronpublic void updateVertices()
PolytopeupdateVertices 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 setEdgeLengths(Vector e)
setEdgeLengths in interface Rectangularpublic Vector getEdgeLengths()
getEdgeLengths in interface Rectangularpublic void setEdgeLengths(double a,
double b,
double c)