gishur.x2.core
Interface Intersectable

All Superinterfaces:
Intersectable
All Known Implementing Classes:
XIntersectableObject

public interface Intersectable
extends Intersectable

This Interface extends gishur.core.geom.Intersectable for the planar X-objects.

Version:
1.0
Author:
Thomas Wolf

Field Summary
static int FACES
          Intersection mode, that allows only faces as return type for intersections
static int POINT_INSIDE
          Point lies inside of the object.
static int POINT_ON_BORDER
          Point lies on the border of the object.
static int POINT_OUTSIDE
          Point lies outside of the object.
static int POINTS
          Intersection mode, that allows only points as return type for intersections
static int POINTS_CURVES
          Intersection mode, that allows only lines and points as return type for intersections
 
Fields inherited from interface gishur.core.geom.Intersectable
DEFAULT
 
Method Summary
 boolean contains(double x, double y)
          Returns true, if the planar object contains the point (x,y), i.e. the intersection with that point is not empty.
 boolean contains(XPoint p)
          Returns true, if the planar object contains the point p, i.e. the intersection with that point is not empty.
 boolean liesOn(XPoint p)
          Returns true if the specified point p lies on the border of this object.
 int locate(XPoint p)
          Locates the specified point.
 
Methods inherited from interface gishur.core.geom.Intersectable
intersection, supportIntersection
 

Field Detail

POINTS

public static final int POINTS
Intersection mode, that allows only points as return type for intersections

POINTS_CURVES

public static final int POINTS_CURVES
Intersection mode, that allows only lines and points as return type for intersections

FACES

public static final int FACES
Intersection mode, that allows only faces as return type for intersections

POINT_INSIDE

public static final int POINT_INSIDE
Point lies inside of the object.

POINT_OUTSIDE

public static final int POINT_OUTSIDE
Point lies outside of the object.

POINT_ON_BORDER

public static final int POINT_ON_BORDER
Point lies on the border of the object.
Method Detail

locate

public int locate(XPoint p)
Locates the specified point. The result is a point location constant (one of {POINT_INSIDE,POINT_OUTSIDE,POINT_ON_BORDER}).
Parameters:
p - point to locate
Returns:
location constant
Throws:
GeomException - p is null

contains

public boolean contains(double x,
                        double y)
Returns true, if the planar object contains the point (x,y), i.e. the intersection with that point is not empty.
Parameters:
x,y - X/Ý-coordinates of the point
Returns:
true, if (x,y) is contained by the object

contains

public boolean contains(XPoint p)
Returns true, if the planar object contains the point p, i.e. the intersection with that point is not empty.
Parameters:
p - the point
Returns:
true, if p is contained by the object
Throws:
GeomException - p is null

liesOn

public boolean liesOn(XPoint p)
Returns true if the specified point p lies on the border of this object.
Parameters:
p - test point
Returns:
True, if p lies on the border of this object.
Throws:
GeomException - p is null