21 class CoordinateFrame;
82 float x = p.
dot(m_axisin[0]);
83 float y = p.
dot(m_axisin[1]);
86 return (
abs(x) <= 0.5f) && (
abs(y) <= 0.5f);
class Rect2D AABox2D
Definition: Box2D.h:24
Vector2 m_corner[4]
Definition: Box2D.h:33
Vector2 m_axisin[2]
Definition: Box2D.h:37
Vector2 m_extent
Definition: Box2D.h:51
A rigid body RT (rotation-translation) transformation.
Definition: CoordinateFrame.h:59
double abs(double fValue)
Definition: g3dmath.h:617
bool overlaps1Way(const Box2D &other) const
Definition: Box2D.cpp:17
float area() const
Surface area.
Definition: Box2D.h:101
const Vector2 & axis(int a) const
Unit length vector along axis a.
Definition: Box2D.h:95
class CoordinateFrame CFrame
Definition: Box2D.h:22
const Vector2 & extent() const
Distance from corner(0) to the next corner along the box's local axis a.
Definition: Box2D.h:90
T max(const T &x, const T &y)
Definition: g3dmath.h:320
bool overlaps(const Box2D &other) const
Definition: Box2D.h:115
Vector2 m_center
Definition: Box2D.h:43
T min(const T &x, const T &y)
Definition: g3dmath.h:305
const Vector2 & corner(int i) const
Definition: Box2D.h:105
void computeAxes()
Definition: Box2D.cpp:52
#define debugAssert(exp)
Definition: debugAssert.h:160
bool contains(const Vector2 &v) const
Definition: Box2D.h:79
float origin[2]
Definition: Box2D.h:46
G3D::int16 y
Definition: Vector2int16.h:38
Box2D(const Vector2 ¢er=Vector2(0, 0), float w=0, float h=0, float angle=0)
Definition: Box2D.cpp:75
Vector2 m_axis[2]
Definition: Box2D.h:40
G3D::int16 x
Definition: Vector2int16.h:37
const Vector2 & center() const
Definition: Box2D.h:110
float m_area
Definition: Box2D.h:49
float dot(const Vector2 &s) const
Definition: Vector2.h:446