#include </usr1/tp517/Tumble/trunk/src/tumble/util.h>
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) | |
| Vec3D & | assign (double x, double y, double z) |
| Vec3D & | assign (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 |
| Vec3D & | operator= (const Vec3D &o) |
| Vec3D & | operator+= (const Vec3D &o) |
| Vec3D & | operator-= (const Vec3D &o) |
| Vec3D & | operator *= (double s) |
| Vec3D & | operator/= (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) |
Definition at line 336 of file util.h.
| 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] |
| 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::assign | ( | double | x, | |
| double | y, | |||
| 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] |
| double Vec3D::z | ( | ) | const [inline] |
| bool Vec3D::operator< | ( | const Vec3D & | o | ) | const [inline] |
| bool Vec3D::operator<= | ( | const Vec3D & | o | ) | const [inline] |
| bool Vec3D::operator> | ( | const Vec3D & | o | ) | const [inline] |
| bool Vec3D::operator>= | ( | const Vec3D & | o | ) | const [inline] |
| Vec3D& Vec3D::operator *= | ( | double | s | ) | [inline] |
| Vec3D& Vec3D::operator/= | ( | double | s | ) | [inline] |
| Vec3D Vec3D::operator * | ( | double | s | ) | const [inline] |
| Vec3D Vec3D::operator/ | ( | double | s | ) | const [inline] |
| double Vec3D::dot | ( | const Vec3D & | o | ) | const [inline] |
| double Vec3D::operator * | ( | const Vec3D & | o | ) | const [inline] |
| 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] |
| double Vec3D::norm | ( | ) | 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] |
| std::ostream& operator<< | ( | std::ostream & | , | |
| const Vec3D & | p | |||
| ) | [friend] |
| 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().
1.5.2