ProGAL.geom3d.volumes
Class Cylinder

java.lang.Object
  extended by ProGAL.geom3d.volumes.Cylinder
All Implemented Interfaces:
Shape, Volume

public class Cylinder
extends java.lang.Object
implements Volume


Constructor Summary
Cylinder(LineSegment sgm, double r)
           
Cylinder(Point p1, Point p2, double r)
           
 
Method Summary
 Cylinder clone()
          Make a deep clone this volume.
static Cylinder createBoundingCylinder_CovarianceFit(PointList points)
           
 Point getCenter()
          Get the geometric center of the shape.
 double getLength()
           
 double getRadius()
           
 LineSegment getSegment()
           
 double getSurfaceArea()
           
 double getVolume()
          Get the volume.
 boolean inCylinder(Point p)
           
 java.lang.Double intersectionParameter(Line l)
           
static void main(java.lang.String[] args)
           
 boolean overlaps(Volume vol)
          Determine if this volume overlaps vol.
 void setSegment(LineSegment sgm)
           
 void toConsole(int dec)
           
 java.lang.String toString()
           
 java.lang.String toString(int dec)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cylinder

public Cylinder(Point p1,
                Point p2,
                double r)

Cylinder

public Cylinder(LineSegment sgm,
                double r)
Method Detail

getSegment

public LineSegment getSegment()

getLength

public double getLength()

getRadius

public double getRadius()

getVolume

public double getVolume()
Description copied from interface: Volume
Get the volume.

Specified by:
getVolume in interface Volume

getSurfaceArea

public double getSurfaceArea()

setSegment

public void setSegment(LineSegment sgm)

inCylinder

public boolean inCylinder(Point p)

intersectionParameter

public java.lang.Double intersectionParameter(Line l)

main

public static void main(java.lang.String[] args)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(int dec)

toConsole

public void toConsole(int dec)

getCenter

public Point getCenter()
Description copied from interface: Shape
Get the geometric center of the shape. The center of a shape can be interpreted in many ways (center of mass, circumcenter, inscribed center etc.). No strict requirement is given here, but typically the circumcenter should be supplied. This method is most prominently used to find the average center-position of a collection of shapes such that scene-viewers can be centered on the scene.

Specified by:
getCenter in interface Shape

createBoundingCylinder_CovarianceFit

public static Cylinder createBoundingCylinder_CovarianceFit(PointList points)

overlaps

public boolean overlaps(Volume vol)
Description copied from interface: Volume
Determine if this volume overlaps vol. Two volumes overlap if their surfaces touch or if the union of interiors is non-empty.

Specified by:
overlaps in interface Volume

clone

public Cylinder clone()
Description copied from interface: Volume
Make a deep clone this volume.

Specified by:
clone in interface Volume
Overrides:
clone in class java.lang.Object