TerraLib 4.1
TeCoord2D Class Reference

A class for handling 2D coordinates. More...

#include <TeCoord2D.h>

List of all members.

Public Member Functions

 TeCoord2D (const double &x=0., const double &y=0.)
 Default contructor.
 TeCoord2D (const TeCoord2D &cd)
 Copy constructor.
TeCoord2Doperator= (const TeCoord2D &cd)
 Operator =.
 ~TeCoord2D ()
 Empty destructor.
const double & x () const
 Returns the X componente of the coordinate.
void x (const double &valX)
 Sets the X componente of the coordinate.
const double & y () const
 Returns the Y componente of the coordinate.
void y (const double &valY)
 Sets the Y componente of the coordinate.
void setXY (const double &xVal, const double &yVal)
 Sets the X and Y componentes of the coordinate.
void operator+= (const TeCoord2D &cd)
 Adds two coordinates.
bool operator<= (const TeCoord2D &cd) const
 Returns TRUE if current coordinate is smaller than or equal to TeCoord2D cd; returns FALSE otherwise.
bool operator== (const TeCoord2D &cd) const
 Returns TRUE if current coordinate is equal to TeCoord2D cd; returns FALSE otherwise.
bool operator!= (const TeCoord2D &cd) const
 Returns TRUE if current coordinate is not equal to TeCoord2D cd; returns FALSE otherwise.
bool operator< (const TeCoord2D &cd) const
 Returns TRUE if current coordinate is smaller than TeCoord2D cd; returns FALSE otherwise.
bool tooBig ()
 Returns TRUE if current coordinate greater than maximum allowed; returns FALSE otherwise.
void scale (const double xscale, const double yscale)
 Rescales the coordinate by a value in X (xscale) and in Y (yscale)
TeCoord2D halfWayHoriz (TeCoord2D &rhs)
 Returns the middle coordinate in horizontal direction between current coordinate and rhs.
TeCoord2D halfWayVert (TeCoord2D &rhs)
 Returns the middle coordinate in vertical direction between current coordinate and rhs.
void objectId (const string &)
 A false interface to set an obejct identifier.

Public Attributes

double x_
 x coordinate
double y_
 y coordinate

Detailed Description


Constructor & Destructor Documentation

TeCoord2D::TeCoord2D ( const double &  x = 0.,
const double &  y = 0. 
) [inline]

Default contructor.

TeCoord2D::TeCoord2D ( const TeCoord2D cd) [inline]

Copy constructor.

TeCoord2D::~TeCoord2D ( ) [inline]

Empty destructor.


Member Function Documentation

TeCoord2D TeCoord2D::halfWayHoriz ( TeCoord2D rhs) [inline]

Returns the middle coordinate in horizontal direction between current coordinate and rhs.

TeCoord2D TeCoord2D::halfWayVert ( TeCoord2D rhs) [inline]

Returns the middle coordinate in vertical direction between current coordinate and rhs.

void TeCoord2D::objectId ( const string ) [inline]

A false interface to set an obejct identifier.

bool TeCoord2D::operator!= ( const TeCoord2D cd) const [inline]

Returns TRUE if current coordinate is not equal to TeCoord2D cd; returns FALSE otherwise.

void TeCoord2D::operator+= ( const TeCoord2D cd) [inline]

Adds two coordinates.

bool TeCoord2D::operator< ( const TeCoord2D cd) const [inline]

Returns TRUE if current coordinate is smaller than TeCoord2D cd; returns FALSE otherwise.

bool TeCoord2D::operator<= ( const TeCoord2D cd) const [inline]

Returns TRUE if current coordinate is smaller than or equal to TeCoord2D cd; returns FALSE otherwise.

TeCoord2D& TeCoord2D::operator= ( const TeCoord2D cd) [inline]

Operator =.

bool TeCoord2D::operator== ( const TeCoord2D cd) const [inline]

Returns TRUE if current coordinate is equal to TeCoord2D cd; returns FALSE otherwise.

void TeCoord2D::scale ( const double  xscale,
const double  yscale 
) [inline]

Rescales the coordinate by a value in X (xscale) and in Y (yscale)

void TeCoord2D::setXY ( const double &  xVal,
const double &  yVal 
) [inline]

Sets the X and Y componentes of the coordinate.

Examples:
TePDIBlender_test.cpp, and TePDIMosaic_test.cpp.
bool TeCoord2D::tooBig ( ) [inline]

Returns TRUE if current coordinate greater than maximum allowed; returns FALSE otherwise.

const double& TeCoord2D::x ( ) const [inline]

Returns the X componente of the coordinate.

Examples:
convertCoordinates.cpp, querierFromTheme.cpp, TePDIMMIOMatching_test.cpp, and TePDIOFMatching_test.cpp.
void TeCoord2D::x ( const double &  valX) [inline]

Sets the X componente of the coordinate.

const double& TeCoord2D::y ( ) const [inline]

Returns the Y componente of the coordinate.

Examples:
convertCoordinates.cpp, querierFromTheme.cpp, TePDIMMIOMatching_test.cpp, and TePDIOFMatching_test.cpp.
void TeCoord2D::y ( const double &  valY) [inline]

Sets the Y componente of the coordinate.


Member Data Documentation

double TeCoord2D::x_

x coordinate

double TeCoord2D::y_

y coordinate


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines