maspack.render
Class ConvexPoly2d

java.lang.Object
  extended by maspack.render.ConvexPoly2d

public class ConvexPoly2d
extends java.lang.Object


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

Method Detail

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)