Class RectangularPrism

  • All Implemented Interfaces:
    Polyhedron

    public class RectangularPrism
    extends java.lang.Object
    implements Polyhedron
    • Constructor Summary

      Constructors 
      Constructor Description
      RectangularPrism​(double length, double width, double height)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getCirumscribedRadius()
      Returns the radius of a circumscribed sphere (length of diagonal of rectangular prism/2, that goes through at least four vertices
      double getHeight()
      Returns the radius of a sphere, that is tangent to each of the octahedron's edges
      double getLength()
      Returns the radius of a circumscribed sphere, that goes through all vertices
      java.util.List<int[]> getLineLoops()  
      javax.vecmath.Point3d[] getVertices()
      Returns the vertices of an n-fold polygon of given radius and center
      int getViewCount()  
      javax.vecmath.Matrix3d getViewMatrix​(int index)  
      java.lang.String getViewName​(int index)  
      double getWidth()
      Returns the radius of an inscribed sphere, that is tangent to each of the octahedron's faces
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RectangularPrism

        public RectangularPrism​(double length,
                                double width,
                                double height)
    • Method Detail

      • getLength

        public double getLength()
        Returns the radius of a circumscribed sphere, that goes through all vertices
        Returns:
        the cirumscribedRadius
      • getWidth

        public double getWidth()
        Returns the radius of an inscribed sphere, that is tangent to each of the octahedron's faces
        Returns:
        the inscribedRadius
      • getHeight

        public double getHeight()
        Returns the radius of a sphere, that is tangent to each of the octahedron's edges
        Returns:
        the midRadius
      • getCirumscribedRadius

        public double getCirumscribedRadius()
        Returns the radius of a circumscribed sphere (length of diagonal of rectangular prism/2, that goes through at least four vertices
        Specified by:
        getCirumscribedRadius in interface Polyhedron
        Returns:
        the cirumscribedRadius
      • getVertices

        public javax.vecmath.Point3d[] getVertices()
        Returns the vertices of an n-fold polygon of given radius and center
        Specified by:
        getVertices in interface Polyhedron
        Parameters:
        n -
        radius -
        center -
        Returns:
      • getLineLoops

        public java.util.List<int[]> getLineLoops()
        Specified by:
        getLineLoops in interface Polyhedron
      • getViewName

        public java.lang.String getViewName​(int index)
        Specified by:
        getViewName in interface Polyhedron
      • getViewMatrix

        public javax.vecmath.Matrix3d getViewMatrix​(int index)
        Specified by:
        getViewMatrix in interface Polyhedron