maspack.render
Class ConvexPoly2d
java.lang.Object
maspack.render.ConvexPoly2d
public class ConvexPoly2d
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getTolerance
public double getTolerance()
setTolerance
public void setTolerance(double tol)
clear
public void clear()
addVertex
public ConvexPoly2d.Vertex2d addVertex(double x,
double y)
addVertex
public ConvexPoly2d.Vertex2d addVertex(Point2d p)
firstVertex
public ConvexPoly2d.Vertex2d firstVertex()
removeVertex
public void removeVertex(ConvexPoly2d.Vertex2d v)
isEmpty
public boolean isEmpty()
numVertices
public int numVertices()
intersectHalfPlane
public void intersectHalfPlane(double nx,
double ny,
double d)
- Intersects this convex polygon with a half plane defined by
n^T x - d >= 0
.
epsilonEquals
public boolean epsilonEquals(ConvexPoly2d poly,
double eps)
transform
public void transform(AffineTransform2dBase T)
computeCentroid
public void computeCentroid(Vector2d cent)
toString
public java.lang.String toString(java.lang.String fmtStr)