rp1.rossum
Class RsPolygon

java.lang.Object
  extended by rp1.rossum.RsPolygon
All Implemented Interfaces:
java.io.Serializable

public class RsPolygon
extends java.lang.Object
implements java.io.Serializable

A representation of a polygon; this class is used by the simulator for collision analysis, placement determination, paint sensing, etc.

See Also:
Serialized Form

Field Summary
 double area
           
 int nSegment
           
 int orientation
           
 RsSegment[] segment
           
 
Constructor Summary
RsPolygon(double[] point, int nPoint)
           
RsPolygon(int nSegment, RsSegment[] segment)
           
 
Method Summary
 int checkContainment(double xTest, double yTest)
           
 int checkContainment(double xTest, double yTest, double proximity)
           
 RsRectangle getBounds()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nSegment

public int nSegment

segment

public RsSegment[] segment

area

public double area

orientation

public int orientation
Constructor Detail

RsPolygon

public RsPolygon(int nSegment,
                 RsSegment[] segment)
          throws RsPolygonException
Throws:
RsPolygonException

RsPolygon

public RsPolygon(double[] point,
                 int nPoint)
          throws RsPolygonException
Throws:
RsPolygonException
Method Detail

checkContainment

public int checkContainment(double xTest,
                            double yTest)

checkContainment

public int checkContainment(double xTest,
                            double yTest,
                            double proximity)

getBounds

public RsRectangle getBounds()