C4 Engine
C4 Engine API Documentation

class Box2D

Defined in:  TSBox.h
The Box2D class encapsulates a 2D aligned bounding box.
Definition

class Box2D : public Range<Point2D>

Member Functions
Box2D::Calculate Calculates a bounding box for a set of 2D vertices.
Box2D::Contains Returns a boolean value indicating whether an aligned box contains a point.
Box2D::Intersection Returns a boolean value indicating whether two aligned boxes intersect.
Constructor

Box2D(const Point2D& pmin, const Point2D& pmax);

Parameters
pmin The point at the minimum corner of the bounding box.
pmax The point at the maximum corner of the bounding box.
Description
The Box2D class encapsulates the 2D aligned bounding box whose minimum and maximum extents are specified by the pmin and pmax parameters.
Base Classes
Range<Point2D> An aligned box is implemented as a range of points.
See Also

Box3D