Three dimensional vector.
More...
#include <vec3d.hpp>
List of all members.
Detailed Description
Three dimensional vector.
Constructor & Destructor Documentation
| Vec3D::Vec3D |
( |
|
) |
[inline] |
| Vec3D::Vec3D |
( |
double |
x |
) |
[inline] |
| Vec3D::Vec3D |
( |
double |
x, |
|
|
double |
y | |
|
) |
| | [inline] |
| Vec3D::Vec3D |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z | |
|
) |
| | [inline] |
| Vec3D::Vec3D |
( |
const class Vec4D & |
vec |
) |
|
| Vec3D::Vec3D |
( |
std::istream & |
s |
) |
[inline] |
| Vec3D::~Vec3D |
( |
|
) |
[inline] |
Member Function Documentation
| void Vec3D::abs |
( |
void |
|
) |
[inline] |
Calculate absolute value of each component.
| bool Vec3D::approx |
( |
const Vec3D & |
x, |
|
|
double |
eps = 1.0e-6 | |
|
) |
| | const |
Approximate equality test.
Does not require exact equality, but absolute or relative error less than eps (which ever is less strict). Be careful using this function!
| Vec3D Vec3D::arb_perpendicular |
( |
void |
|
) |
const |
Returns arbitrary vector perpendicular to input vector.
| int Vec3D::min_element |
( |
void |
|
) |
const |
Returns the index of element with minimum magnitude (abs).
| double Vec3D::norm2 |
( |
void |
|
) |
const [inline] |
Returns 2-norm of vector.
| void Vec3D::normalize |
( |
void |
|
) |
[inline] |
| bool Vec3D::operator!= |
( |
const Vec3D & |
x |
) |
const |
Inequality test.
Require exact equality.
| const double& Vec3D::operator() |
( |
int |
i |
) |
const [inline] |
| double& Vec3D::operator() |
( |
int |
i |
) |
[inline] |
| Vec3D Vec3D::operator* |
( |
double |
x |
) |
const [inline] |
| double Vec3D::operator* |
( |
const Vec3D & |
vec |
) |
const [inline] |
| Vec3D& Vec3D::operator*= |
( |
double |
x |
) |
[inline] |
| Vec3D Vec3D::operator+ |
( |
const Vec3D & |
vec |
) |
const [inline] |
| Vec3D& Vec3D::operator+= |
( |
const Vec3D & |
vec |
) |
[inline] |
| Vec3D Vec3D::operator- |
( |
void |
|
) |
const [inline] |
| Vec3D Vec3D::operator- |
( |
const Vec3D & |
vec |
) |
const [inline] |
| Vec3D& Vec3D::operator/= |
( |
double |
x |
) |
[inline] |
Vector scaling with divisor.
| Vec3D& Vec3D::operator= |
( |
const double & |
x |
) |
[inline] |
Assignment of every coordinate.
| Vec3D& Vec3D::operator= |
( |
const Vec3D & |
x |
) |
[inline] |
| bool Vec3D::operator== |
( |
const Vec3D & |
x |
) |
const |
Equality test.
Requires exact equality.
| double& Vec3D::operator[] |
( |
int |
i |
) |
[inline] |
| const double& Vec3D::operator[] |
( |
int |
i |
) |
const [inline] |
| void Vec3D::save |
( |
std::ostream & |
os |
) |
const [inline] |
| double Vec3D::ssqr |
( |
void |
|
) |
const [inline] |
Returns square of 2-norm of vector.
| static Vec3D Vec3D::standard_basis |
( |
int |
i |
) |
[static] |
Returns standard basis vector i.
Friends And Related Function Documentation
| double norm2 |
( |
const Vec3D & |
vec |
) |
[friend] |
| Vec3D operator* |
( |
double |
x, |
|
|
const class Int3D & |
i | |
|
) |
| | [friend] |
Vector scaling for integer vector.
| Vec3D operator* |
( |
double |
x, |
|
|
const Vec3D & |
vec | |
|
) |
| | [friend] |
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Vec3D & |
vec | |
|
) |
| | [friend] |
The documentation for this class was generated from the following file: