Drag[en]gine Game Engine  1.0
decBoundary Class Reference

4 Component Boundary for rectangular areas. More...

#include <decBoundary.h>

Public Member Functions

Constructors and Destructors
 decBoundary ()
 
 decBoundary (int nx1, int ny1, int nx2, int ny2)
 
 decBoundary (const decBoundary &b)
 
Management
void OrientateRect ()
 
void OrientateLine ()
 
decPoint MapPoint (const decPoint &pt) const
 
Operators
decBoundaryoperator= (const decBoundary &b)
 

Public Attributes

int x1
 
int x2
 
int y1
 
int y2
 

Detailed Description

4 Component Boundary for rectangular areas.

Author
Pl├╝ss Roland
Version
1.0
Date
2014

Constructor & Destructor Documentation

◆ decBoundary() [1/3]

decBoundary::decBoundary ( )
inline

Creates a new boundary object initialized with all components to 0.

◆ decBoundary() [2/3]

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

Creates a new boundary object with the given values.

◆ decBoundary() [3/3]

decBoundary::decBoundary ( const decBoundary b)
inline

Creates a new boundary object with the values of another boundary object.

References OrientateLine(), OrientateRect(), 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 operator=(), decPoint::x, and decPoint::y.

◆ operator=()

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

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

Referenced by MapPoint().

◆ OrientateLine()

void decBoundary::OrientateLine ( )

Rearranges the 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.

Referenced by decBoundary().

◆ OrientateRect()

void decBoundary::OrientateRect ( )

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

Referenced by decBoundary().

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: