Public Member Functions | Public Attributes

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


Constructor & Destructor Documentation

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

Definition at line 254 of file point.h.

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

Definition at line 255 of file point.h.

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

Definition at line 257 of file point.h.

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

Definition at line 259 of file point.h.


Member Function Documentation

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

Definition at line 347 of file point.h.

References dotProduct(), and normalize().

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

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

Implements RDGeom::Point.

Definition at line 262 of file point.h.

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

Definition at line 366 of file point.h.

References normalize(), x, and y.

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

Definition at line 342 of file point.h.

References x, and y.

Referenced by angleTo().

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

Implements RDGeom::Point.

Definition at line 332 of file point.h.

References x, and y.

Referenced by normalize().

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

Implements RDGeom::Point.

Definition at line 337 of file point.h.

References x, and y.

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

Implements RDGeom::Point.

Definition at line 320 of file point.h.

References length(), x, and y.

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

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

Definition at line 301 of file point.h.

References x, and y.

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

Definition at line 289 of file point.h.

References x, and y.

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

Definition at line 313 of file point.h.

References x, and y.

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

Definition at line 295 of file point.h.

References x, and y.

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

Definition at line 307 of file point.h.

References x, and y.

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

Definition at line 283 of file point.h.

References x, and y.

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

Implements RDGeom::Point.

Definition at line 273 of file point.h.

References PRECONDITION, x, and y.

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

Implements RDGeom::Point.

Definition at line 264 of file point.h.

References PRECONDITION, x, and y.

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

Definition at line 326 of file point.h.

References x, and y.

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

Definition at line 360 of file point.h.

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


Member Data Documentation


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