|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.rps.Region
@Immutable public class Region
Represent a region in space for the RPS system.
The region is specfied by a right-handed set of points.
Regions are immutable once created.
This initial implementation of a Region is inherently 2-dimensional, deferring use of the 3rd (Z) dimension to a later implementation. It uses a Java2D GeneralPath to handle the inside/outside calculations.
| Constructor Summary | |
|---|---|
Region(Point3d[] points)
|
|
Region(String s)
Ctor from a string like "(0,0,0);(1,0,0);(1,1,0);(0,1,0)" |
|
| Method Summary | |
|---|---|
boolean |
equals(Object ro)
|
Shape |
getPath()
Provide Java2D access to the shape of this region. |
int |
hashCode()
|
boolean |
isInside(Point3d p)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Region(Point3d[] points)
public Region(String s)
| Method Detail |
|---|
public Shape getPath()
This should provide a copy of the GeneralPath path, to keep the underlying object immutable, but by returning a Shape type hopefully we achieve the same result with a little better performance. Please don't assume you can cast and modify this.
public String toString()
toString in class Objectpublic boolean isInside(Point3d p)
public boolean equals(Object ro)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||