org.openmali.spatial.bodies
Class ConvexHull

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

public abstract class ConvexHull
extends java.lang.Object
implements Body

Author:
YVG, Marvin Froehlich (aka Qudus)

Field Summary
protected  Plane[] slabs
           
 
Constructor Summary
ConvexHull(Plane[] theSlabs)
           
 
Method Summary
 void combine(Body body)
          Combines this Body with a bounding object.
 void combine(Body[] 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 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.

Specified by:
contains in interface Body
Returns:
true, if it is inside

contains

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

Specified by:
contains in interface Body
Returns:
true, if it is inside

combine

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

Specified by:
combine in interface Body

combine

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

Specified by:
combine in interface Body

combine

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

Specified by:
combine in interface Body

combine

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

Specified by:
combine in interface Body

combine

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

Specified by:
combine in interface Body