Class Prism
- java.lang.Object
-
- org.biojava.nbio.structure.symmetry.geometry.Prism
-
- All Implemented Interfaces:
Polyhedron
public class Prism extends Object implements Polyhedron
- Author:
- Peter
-
-
Constructor Summary
Constructors Constructor Description Prism(int n)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetCirumscribedRadius()Returns the radius of a circumscribed sphere, that goes through all verticesdoublegetHeight()doublegetInscribedRadius()Returns the radius of an inscribed sphere, that is tangent to each of the icosahedron's facesList<int[]>getLineLoops()static javax.vecmath.Point3d[]getPolygonVertices(int n, double radius, javax.vecmath.Point3d center)Returns the vertices of an n-fold polygon of given radius and centerjavax.vecmath.Point3d[]getVertices()Returns the vertices of an n-fold polygon of given radius and centerintgetViewCount()javax.vecmath.Matrix3dgetViewMatrix(int index)StringgetViewName(int index)voidsetCirumscribedRadius(double cirumscribedRadius)Set the radius of a circumscribed sphere, that goes through all verticesvoidsetHeight(double height)voidsetInscribedRadius(double radius)Sets the radius of an inscribed sphere, that is tangent to each of the icosahedron's faces
-
-
-
Constructor Detail
-
Prism
public Prism(int n)
-
-
Method Detail
-
getHeight
public double getHeight()
- Returns:
- the height
-
setHeight
public void setHeight(double height)
- Parameters:
height- the height to set
-
getCirumscribedRadius
public double getCirumscribedRadius()
Returns the radius of a circumscribed sphere, that goes through all vertices- Specified by:
getCirumscribedRadiusin interfacePolyhedron- Returns:
- the cirumscribedRadius
-
setCirumscribedRadius
public void setCirumscribedRadius(double cirumscribedRadius)
Set the radius of a circumscribed sphere, that goes through all vertices- Parameters:
cirumscribedRadius- the cirumscribedRadius to set
-
getInscribedRadius
public double getInscribedRadius()
Returns the radius of an inscribed sphere, that is tangent to each of the icosahedron's faces- Returns:
- the inscribedRadius
-
setInscribedRadius
public void setInscribedRadius(double radius)
Sets the radius of an inscribed sphere, that is tangent to each of the icosahedron's faces- Parameters:
inscribedRadius- the inscribedRadius to set
-
getVertices
public javax.vecmath.Point3d[] getVertices()
Returns the vertices of an n-fold polygon of given radius and center- Specified by:
getVerticesin interfacePolyhedron- Returns:
-
getLineLoops
public List<int[]> getLineLoops()
- Specified by:
getLineLoopsin interfacePolyhedron
-
getPolygonVertices
public static javax.vecmath.Point3d[] getPolygonVertices(int n, double radius, javax.vecmath.Point3d center)
Returns the vertices of an n-fold polygon of given radius and center- Returns:
-
getViewCount
public int getViewCount()
- Specified by:
getViewCountin interfacePolyhedron
-
getViewName
public String getViewName(int index)
- Specified by:
getViewNamein interfacePolyhedron
-
getViewMatrix
public javax.vecmath.Matrix3d getViewMatrix(int index)
- Specified by:
getViewMatrixin interfacePolyhedron
-
-