Shape
public class TruncatedOctahedron extends Polyhedron
edges, faces
D, embeddedSpace, hyperPlanes, position, vertices
Constructor | Description |
---|---|
TruncatedOctahedron(Space embeddedSpace) |
Constructs a truncated octahedron with vertices defined in the embedded
space and with unit edge lengths.
|
TruncatedOctahedron(Space embeddedSpace,
double edgeLength) |
Constructs a truncated octahedron with vertices defined in the embedded
space and with edge lengths equal to the given value.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
contains(Vector v) |
Returns
true if the given vector lies inside the polytope,
false otherwise. |
double |
getContainingCubeEdgeLength() |
Returns the length of an edge of a cube in which the truncated octahedron
is inscribed.
|
double |
getEdgeLength() |
|
double |
getVolume() |
Returns the (hyper)volume enclosed by the polytope.
|
void |
setContainingCubeEdgeLength(double length) |
Sets the size of the truncated octahedron in terms of the edge length of
a cube that would contain it.
|
void |
setEdgeLength(double edgeLength) |
Specifies the common length of all edges of the truncated octahedron.
|
void |
updateVertices() |
The following defines the vertices that the truncated octahedron will
have, based on Vector3D.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
distanceTo, getEdges, getFaces, getPerimeter, getSurfaceArea
applyTranslationRotation, D, getEmbeddedSpace, getPosition, getVertexCount, getVertices, setPosition, toString
public TruncatedOctahedron(Space embeddedSpace)
public TruncatedOctahedron(Space embeddedSpace, double edgeLength)
public double getEdgeLength()
public void setEdgeLength(double edgeLength)
edgeLength
- the new length of all edgespublic double getContainingCubeEdgeLength()
public void setContainingCubeEdgeLength(double length)
public void updateVertices()
updateVertices
in class Polytope
public boolean contains(Vector v)
Polytope
true
if the given vector lies inside the polytope,
false
otherwise.public double getVolume()
Polytope