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 269 of file point.h.


Constructor & Destructor Documentation

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

Definition at line 274 of file point.h.

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

Definition at line 275 of file point.h.

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

Definition at line 277 of file point.h.

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

Definition at line 279 of file point.h.


Member Function Documentation

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

Implements RDGeom::Point.

Definition at line 282 of file point.h.

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

Implements RDGeom::Point.

Definition at line 284 of file point.h.

References PRECONDITION, x, and y.

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

Implements RDGeom::Point.

Definition at line 293 of file point.h.

References PRECONDITION, x, and y.

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

Definition at line 303 of file point.h.

References x, and y.

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

Definition at line 309 of file point.h.

References x, and y.

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

Definition at line 315 of file point.h.

References x, and y.

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

Definition at line 321 of file point.h.

References x, and y.

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

Definition at line 327 of file point.h.

References x, and y.

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

Definition at line 333 of file point.h.

References x, and y.

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

Implements RDGeom::Point.

Definition at line 340 of file point.h.

References length(), x, and y.

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

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

Definition at line 346 of file point.h.

References x, and y.

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

Implements RDGeom::Point.

Definition at line 352 of file point.h.

References x, and y.

Referenced by normalize().

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

Implements RDGeom::Point.

Definition at line 357 of file point.h.

References x, and y.

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

Definition at line 362 of file point.h.

References x, and y.

Referenced by angleTo().

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

Definition at line 367 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 380 of file point.h.

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

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

Definition at line 386 of file point.h.

References normalize(), x, and y.


Member Data Documentation

double RDGeom::Point2D::x

Definition at line 271 of file point.h.

Referenced by RDDepict::computeNormal(), directionVector(), dotProduct(), length(), lengthSq(), normalize(), operator *=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), rotate90(), RDDepict::rotationDir(), and signedAngleTo().

double RDGeom::Point2D::y

Definition at line 271 of file point.h.

Referenced by RDDepict::computeNormal(), directionVector(), dotProduct(), length(), lengthSq(), normalize(), operator *=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), rotate90(), RDDepict::rotationDir(), and signedAngleTo().


The documentation for this class was generated from the following file:
Generated on Sat May 24 08:36:34 2008 for RDCode by  doxygen 1.5.3