Interface IBoundary

All Known Implementing Classes:
BoxBoundary

public interface IBoundary

Interface for boundaries environments for robots. This interface is going to cause a problem, as the methods for storing polygons vs. polyhedra are fundamentally different. A core set of queries can be made which work for any number of dimensions, but some sensors may want access to winged edge representations for 2d or "graph of polygons" representations for 3d boundaries. Also some boundaries may be curved surfaces rather then polytopes. This may be handled by casting to a subtype for 2d boundaries and not worrying about higher dimensionalities, as correct implementation of complex non-convex polyhedral boundaries in 3d is extremely difficult.

Since:
1.0

Method Summary
 double[] bboxMaxCorner()
          gets bounding box max corner
 double[] bboxMinCorner()
          gets bounding box min corner
 double[] closestBoundaryPoint(double[] arrPoint)
          Finds the closest point on the boundary to a given point, or a minimally close point if multiple such points exist.
 double distToBoundary(double[] arrRayOrigin, double[] arrRayDir)
          Finds distance to boundary along a ray from a start point, returns negative number if outside boundary
 int getNumDimensions()
          Mostly just a safety check, since the environment should have this anyway
 boolean isPointInside(double[] arrPoint)
          Inside / outside query.
 

Method Detail

getNumDimensions

int getNumDimensions()
Mostly just a safety check, since the environment should have this anyway


isPointInside

boolean isPointInside(double[] arrPoint)
Inside / outside query.


distToBoundary

double distToBoundary(double[] arrRayOrigin,
                      double[] arrRayDir)
Finds distance to boundary along a ray from a start point, returns negative number if outside boundary

Parameters:
arrRayOrigin - origin of ray
arrRayDir - direction of ray
Returns:
distance along arrRayDir from arrRayOrigin to boundary, negative if arrRayOrigin is outside boundary

closestBoundaryPoint

double[] closestBoundaryPoint(double[] arrPoint)
Finds the closest point on the boundary to a given point, or a minimally close point if multiple such points exist.

Parameters:
arrPoint - point to find closest point to
Returns:
closest point to arrPoint

bboxMinCorner

double[] bboxMinCorner()
gets bounding box min corner

Returns:
min corner of bounding box

bboxMaxCorner

double[] bboxMaxCorner()
gets bounding box max corner

Returns:
max corner of bounding box