|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.constraints.geost.Shape
public class Shape
| Field Summary | |
|---|---|
DBox |
boundingBox
It specifies the smallest bounding box which encapsulates all boxes constituting the shape. |
java.util.Collection<DBox> |
boxes
The collection of DBoxes that constitute the shape. |
int |
no
It defines unique shape id which is used by geost objects to define their shapes. |
static java.lang.String[] |
xmlAttributes
It specifies the arguments required to be saved by an XML format as well as the constructor being called to recreate an object from an XML format. |
| Constructor Summary | |
|---|---|
Shape(int no,
java.util.Collection<DBox> boxes)
It constructs a shape with a given id based on a specified collection of Dboxes. |
|
Shape(int id,
DBox box)
It constructs a shape from only one DBox. |
|
Shape(int id,
int[] origin,
int[] length)
It constructs a shape with a given id based on a single dbox specified by the origin and length arrays. |
|
| Method Summary | |
|---|---|
int |
area()
It computes the area (2D), volumen (3D) of the shape. |
DBox |
boundingBox()
It returns previously computed bounding box of the shape. |
java.lang.String |
checkInvariants()
It checks whether the shape object is consistent. |
java.util.Collection<DBox> |
components()
It returns the dboxes defining the shape. |
boolean |
containsPoint(int[] point)
It checks whether a given point lies within any of the shapes boxes. |
java.util.Collection<DBox> |
holes()
It returns the set of holes of this shape. |
java.util.Collection<DBox> |
noOverlapRepresentation()
It computes a collection of DBoxes that form the same shape, but that are certain to not overlap This implementation is probably not the most efficient possible representation. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.util.Collection<DBox> boxes
public final DBox boundingBox
public int no
public static java.lang.String[] xmlAttributes
| Constructor Detail |
|---|
public Shape(int no,
java.util.Collection<DBox> boxes)
no - the unique identifier of the created shape.boxes - the collection of boxes constituting the shape.
public Shape(int id,
DBox box)
id - shape unique identifier.box - the single dbox specifying the shape.
public Shape(int id,
int[] origin,
int[] length)
id - the unique identifier of the constructed shape.origin - it specifies the origin of the dbox specifying the shape.length - it specifies the length of the dbox specifying the shape.| Method Detail |
|---|
public java.lang.String checkInvariants()
public java.util.Collection<DBox> components()
public final DBox boundingBox()
public boolean containsPoint(int[] point)
point - the point which containment within a shape is being checked.
public java.util.Collection<DBox> holes()
public java.lang.String toString()
toString in class java.lang.Objectpublic int area()
public java.util.Collection<DBox> noOverlapRepresentation()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||