Public Member Functions | Public Attributes

Box2D Class Reference

Search for all occurrences

Detailed Description

See also:
Class Point2.

Description:
A 2D floating-point box class. This class has methods and operators to clear the box, and update its size (bounding rectangle) by specifying additional points. All methods of this class are implemented by the system.
Data Members:
BOOL empty;

Indicates if the box is empty. When the += operator is used to update the size of the box, if the box is empty, the box corners are set to the point.

Point2 min, max;

The corners of the 2D box.

#include <templt.h>

Inheritance diagram for Box2D:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  Box2D ()
void  SetEmpty ()
CoreExport Box2D operator+= (const Point2 &p)

Public Attributes

BOOL  empty
Point2  min
Point2  max

Constructor & Destructor Documentation

Box2D ( ) [inline]
Remarks:
Constructor. The box is set to empty initially.
{ empty = TRUE; }

Member Function Documentation

void SetEmpty ( ) [inline]
Remarks:
Sets the box to an empty status.
Operators:
{ empty = TRUE; }
CoreExport Box2D& operator+= ( const Point2 p )
Remarks:
Expand this box to include p. If this box is empty, the box corners are set to the point p.
Parameters:
const Point2& p

This box is expanded to include p.

Member Data Documentation

BOOL empty

Box2D Box2D Box2D Box2D Box2D Box2D Box2D Box2D Box2D Box2D
Box2D Box2D Box2D Box2D Box2D Box2D Box2D Box2D Box2D Box2D