|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object BoxBoundary
public class BoxBoundary
An n-dimensional box, the simplest possible boundary environment for robots.
Nested Class Summary | |
---|---|
class |
BoxBoundary.DimensionMismatchException
Indicates that box boundaries were set with mismatched dimensionality. |
Constructor Summary | |
---|---|
BoxBoundary()
Constructor -- box dimensions specified elsewhere |
|
BoxBoundary(double[] arrLfMin,
double[] arrLfMax)
Constructor -- specifies dimensions and extents of box |
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. |
void |
setFromCenterAndExtents(double[] arrLfCenter,
double[] arrLfExtents)
Sets box boundaries from center and box extents. |
void |
setFromMinMax(double[] arrLfMin,
double[] arrLfMax)
Sets box boundaries from min and max coordinates |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BoxBoundary()
public BoxBoundary(double[] arrLfMin, double[] arrLfMax)
Method Detail |
---|
public double[] bboxMinCorner()
bboxMinCorner
in interface IBoundary
public double[] bboxMaxCorner()
bboxMaxCorner
in interface IBoundary
public int getNumDimensions()
getNumDimensions
in interface IBoundary
public boolean isPointInside(double[] arrPoint)
isPointInside
in interface IBoundary
public double distToBoundary(double[] arrRayOrigin, double[] arrRayDir)
distToBoundary
in interface IBoundary
arrRayOrigin
- origin of rayarrRayDir
- direction of ray
public double[] closestBoundaryPoint(double[] arrPoint)
closestBoundaryPoint
in interface IBoundary
arrPoint
- point to find closest point to
public void setFromMinMax(double[] arrLfMin, double[] arrLfMax)
public void setFromCenterAndExtents(double[] arrLfCenter, double[] arrLfExtents)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |