org.jbox2d.util.blob
Class CircularBlobContainer

java.lang.Object
  extended by org.jbox2d.util.blob.CircularBlobContainer
All Implemented Interfaces:
BlobContainer

public class CircularBlobContainer
extends Object
implements BlobContainer

A circular blob container specified by radius and center.


Constructor Summary
CircularBlobContainer(Vec2 _center, float _radius)
           
 
Method Summary
 boolean containsPoint(Vec2 p)
          Is the Vec2 within the desired geometry?
 AABB getAABB()
          Get the world AABB of the container.
 Vec2 getCenter()
           
 float getRadius()
           
 void setCenter(Vec2 c)
           
 void setRadius(float r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircularBlobContainer

public CircularBlobContainer(Vec2 _center,
                             float _radius)
Method Detail

getRadius

public float getRadius()

setRadius

public void setRadius(float r)

getCenter

public Vec2 getCenter()

setCenter

public void setCenter(Vec2 c)

containsPoint

public boolean containsPoint(Vec2 p)
Description copied from interface: BlobContainer
Is the Vec2 within the desired geometry?

Specified by:
containsPoint in interface BlobContainer
Parameters:
p - The point to test
Returns:
True if the geometry contains the point

getAABB

public AABB getAABB()
Description copied from interface: BlobContainer
Get the world AABB of the container.

Specified by:
getAABB in interface BlobContainer