public abstract class Polytope extends java.lang.Object implements Shape, java.io.Serializable
Modifier and Type  Field and Description 

protected int 
D 
protected ISpace 
embeddedSpace 
protected Polytope[] 
hyperPlanes 
protected IVectorMutable 
position 
protected IVectorMutable[] 
vertices
These vertices are used in all external representations of the polygon.

Modifier  Constructor and Description 

protected 
Polytope(Polytope[] hyperPlanes)
Constructs a polytope of dimension D from the D1 finite "planes" that
constitute it.

Modifier and Type  Method and Description 

protected void 
applyTranslationRotation()
Calculate transformed vertices from current values of vertices, position,
and orientation.

abstract boolean 
contains(IVector v)
Returns
true if the given vector lies inside the polytope,
false otherwise. 
int 
D()
The dimension of this polytope, which is not necessarily the dimension
of the space it is embedded in.

abstract LineSegment[] 
getEdges() 
ISpace 
getEmbeddedSpace()
The space defining the vectors used to represent the vertices.

IVector 
getPosition()
Returns the geometric center of the polytope.

int 
getVertexCount()
Number of vertices in the polytrope.

IVector[] 
getVertices()
Returns an array of all vertices of the polytrope.

abstract double 
getVolume()
Returns the (hyper)volume enclosed by the polytope.

void 
setPosition(IVector r)
Sets the position of the geometric center of the polytope.

java.lang.String 
toString() 
abstract void 
updateVertices()
This method should be defined by the subclass to calculate the vertices
in accordance with the internal representation of the polytope.

protected final ISpace embeddedSpace
protected final int D
protected final IVectorMutable[] vertices
protected final IVectorMutable position
protected final Polytope[] hyperPlanes
protected Polytope(Polytope[] hyperPlanes)
public abstract void updateVertices()
protected void applyTranslationRotation()
public IVector[] getVertices()
public void setPosition(IVector r)
setPosition
in interface Shape
public IVector getPosition()
public abstract double getVolume()
public abstract boolean contains(IVector v)
true
if the given vector lies inside the polytope,
false
otherwise.public final int getVertexCount()
public ISpace getEmbeddedSpace()
public int D()
public abstract LineSegment[] getEdges()
public java.lang.String toString()
toString
in class java.lang.Object