RDGeom::Point3D Class Reference

#include <point.h>

Inheritance diagram for RDGeom::Point3D:

RDGeom::Point

List of all members.

Public Member Functions

 Point3D ()
 Point3D (double xv, double yv, double zv)
 ~Point3D ()
 Point3D (const Point3D &other)
unsigned int dimension () const
double operator[] (unsigned int i) const
double & operator[] (unsigned int i)
Point3Doperator= (const Point3D &other)
Point3Doperator+= (const Point3D &other)
Point3Doperator-= (const Point3D &other)
Point3Doperator *= (double scale)
Point3Doperator/= (double scale)
Point3D operator- () const
void normalize ()
double length () const
double lengthSq () const
double dotProduct (const Point3D &other) const
double angleTo (const Point3D &other) const
 determines the angle between a vector to this point from the origin and a vector to the other point.
double signedAngleTo (const Point3D &other) const
 determines the signed angle between a vector to this point from the origin and a vector to the other point.
Point3D directionVector (const Point3D &other) const
 Returns a normalized direction vector from this point to another.
Point3D crossProduct (const Point3D &other) const
 Cross product of this point with the another point.
Point3D getPerpendicular () const
 Get a unit perpendicular from this point (treating it as a vector):.

Public Attributes

double x
double y
double z


Detailed Description

Definition at line 67 of file point.h.


Constructor & Destructor Documentation

RDGeom::Point3D::Point3D (  )  [inline]

Definition at line 74 of file point.h.

RDGeom::Point3D::Point3D ( double  xv,
double  yv,
double  zv 
) [inline]

Definition at line 75 of file point.h.

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

Definition at line 77 of file point.h.

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

Definition at line 79 of file point.h.


Member Function Documentation

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

Implements RDGeom::Point.

Definition at line 83 of file point.h.

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

Implements RDGeom::Point.

Definition at line 85 of file point.h.

References PRECONDITION, x, y, and z.

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

Implements RDGeom::Point.

Definition at line 96 of file point.h.

References PRECONDITION, x, y, and z.

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

Definition at line 108 of file point.h.

References x, y, and z.

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

Definition at line 114 of file point.h.

References x, y, and z.

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

Definition at line 121 of file point.h.

References x, y, and z.

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

Definition at line 128 of file point.h.

References x, y, and z.

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

Definition at line 135 of file point.h.

References x, y, and z.

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

Definition at line 142 of file point.h.

References x, y, and z.

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

Implements RDGeom::Point.

Definition at line 150 of file point.h.

References length(), x, y, and z.

Referenced by angleTo(), and directionVector().

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

Implements RDGeom::Point.

Definition at line 157 of file point.h.

References x, y, and z.

Referenced by RDGeom::compute14Dist3D(), getPerpendicular(), and normalize().

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

Implements RDGeom::Point.

Definition at line 162 of file point.h.

References x, y, and z.

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

Definition at line 167 of file point.h.

References x, y, and z.

Referenced by angleTo().

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

determines the angle between a vector to this point from the origin and a vector to the other point.

The angle is unsigned: the results of this call will always be between 0 and M_PI

Definition at line 178 of file point.h.

References dotProduct(), and normalize().

Referenced by signedAngleTo().

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

determines the signed angle between a vector to this point from the origin and a vector to the other point.

The results of this call will be between 0 and M_2_PI

Definition at line 196 of file point.h.

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

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

Returns a normalized direction vector from this point to another.

Definition at line 207 of file point.h.

References normalize(), x, y, and z.

Point3D RDGeom::Point3D::crossProduct ( const Point3D other  )  const [inline]

Cross product of this point with the another point.

The order is important here The result is "this" cross with "other" not (other x this)

Definition at line 223 of file point.h.

References x, y, and z.

Point3D RDGeom::Point3D::getPerpendicular (  )  const [inline]

Get a unit perpendicular from this point (treating it as a vector):.

Definition at line 234 of file point.h.

References length(), POSTCONDITION, x, y, and z.


Member Data Documentation

double RDGeom::Point3D::x

Definition at line 70 of file point.h.

Referenced by crossProduct(), directionVector(), dotProduct(), getPerpendicular(), length(), lengthSq(), normalize(), operator *=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), and signedAngleTo().

double RDGeom::Point3D::y

Definition at line 70 of file point.h.

Referenced by crossProduct(), directionVector(), dotProduct(), getPerpendicular(), length(), lengthSq(), normalize(), operator *=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), and signedAngleTo().

double RDGeom::Point3D::z

Definition at line 70 of file point.h.

Referenced by crossProduct(), directionVector(), dotProduct(), getPerpendicular(), length(), lengthSq(), normalize(), operator *=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and operator[]().


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