Public Attributes

decBoundary Class Reference

4 Component Boundary for rectangular areas. More...

#include <decBoundary.h>

List of all members.

Public Member Functions

Constructors and Destructors
 decBoundary ()
 Creates a new boundary object initialized with all components to 0.
 decBoundary (int nx1, int ny1, int nx2, int ny2)
 Creates a new boundary object with the given values.
 decBoundary (const decBoundary &b)
 Creates a new boundary object with the values of another boundary object.
Management
void OrientateRect ()
 Rearranges the coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner.
void OrientateLine ()
 Rearranges the coordinates so that x1/y1 are the top left corner and x2/y2 the bottom right corner.
decPoint MapPoint (const decPoint &pt) const
 Returns the point formed by adding the given point to the top left corner point.
Operators
decBoundaryoperator= (const decBoundary &b)
 Sets the components of this boundary object to the values of another one.

Public Attributes

int x1
 Top Left corner X coordinate.
int x2
 Bottom Right corner X coordinate.
int y1
 Top Left corner Y coordinate.
int y2
 Bottom Right corner Y coordinate.

Detailed Description

4 Component Boundary for rectangular areas.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

decBoundary::decBoundary (  ) [inline]

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

References x1, x2, y1, and y2.

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

Creates a new boundary object with the given values.

References x1, x2, y1, and y2.

decBoundary::decBoundary ( const decBoundary b ) [inline]

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

References x1, x2, y1, and y2.


Member Function Documentation

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, x1, decPoint::y, and y1.

decBoundary& decBoundary::operator= ( const decBoundary b ) [inline]

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

References x1, x2, y1, and y2.

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.

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

Top Left corner X coordinate.

Referenced by decBoundary(), MapPoint(), and operator=().

Bottom Right corner X coordinate.

Referenced by decBoundary(), and operator=().

Top Left corner Y coordinate.

Referenced by decBoundary(), MapPoint(), and operator=().

Bottom Right corner Y coordinate.

Referenced by decBoundary(), and operator=().


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