| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes
TeBox Struct Reference

Provides support for dealing with a rectangular a box. Used by all geometrical representations. More...

`#include <TeBox.h>`

List of all members.

## Public Types

enum | TeBoxCorner { TeLOWERLEFT = 0, TeUPPERLEFT = 1, TeLOWERRIGHT = 2, TeUPPERRIGHT = 3 }

## Public Member Functions

| TeBox (const double &x1=TeMAXFLOAT, const double y1=TeMAXFLOAT, const double &x2=-TeMAXFLOAT, const double y2=-TeMAXFLOAT)
| Default constructor.
| TeBox (const TeCoord2D &p1, const TeCoord2D &p2)
| Constructor from corners as TeCoord2D objects.
| TeBox (const TeBox &rhs)
| Copy constructor.
TeBox & | operator= (const TeBox &rhs)
| Operator =.
bool | operator== (const TeBox &box) const
| Returns TRUE if current TeBox is equal to box; otherwise returns FALSE.
bool | operator!= (const TeBox &box) const
| Returns FALSE if current TeBox is equal to box; otherwise returns TRUE.
TeCoord2D | center () const
| Returns the coordinate corresponding to the geometric center of the box.
bool | isValid () const
| Returns TRUE if current box is valid; otherwise returns FALSE.
const double & | x1 () const
| Returns the x component of the lower left corner.
const double & | y1 () const
| Returns the y component of the lower left corner.
const double & | x2 () const
| Returns the x component of the upper right corner.
const double & | y2 () const
| Returns the y component of the upper right corner.
double | width () const
| Returns the box width.
double | height () const
| Returns the box height.
TeCoord2D | lowerLeft () const
| Returns the lower left coordinate of the box.
TeCoord2D | upperRight () const
| Returns the upper right coordinate of the box.
| ~TeBox ()
| Destructor.

## Public Attributes

double | x1_
| x coordinate of the lower left corner
double | y1_
| y coordinate of the lower left corner
double | x2_
| x coordinate of the upper right corner
double | y2_
| y coordinate of the upper right corner

## Detailed Description

Provides support for dealing with a rectangular a box. Used by all geometrical representations.

See also:
  TeCoord2D

Examples:

  databaseQuery.cpp, databaseSQLQuery.cpp, importGeoTab.cpp, importMIDMIF.cpp, importShape.cpp, querierWithSpatialRestBox.cpp, TePDIBlender_test.cpp, TePDICorrelationMatching_test.cpp, TePDIHaralick_test.cpp, TePDIHistogram_test.cpp, TePDIMIMatching_test.cpp, TePDIMMIOMatching_test.cpp, TePDIOFMatching_test.cpp, and TePDIStatistic_test.cpp.

## Member Enumeration Documentation

enum TeBox::TeBoxCorner

Enumerator:

  TeLOWERLEFT |
  TeUPPERLEFT |
  TeLOWERRIGHT |
  TeUPPERRIGHT |

## Constructor & Destructor Documentation

TeBox::TeBox | ( | const double & | x1 = `TeMAXFLOAT`,
|  | const double | y1 = `TeMAXFLOAT`,
|  | const double & | x2 = `-TeMAXFLOAT`,
|  | const double | y2 = `-TeMAXFLOAT`
| ) |  | `[inline]`

Default constructor.

Parameters:

  x1 | X value of the lower left box coordinate
  y1 | Y value of the lower left box coordinate
  x2 | X value of the upper right box coordinate
  y2 | Y value of the upper right box coordinate

TeBox::TeBox | ( | const TeCoord2D & | p1,
|  | const TeCoord2D & | p2
| ) |  | `[inline]`

Constructor from corners as TeCoord2D objects.

Parameters:

  p1 | lower left box coordinate
  p2 | upper right box coordinate

TeBox::TeBox | ( | const TeBox & | rhs | ) | `[inline]`

Copy constructor.

TeBox::~TeBox | ( |  | ) | `[inline]`

Destructor.

## Member Function Documentation

TeCoord2D TeBox::center | ( |  | ) | const`[inline]`

Returns the coordinate corresponding to the geometric center of the box.

double TeBox::height | ( |  | ) | const`[inline]`

Returns the box height.

bool TeBox::isValid | ( |  | ) | const`[inline]`

Returns TRUE if current box is valid; otherwise returns FALSE.

TeCoord2D TeBox::lowerLeft | ( |  | ) | const`[inline]`

Returns the lower left coordinate of the box.

bool TeBox::operator!= | ( | const TeBox & | box | ) | const`[inline]`

Returns FALSE if current TeBox is equal to box; otherwise returns TRUE.

TeBox& TeBox::operator= | ( | const TeBox & | rhs | ) | `[inline]`

Operator =.

bool TeBox::operator== | ( | const TeBox & | box | ) | const`[inline]`

Returns TRUE if current TeBox is equal to box; otherwise returns FALSE.

TeCoord2D TeBox::upperRight | ( |  | ) | const`[inline]`

Returns the upper right coordinate of the box.

double TeBox::width | ( |  | ) | const`[inline]`

Returns the box width.

const double& TeBox::x1 | ( |  | ) | const`[inline]`

Returns the x component of the lower left corner.

Examples:
  TePDIBlender_test.cpp.

const double& TeBox::x2 | ( |  | ) | const`[inline]`

Returns the x component of the upper right corner.

Examples:
  TePDIBlender_test.cpp.

const double& TeBox::y1 | ( |  | ) | const`[inline]`

Returns the y component of the lower left corner.

Examples:
  TePDIBlender_test.cpp.

const double& TeBox::y2 | ( |  | ) | const`[inline]`

Returns the y component of the upper right corner.

Examples:
  TePDIBlender_test.cpp.

## Member Data Documentation

double TeBox::x1_

x coordinate of the lower left corner

Examples:
  importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

double TeBox::x2_

x coordinate of the upper right corner

Examples:
  importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

double TeBox::y1_

y coordinate of the lower left corner

Examples:
  importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

double TeBox::y2_

y coordinate of the upper right corner

Examples:
  importGeoTab.cpp, importMIDMIF.cpp, and importShape.cpp.

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeBox.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines