RDGeom::Point2D Class Reference

#include <point.h>

Inheritance diagram for RDGeom::Point2D:

RDGeom::Point

List of all members.

Public Member Functions

 Point2D ()
 Point2D (double xv, double yv)
 ~Point2D ()
 Point2D (const Point2D &other)
unsigned int dimension () const
double operator[] (unsigned int i) const
double & operator[] (unsigned int i)
Point2Doperator= (const Point2D &other)
Point2Doperator+= (const Point2D &other)
Point2Doperator-= (const Point2D &other)
Point2Doperator*= (double scale)
Point2Doperator/= (double scale)
Point2D operator- () const
void normalize ()
void rotate90 ()
double length () const
double lengthSq () const
double dotProduct (const Point2D &other) const
double angleTo (const Point2D &other) const
double signedAngleTo (const Point2D &other) const
Point2D directionVector (const Point2D &other) const

Public Attributes

double x
double y


Detailed Description

Definition at line 245 of file point.h.


Constructor & Destructor Documentation

RDGeom::Point2D::Point2D (  )  [inline]

Definition at line 250 of file point.h.

RDGeom::Point2D::Point2D ( double  xv,
double  yv 
) [inline]

Definition at line 251 of file point.h.

RDGeom::Point2D::~Point2D (  )  [inline]

Definition at line 253 of file point.h.

RDGeom::Point2D::Point2D ( const Point2D other  )  [inline]

Definition at line 255 of file point.h.


Member Function Documentation

unsigned int RDGeom::Point2D::dimension (  )  const [inline, virtual]

Implements RDGeom::Point.

Definition at line 258 of file point.h.

double RDGeom::Point2D::operator[] ( unsigned int  i  )  const [inline, virtual]

Implements RDGeom::Point.

Definition at line 260 of file point.h.

References PRECONDITION, x, and y.

double& RDGeom::Point2D::operator[] ( unsigned int  i  )  [inline, virtual]

Implements RDGeom::Point.

Definition at line 269 of file point.h.

References PRECONDITION, x, and y.

Point2D& RDGeom::Point2D::operator= ( const Point2D other  )  [inline]

Definition at line 279 of file point.h.

References x, and y.

Point2D& RDGeom::Point2D::operator+= ( const Point2D other  )  [inline]

Definition at line 285 of file point.h.

References x, and y.

Point2D& RDGeom::Point2D::operator-= ( const Point2D other  )  [inline]

Definition at line 291 of file point.h.

References x, and y.

Point2D& RDGeom::Point2D::operator*= ( double  scale  )  [inline]

Definition at line 297 of file point.h.

References x, and y.

Point2D& RDGeom::Point2D::operator/= ( double  scale  )  [inline]

Definition at line 303 of file point.h.

References x, and y.

Point2D RDGeom::Point2D::operator- (  )  const [inline]

Definition at line 309 of file point.h.

References x, and y.

void RDGeom::Point2D::normalize (  )  [inline, virtual]

Implements RDGeom::Point.

Definition at line 316 of file point.h.

References length(), x, and y.

Referenced by angleTo(), RDDepict::computeNormal(), and directionVector().

void RDGeom::Point2D::rotate90 (  )  [inline]

Definition at line 322 of file point.h.

References x, and y.

double RDGeom::Point2D::length (  )  const [inline, virtual]

Implements RDGeom::Point.

Definition at line 328 of file point.h.

References x, and y.

Referenced by normalize().

double RDGeom::Point2D::lengthSq (  )  const [inline, virtual]

Implements RDGeom::Point.

Definition at line 333 of file point.h.

References x, and y.

double RDGeom::Point2D::dotProduct ( const Point2D other  )  const [inline]

Definition at line 338 of file point.h.

References x, and y.

Referenced by angleTo().

double RDGeom::Point2D::angleTo ( const Point2D other  )  const [inline]

Definition at line 343 of file point.h.

References dotProduct(), and normalize().

Referenced by RDDepict::computeAngle(), and signedAngleTo().

double RDGeom::Point2D::signedAngleTo ( const Point2D other  )  const [inline]

Definition at line 356 of file point.h.

References angleTo(), M_PI, x, and y.

Point2D RDGeom::Point2D::directionVector ( const Point2D other  )  const [inline]

Definition at line 362 of file point.h.

References normalize(), x, and y.


Member Data Documentation


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

Generated on Tue Oct 7 06:10:12 2008 for RDCode by  doxygen 1.5.5