Drag[en]gine Game Engine
1.21
|
4 Component Boundary for rectangular areas. More...
#include <decBoundary.h>
Public Member Functions | |
Constructors and Destructors | |
decBoundary () | |
Create new boundary object initialized with all components to 0. More... | |
decBoundary (int nx1, int ny1, int nx2, int ny2) | |
Create new boundary object with the given values. More... | |
decBoundary (const decBoundary &b) | |
Create new boundary object with the values of another boundary object. More... | |
Management | |
void | OrientateRect () |
Rearranges the coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner. More... | |
void | OrientateLine () |
Rearrange coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner. More... | |
decPoint | MapPoint (const decPoint &pt) const |
Returns the point formed by adding the given point to the top left corner point. More... | |
Operators | |
decBoundary & | operator= (const decBoundary &b) |
Set components of this boundary object to the values of another one. More... | |
Public Attributes | |
int | x1 |
Top Left corner X coordinate. More... | |
int | x2 |
Bottom Right corner X coordinate. More... | |
int | y1 |
Top Left corner Y coordinate. More... | |
int | y2 |
Bottom Right corner Y coordinate. More... | |
4 Component Boundary for rectangular areas.
|
inline |
Create new boundary object initialized with all components to 0.
|
inline |
Create new boundary object with the given values.
|
inline |
Returns the point formed by adding the given point to the top left corner point.
References decPoint::x, and decPoint::y.
decBoundary& decBoundary::operator= | ( | const decBoundary & | b | ) |
Set components of this boundary object to the values of another one.
void decBoundary::OrientateLine | ( | ) |
Rearrange coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner.
This version is designed to oriente a line. The function will though most probably be replaced with something else. You should thus not use it if possible.
void decBoundary::OrientateRect | ( | ) |
Rearranges the coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner.
int decBoundary::x1 |
Top Left corner X coordinate.
Referenced by decBoundary().
int decBoundary::x2 |
Bottom Right corner X coordinate.
Referenced by decBoundary().
int decBoundary::y1 |
Top Left corner Y coordinate.
Referenced by decBoundary().
int decBoundary::y2 |
Bottom Right corner Y coordinate.
Referenced by decBoundary().