Maven module :un.api : api-geometry :
Class : un.impl.geometry.s3d.Capsule
Extends/Implements : un.impl.geometry.AbstractOrientedGeometry un.impl.geometry.s3d.Geometry3D
Subclasses : -

A Capsule is a cylinder with half spheres at each end.
It can be described as a buffer around a line segment.
Also called sphere-swept line.
The capsule rotates around the Y axis.
author  Johann Sorel


Variables : -
Functions : Capsule, Capsule, getHeight, setHeight, getRadius, setRadius, getFirst, getSecond, getVolume, getSurface, getCircumference, getCentroid, getUnorientedBounds



public void Capsule (double height, double radius)

public void Capsule (Tuple first, Tuple second, double radius)

public double getHeight ()

public void setHeight (double height)

public double getRadius ()

public void setRadius (double radius)


Calculate the bottom point of the capsule axis.
Including orientation
return  capsule axis bottom point
public Vector getFirst ()


Calculate the top point of the capsule axis.
Including orientation
return  capsule axis top point
public Vector getSecond ()


Calculate the capsule volume.
return  volume.
public double getVolume ()


Calculate the capsule surface area.
return  area.
public double getSurface ()


Calculate the capsule circumference.
return  circumference.
public double getCircumference ()

public Point getCentroid ()

public BBox getUnorientedBounds ()