Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mlib::XYpt Class Reference
["XY" Coordinate System]

A point in XY coordinates. More...

#include <points.H>

Inheritance diagram for mlib::XYpt:

Inheritance graph
[legend]
Collaboration diagram for mlib::XYpt:

Collaboration graph
[legend]
List of all members.

Public Types

typedef double value_type

Public Member Functions

 Point2 ()
 Default constructor. Creates a point at the origin.
 Point2 (double s)
 Constructor that creates a point with the supplied double argumetn value in all components.
 Point2 (double xx, double yy)
 Construtor that creates a point with the components supplied in the arguments.
const double * data () const
 Returns the elements of the point as an array.
double operator[] (int index) const
double & operator[] (int index)
XYpt operator+ (const XYpt &p) const
 Adds a point to a point.
XYpt operator+ (const XYvec &v) const
XYvec operator- (const XYpt &p) const
XYpt operator- (const XYvec &v) const
XYpt operator- () const
XYpt operator * (double s) const
XYpt operator * (const XYpt &p) const
 Component-wise multiplcation.
XYpt operator/ (double s) const
void operator *= (const XYpt &p) const
 Component-wise multiplication.
void operator *= (double scalar)
void operator+= (const XYpt &p)
 Adds a point to a point.
void operator+= (const XYvec &v)
void operator-= (const XYpt &p)
void operator-= (const XYvec &v)
void operator/= (double scalar)
bool operator== (const XYpt &p) const
 Are the two points exactly equal (component-wise)?
bool operator!= (const XYpt &p) const
 Are the two points not equal (component-wise)?
double length () const
 Compute the distance from the point to the origin.
double length_sqrd () const
 Compute the distance squared from the point to the origin.
double dist_sqrd (const XYpt &p) const
 Compute the distance squared between two points.
double dist (const XYpt &p) const
 Compute the distance between two points.
bool is_equal (const XYpt &p, double epsSqrd=epsAbsSqrdMath()) const
 Is the distance between the two points essentially zero?
Constructors
 XYpt ()
 XYpt (double s)
 XYpt (double x, double y)
 XYpt (CNDCpt &)
 XYpt (CPIXEL &)
 XYpt (CWpt &)
 XYpt (CXYline &, CXYline &)
 XYpt (CXYline &, CXYpt &)

Static Public Member Functions

static CXYptOrigin ()
static int dim ()

Protected Attributes

double _x
double _y

Static Protected Attributes

static CXYpt _origin

Detailed Description

A point in XY coordinates.

Definition at line 568 of file points.H.


Member Typedef Documentation

typedef double mlib::Point2< XYpt , XYvec >::value_type [inherited]
 

Definition at line 57 of file point2.H.


Constructor & Destructor Documentation

mlib::XYpt::XYpt  )  [inline]
 

Definition at line 579 of file points.H.

mlib::XYpt::XYpt double  s  )  [inline, explicit]
 

Definition at line 580 of file points.H.

mlib::XYpt::XYpt double  x,
double  y
[inline]
 

Definition at line 581 of file points.H.

mlib::XYpt::XYpt CNDCpt  ) 
 

Definition at line 124 of file points.C.

References mlib::Point2< XYpt, XYvec >::_x, mlib::Point2< XYpt, XYvec >::_y, and VIEW_ASPECT.

mlib::XYpt::XYpt CPIXEL  ) 
 

Definition at line 148 of file points.C.

References mlib::Point2< XYpt, XYvec >::_x, mlib::Point2< XYpt, XYvec >::_y, VIEW_PIXELS, and VIEW_SIZE.

mlib::XYpt::XYpt CWpt  ) 
 

Definition at line 119 of file points.C.

References WtoXY.


Member Function Documentation

const double* mlib::Point2< XYpt , XYvec >::data  )  const [inline, inherited]
 

Returns the elements of the point as an array.

Definition at line 66 of file point2.H.

static int mlib::Point2< XYpt , XYvec >::dim  )  [inline, static, inherited]
 

Definition at line 58 of file point2.H.

double mlib::Point2< XYpt , XYvec >::dist const XYpt p  )  const [inline, inherited]
 

Compute the distance between two points.

Definition at line 138 of file point2.H.

double mlib::Point2< XYpt , XYvec >::dist_sqrd const XYpt p  )  const [inline, inherited]
 

Compute the distance squared between two points.

Definition at line 135 of file point2.H.

