UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
U2dPoint Class Reference

#include <u2d_point.hpp>

Inheritance diagram for U2dPoint:
U2dWPoint

Public Member Functions

 U2dPoint ()
 
 U2dPoint (const U2dPoint &p)
 
 U2dPoint (double x, double z)
 
U2dPointoperator= (const U2dPoint &p)
 
bool operator== (const U2dPoint &) const
 
bool operator!= (const U2dPoint &) const
 
U2dPoint operator+ (U2dPoint)
 
U2dPoint operator- (U2dPoint)
 
double getX () const
 
double getZ () const
 
void setXZ (double x, double z)
 
void setX (double x)
 
void setZ (double z)
 

Static Public Member Functions

static bool x_asc (const U2dPoint &p1, const U2dPoint &p2)
 
static bool z_asc (const U2dPoint &p1, const U2dPoint &p2)
 
static bool x_desc (const U2dPoint &p1, const U2dPoint &p2)
 
static bool z_desc (const U2dPoint &p1, const U2dPoint &p2)
 
static double pDistance (const U2dPoint &p0, const U2dPoint &p1)
 
static int getNeighbour (const U2dPoint &p, std::vector< U2dPoint * > &p_ar)
 
static int getNeighbour (const U2dPoint &p, std::vector< U2dPoint > &p_ar)
 

Protected Attributes

double m_X
 
double m_Z
 

Friends

U2dPoint operator* (int, U2dPoint)
 
U2dPoint operator* (U2dPoint, int)
 
U2dPoint operator* (double, U2dPoint)
 
U2dPoint operator* (U2dPoint, double)
 
U2dPoint operator/ (U2dPoint, int)
 
U2dPoint operator/ (U2dPoint, double)
 

Detailed Description

3D point class

Constructor & Destructor Documentation

U2dPoint::U2dPoint ( )
inline

Create point at origin of coordinates system.

U2dPoint::U2dPoint ( const U2dPoint p)
inline

Create point as a copy of given one.

U2dPoint::U2dPoint ( double  x,
double  z 
)
inline

Create point with given coordinates.

Member Function Documentation

static int U2dPoint::getNeighbour ( const U2dPoint p,
std::vector< U2dPoint * > &  p_ar 
)
static

Return index of the point (among p_ar), nearest to the point p

double U2dPoint::getX ( ) const
inline

Get x coordinate.

double U2dPoint::getZ ( ) const
inline

Get z coordinate.

bool U2dPoint::operator!= ( const U2dPoint ) const

Returns false, if all coordinates of points are equal (with precision U3D_EPSILON - see u3d_defines.hpp)

U2dPoint & U2dPoint::operator= ( const U2dPoint p)
inline

Assign the point coordinates from another one.

bool U2dPoint::operator== ( const U2dPoint ) const

Returns true, if all coordinates of points are equal (with precision U3D_EPSILON - see u3d_defines.hpp)

static double U2dPoint::pDistance ( const U2dPoint p0,
const U2dPoint p1 
)
static

Calculate distance between two points

void U2dPoint::setX ( double  x)
inline

Set x coordinate separately.

void U2dPoint::setXZ ( double  x,
double  z 
)
inline

Set new coordinates.

void U2dPoint::setZ ( double  z)
inline

Set z coordinate separately.

Member Data Documentation

double U2dPoint::m_X
protected

Cartesian coordinates of the point.


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