Rectangular
, Shape
public class Cuboid extends Hexahedron implements Rectangular
edges, faces
D, 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, wait
distanceTo, getEdges, getFaces
applyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toString
public Cuboid(Space embeddedSpace)
public Cuboid(Space embeddedSpace, double a, double b, double c)
public double getVolume()
Polytope
public double getSurfaceArea()
Polyhedron
getSurfaceArea
in class Polyhedron
public double getPerimeter()
Polyhedron
getPerimeter
in class Polyhedron
public void updateVertices()
Polytope
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 setEdgeLengths(Vector e)
setEdgeLengths
in interface Rectangular
public Vector getEdgeLengths()
getEdgeLengths
in interface Rectangular
public void setEdgeLengths(double a, double b, double c)