Drag[en]gine Game Engine  1.21
decBoundary Class Reference

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
decBoundaryoperator= (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...
 

Detailed Description

4 Component Boundary for rectangular areas.

Constructor & Destructor Documentation

◆ decBoundary() [1/3]

decBoundary::decBoundary ( )
inline

Create new boundary object initialized with all components to 0.

◆ decBoundary() [2/3]

decBoundary::decBoundary ( int  nx1,
int  ny1,
int  nx2,
int  ny2 
)
inline

Create new boundary object with the given values.

◆ decBoundary() [3/3]

decBoundary::decBoundary ( const decBoundary b)
inline

Create new boundary object with the values of another boundary object.

References x1, x2, y1, and y2.

Member Function Documentation

◆ MapPoint()

decPoint decBoundary::MapPoint ( const decPoint pt) const
inline

Returns the point formed by adding the given point to the top left corner point.

References decPoint::x, and decPoint::y.

◆ operator=()

decBoundary& decBoundary::operator= ( const decBoundary b)

Set components of this boundary object to the values of another one.

◆ OrientateLine()

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.

◆ OrientateRect()

void decBoundary::OrientateRect ( )

Rearranges the coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner.

Member Data Documentation

◆ x1

int decBoundary::x1

Top Left corner X coordinate.

Referenced by decBoundary().

◆ x2

int decBoundary::x2

Bottom Right corner X coordinate.

Referenced by decBoundary().

◆ y1

int decBoundary::y1

Top Left corner Y coordinate.

Referenced by decBoundary().

◆ y2

int decBoundary::y2

Bottom Right corner Y coordinate.

Referenced by decBoundary().


The documentation for this class was generated from the following file: