AURobotServers  4
Public Member Functions | Public Attributes | List of all members
U2Dpos Class Reference

#include <u2dline.h>

Inheritance diagram for U2Dpos:
Inheritance graph

Public Member Functions

UMatrix4 asCol2 ()
 
UMatrix4 asCol3 ()
 
UMatrix4 asRow2 ()
 
UMatrix4 asRow3 ()
 
void clear ()
 
double dist ()
 
double dist (UPosition b)
 
double dist (U2Dpos b)
 
double heading ()
 
double length ()
 
U2Dpos operator= (UPosition pos)
 
U2Dpos operator= (U2Dseg seg)
 
void set (double ix, double iy)
 
 U2Dpos (double ix, double iy)
 
 U2Dpos ()
 

Public Attributes

double x
 
double y
 

Detailed Description

A simple class for a 2D position in double precition.

Constructor & Destructor Documentation

U2Dpos::U2Dpos ( double  ix,
double  iy 
)
inline

initialized constructor

U2Dpos::U2Dpos ( )
inline

uninitialized constructor

Member Function Documentation

UMatrix4 U2Dpos::asCol2 ( )

position as [x,y] column.

References UMatrix::set().

UMatrix4 U2Dpos::asCol3 ( )

position as homogenous [x,y,1] column.

References UMatrix::set().

Referenced by testPoseMatrix().

UMatrix4 U2Dpos::asRow2 ( )

position as [x,y] row.

References UMatrix::set().

UMatrix4 U2Dpos::asRow3 ( )

position as homogenous [x,y,1] row.

References UMatrix::set().

void U2Dpos::clear ( void  )
inline

clear 2D value

Referenced by ULaserMeasurement::clear(), and ULaserData::get2d().

double U2Dpos::dist ( )
inline
double U2Dpos::dist ( UPosition  b)
inline

get distance from this to other position (2D)

Parameters
bis the other position.
Returns
length between the two points.

References UPosition::x, and UPosition::y.

double U2Dpos::dist ( U2Dpos  b)
inline

get distance from this to other position (2D)

Parameters
bis the other position.
Returns
length between the two points.

References x, and y.

double U2Dpos::heading ( )
inline

Length of vector

double U2Dpos::length ( )
inline

Length of vector

Referenced by UNamedBox::doDetect().

U2Dpos U2Dpos::operator= ( UPosition  pos)
inline

set from 3D position

References UPosition::x, and UPosition::y.

U2Dpos U2Dpos::operator= ( U2Dseg  seg)

set from 2D line segment position

References x, and y.

void U2Dpos::set ( double  ix,
double  iy 
)
inline

Member Data Documentation

double U2Dpos::x
double U2Dpos::y

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