bool mlib::Point2< XYpt , XYvec >::is_equal const XYpt p,
double  epsSqrd = epsAbsSqrdMath()
const [inline, inherited]
 

Is the distance between the two points essentially zero?

Definition at line 146 of file point2.H.

double mlib::Point2< XYpt , XYvec >::length  )  const [inline, inherited]
 

Compute the distance from the point to the origin.

Questions:
Do we need/want this function (since points don't really have a length)?

Definition at line 123 of file point2.H.

double mlib::Point2< XYpt , XYvec >::length_sqrd  )  const [inline, inherited]
 

Compute the distance squared from the point to the origin.

Questions:
Do we need/want this function (since points don't really have a length)?

Definition at line 127 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator * const XYpt p  )  const [inline, inherited]
 

Component-wise multiplcation.

Definition at line 89 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator * double  s  )  const [inline, inherited]
 

Definition at line 85 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator *= double  scalar  )  [inline, inherited]
 

Definition at line 102 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator *= const XYpt p  )  const [inline, inherited]
 

Component-wise multiplication.

Definition at line 91 of file point2.H.

bool mlib::Point2< XYpt , XYvec >::operator!= const XYpt p  )  const [inline, inherited]
 

Are the two points not equal (component-wise)?

Definition at line 113 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator+ const XYvec v  )  const [inline, inherited]
 

Definition at line 80 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator+ const XYpt p  )  const [inline, inherited]
 

Adds a point to a point.

Warning:
This should only be used to add points that have already been pre-weighted by coefficients that add up to 1.

Definition at line 79 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator+= const XYvec v  )  [inline, inherited]
 

Definition at line 97 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator+= const XYpt p  )  [inline, inherited]
 

Adds a point to a point.

Warning:
This should only be used to add points that have already been pre-weighted by coefficients that add up to 1.

Definition at line 96 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator-  )  const [inline, inherited]
 

Definition at line 83 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator- const XYvec v  )  const [inline, inherited]
 

Definition at line 82 of file point2.H.

XYvec mlib::Point2< XYpt , XYvec >::operator- const XYpt p  )  const [inline, inherited]
 

Definition at line 81 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator-= const XYvec v  )  [inline, inherited]
 

Definition at line 101 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator-= const XYpt p  )  [inline, inherited]
 

Questions:
Should this function be allowed (subtracting two points and getting a point as the result)?

Definition at line 100 of file point2.H.

XYpt mlib::Point2< XYpt , XYvec >::operator/ double  s  )  const [inline, inherited]
 

Definition at line 86 of file point2.H.

void mlib::Point2< XYpt , XYvec >::operator/= double  scalar  )  [inline, inherited]
 

Definition at line 103 of file point2.H.

bool mlib::Point2< XYpt , XYvec >::operator== const XYpt p  )  const [inline, inherited]
 

Are the two points exactly equal (component-wise)?

Definition at line 111 of file point2.H.

double& mlib::Point2< XYpt , XYvec >::operator[] int  index  )  [inline, inherited]
 

Definition at line 69 of file point2.H.

double mlib::Point2< XYpt , XYvec >::operator[] int  index  )  const [inline, inherited]
 

Definition at line 68 of file point2.H.

static CXYpt& mlib::XYpt::Origin  )  [inline, static]
 

Definition at line 590 of file points.H.

References _origin.

mlib::Point2< XYpt , XYvec >::Point2 double  xx,
double  yy
[inline, inherited]
 

Construtor that creates a point with the components supplied in the arguments.

Definition at line 50 of file point2.H.

mlib::Point2< XYpt , XYvec >::Point2 double  s  )  [inline, explicit, inherited]
 

Constructor that creates a point with the supplied double argumetn value in all components.

Definition at line 47 of file point2.H.

mlib::Point2< XYpt , XYvec >::Point2  )  [inline, inherited]
 

Default constructor. Creates a point at the origin.

Definition at line 44 of file point2.H.


Member Data Documentation

CXYpt mlib::XYpt::_origin [static, protected]
 

Definition at line 572 of file points.H.

Referenced by Origin().

double mlib::Point2< XYpt , XYvec >::_x [protected, inherited]
 

Definition at line 36 of file point2.H.

Referenced by XYpt().

double mlib::Point2< XYpt , XYvec >::_y [protected, inherited]
 

Definition at line 36 of file point2.H.

Referenced by XYpt().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:48:16 2006 for jot by  doxygen 1.4.4