org.openmali.spatial.bodies
Class ConvexHull

java.lang.Object
  extended by org.openmali.spatial.bodies.Body
      extended by org.openmali.spatial.bodies.ConvexHull
All Implemented Interfaces:
BodyInterface
Direct Known Subclasses:
BoundingPolytope

public abstract class ConvexHull
extends Body


Field Summary
protected  Plane[] slabs
           
 
Fields inherited from class org.openmali.spatial.bodies.Body
centerX, centerY, centerZ, distComputed, maxCenterDist, maxCenterDistSquared
 
Constructor Summary
ConvexHull(Plane[] theSlabs)
           
 
Method Summary
 void combine(BodyInterface body)
          Combines this Body with a bounding object.
 void combine(BodyInterface[] bos)
          Combines this Body with an array of bounding objects.
 void combine(float px, float py, float pz)
          Combines this Body with a point.
 void combine(Point3f point)
          Combines this Body with a point.
 void combine(Point3f[] points)
          Combine this Body with an array of points.
 boolean contains(float px, float py, float pz)
          Tests, if the given point is inside of this Body.
 boolean contains(Point3f point)
          Tests, if the given point is inside of this Body.
 boolean intersect(Point3f point)
          test for intersection with a point
 
Methods inherited from class org.openmali.spatial.bodies.Body
getCenter, getCenterX, getCenterY, getCenterZ, getMaxCenterDistance, getMaxCenterDistanceSquared, setCenter, setCenter, setMaxCenterDistanceSquared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

slabs

protected Plane[] slabs
Constructor Detail

ConvexHull

public ConvexHull(Plane[] theSlabs)
Method Detail

intersect

public boolean intersect(Point3f point)
test for intersection with a point


contains

public boolean contains(float px,
                        float py,
                        float pz)
Tests, if the given point is inside of this Body.

Returns:
true, if it is inside

contains

public boolean contains(Point3f point)
Tests, if the given point is inside of this Body.

Returns:
true, if it is inside

combine

public void combine(BodyInterface body)
Combines this Body with a bounding object.


combine

public void combine(BodyInterface[] bos)
Combines this Body with an array of bounding objects.


combine

public void combine(float px,
                    float py,
                    float pz)
Combines this Body with a point.


combine

public void combine(Point3f point)
Combines this Body with a point.


combine

public void combine(Point3f[] points)
Combine this Body with an array of points.