org.jbox2d.collision
Class OBB

java.lang.Object
  extended by org.jbox2d.collision.OBB

public class OBB
extends Object

An oriented bounding box.


Field Summary
 Vec2 center
          The local centroid.
 Vec2 extents
          The half-widths.
 Mat22 R
          The rotation matrix.
 
Constructor Summary
OBB()
           
OBB(Mat22 _R, Vec2 _center, Vec2 _extents)
          creates OBB with the given data.
OBB(OBB copy)
          copies from the given OBB
 
Method Summary
 OBB clone()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

R

public final Mat22 R
The rotation matrix.


center

public final Vec2 center
The local centroid.


extents

public final Vec2 extents
The half-widths.

Constructor Detail

OBB

public OBB(Mat22 _R,
           Vec2 _center,
           Vec2 _extents)
creates OBB with the given data. The arguments are cloned before being placed in the object

Parameters:
_R -
_center -
_extents -

OBB

public OBB(OBB copy)
copies from the given OBB

Parameters:
copy -

OBB

public OBB()
Method Detail

clone

public OBB clone()
Overrides:
clone in class Object
Returns:
a copy