Vec3D Class Reference

A standard three dimentional vetor class. More...

#include </usr1/tp517/Tumble/trunk/src/tumble/util.h>

List of all members.

Public Member Functions

 Vec3D ()
 Vec3D (double x, double y, double z)
 Vec3D (const Point2D &p, double z=0.0)
 Use a Pont2D to intiailize the x and y coordinates.
 Vec3D (const Vec3D &o)
Vec3Dassign (double x, double y, double z)
Vec3Dassign (const Point2D &p, double z)
 Use a Point2D to set the x and y coordinates.
double operator[] (int i) const
double x () const
double y () const
double z () const
bool operator< (const Vec3D &o) const
bool operator<= (const Vec3D &o) const
bool operator> (const Vec3D &o) const
bool operator>= (const Vec3D &o) const
Vec3Doperator= (const Vec3D &o)
Vec3Doperator+= (const Vec3D &o)
Vec3Doperator-= (const Vec3D &o)
Vec3Doperator *= (double s)
Vec3Doperator/= (double s)
Vec3D operator+ (const Vec3D &o) const
Vec3D operator- (const Vec3D &o) const
Vec3D operator * (double s) const
Vec3D operator/ (double s) const
double dot (const Vec3D &o) const
double operator * (const Vec3D &o) const
double magsq () const
double mag () const
double norm () const
Vec3D cross (const Vec3D &o) const
 Cross product.
double angle (const Vec3D &o)
 Get angle between this and o in radians.
void print ()

Public Attributes

double coords [3]
 The coordinates of the vector.

Friends

std::ostream & operator<< (std::ostream &, const Vec3D &p)


Detailed Description

A standard three dimentional vetor class.

Definition at line 336 of file util.h.


Constructor & Destructor Documentation

Vec3D::Vec3D (  )  [inline]

Definition at line 341 of file util.h.

References coords.

Referenced by cross(), operator *(), operator+(), operator-(), and operator/().

Vec3D::Vec3D ( double  x,
double  y,
double  z 
) [inline]

Definition at line 348 of file util.h.

References coords.

Vec3D::Vec3D ( const Point2D p,
double  z = 0.0 
) [inline]

Use a Pont2D to intiailize the x and y coordinates.

Definition at line 356 of file util.h.

References coords, Point2D::x(), Point2D::y(), and z().

Here is the call graph for this function:

Vec3D::Vec3D ( const Vec3D o  )  [inline]

Definition at line 363 of file util.h.

References coords.


Member Function Documentation

Vec3D& Vec3D::assign ( double  x,
double  y,
double  z 
) [inline]

Definition at line 371 of file util.h.

References coords.

Vec3D& Vec3D::assign ( const Point2D p,
double  z 
) [inline]

Use a Point2D to set the x and y coordinates.

Definition at line 380 of file util.h.

References coords, Point2D::x(), and Point2D::y().

Here is the call graph for this function:

double Vec3D::operator[] ( int  i  )  const [inline]

Definition at line 388 of file util.h.

References coords.

double Vec3D::x (  )  const [inline]

Definition at line 389 of file util.h.

References coords.

double Vec3D::y (  )  const [inline]

Definition at line 390 of file util.h.

References coords.

double Vec3D::z (  )  const [inline]

Definition at line 391 of file util.h.

References coords.

Referenced by Vec3D().

bool Vec3D::operator< ( const Vec3D o  )  const [inline]

Definition at line 393 of file util.h.

References magsq().

Here is the call graph for this function:

bool Vec3D::operator<= ( const Vec3D o  )  const [inline]

Definition at line 398 of file util.h.

References magsq().

Here is the call graph for this function:

bool Vec3D::operator> ( const Vec3D o  )  const [inline]

Definition at line 403 of file util.h.

References magsq().

Here is the call graph for this function:

bool Vec3D::operator>= ( const Vec3D o  )  const [inline]

Definition at line 408 of file util.h.

References magsq().

Here is the call graph for this function:

Vec3D& Vec3D::operator= ( const Vec3D o  )  [inline]

Definition at line 414 of file util.h.

References coords.

Vec3D& Vec3D::operator+= ( const Vec3D o  )  [inline]

Definition at line 423 of file util.h.

References coords.

Vec3D& Vec3D::operator-= ( const Vec3D o  )  [inline]

Definition at line 431 of file util.h.

References coords.

Vec3D& Vec3D::operator *= ( double  s  )  [inline]

Definition at line 439 of file util.h.

References coords.

Vec3D& Vec3D::operator/= ( double  s  )  [inline]

Definition at line 447 of file util.h.

References coords.

Vec3D Vec3D::operator+ ( const Vec3D o  )  const [inline]

Definition at line 456 of file util.h.

References coords, and Vec3D().

Here is the call graph for this function:

Vec3D Vec3D::operator- ( const Vec3D o  )  const [inline]

Definition at line 461 of file util.h.

References coords, and Vec3D().

Here is the call graph for this function:

Vec3D Vec3D::operator * ( double  s  )  const [inline]

Definition at line 466 of file util.h.

References coords, and Vec3D().

Here is the call graph for this function:

Vec3D Vec3D::operator/ ( double  s  )  const [inline]

Definition at line 471 of file util.h.

References coords, and Vec3D().

Here is the call graph for this function:

double Vec3D::dot ( const Vec3D o  )  const [inline]

Definition at line 477 of file util.h.

References coords.

Referenced by angle().

double Vec3D::operator * ( const Vec3D o  )  const [inline]

Definition at line 483 of file util.h.

References coords.

double Vec3D::magsq (  )  const [inline]

Definition at line 488 of file util.h.

References coords.

Referenced by operator<(), operator<=(), operator>(), and operator>=().

double Vec3D::mag (  )  const [inline]

Definition at line 493 of file util.h.

References coords.

Referenced by norm().

double Vec3D::norm (  )  const [inline]

Definition at line 498 of file util.h.

References mag().

Referenced by angle().

Here is the call graph for this function:

Vec3D Vec3D::cross ( const Vec3D o  )  const [inline]

Cross product.

Definition at line 501 of file util.h.

References coords, and Vec3D().

Referenced by BezierMesh::function_angle().

Here is the call graph for this function:

double Vec3D::angle ( const Vec3D o  )  [inline]

Get angle between this and o in radians.

Definition at line 509 of file util.h.

References dot(), norm(), and PI.

Here is the call graph for this function:

void Vec3D::print (  )  [inline]

Definition at line 521 of file util.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const Vec3D p 
) [friend]


Member Data Documentation

double Vec3D::coords[3]

The coordinates of the vector.

Definition at line 338 of file util.h.

Referenced by assign(), cross(), dot(), mag(), magsq(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), operator[](), Vec3D(), x(), y(), and z().


The documentation for this class was generated from the following file:
Generated on Mon May 24 09:53:35 2010 for TUMBLE by  doxygen 1.5.2