|
IBSimu 1.0.4
|
Three dimensional vector. More...
#include <vec3d.hpp>
Public Member Functions | |
| Vec3D () | |
| Vec3D (double x) | |
| Vec3D (double x, double y) | |
| Vec3D (double x, double y, double z) | |
| Vec3D (const class Vec4D &vec) | |
| Vec3D (std::istream &s) | |
| ~Vec3D () | |
| double & | operator[] (int i) |
| const double & | operator[] (int i) const |
| double & | operator() (int i) |
| const double & | operator() (int i) const |
| Vec3D | operator+ (const Vec3D &vec) const |
| Vector addition | |
| Vec3D | operator- (const Vec3D &vec) const |
| Vector difference | |
| Vec3D & | operator+= (const Vec3D &vec) |
| Vector accumulation | |
| double | operator* (const Vec3D &vec) const |
| Dot product. | |
| Vec3D | operator* (double x) const |
| Vector scaling. | |
| Vec3D | operator- (void) const |
| Unary minus. | |
| Vec3D & | operator*= (double x) |
| Vector scaling. | |
| Vec3D & | operator/= (double x) |
| Vector scaling with divisor. | |
| bool | operator!= (const Vec3D &x) |
| Inequality test. | |
| bool | operator== (const Vec3D &x) |
| Equality test. | |
| Vec3D & | operator= (const Vec3D &x) |
| Assignment. | |
| Vec3D & | operator= (const double &x) |
| Assignment of every coordinate. | |
| void | normalize () |
| Normalize vector. | |
| double | norm2 () const |
| Returns 2-norm of vector. | |
| double | ssqr () const |
| Returns square of 2-norm of vector. | |
| void | save (std::ostream &s) const |
Friends | |
| Vec3D | cross (const Vec3D &vec1, const Vec3D &vec2) |
| Cross product. | |
| double | norm2 (const Vec3D &vec) |
| Second norm of vector. | |
| Vec3D | operator* (double x, const Vec3D &vec) |
| Vector scaling. | |
| Vec3D | operator* (double x, const class Int3D &i) |
| Vector scaling for integer vector. | |
| std::ostream & | operator<< (std::ostream &os, const Vec3D &vec) |
| Outputting to stream. | |
Three dimensional vector.
| 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] |
| double Vec3D::norm2 | ( | ) | const [inline] |
Returns 2-norm of vector.
| void Vec3D::normalize | ( | ) | [inline] |
Normalize vector.
| bool Vec3D::operator!= | ( | const Vec3D & | x | ) | [inline] |
Inequality test.
| const double& Vec3D::operator() | ( | int | i | ) | const [inline] |
| double& Vec3D::operator() | ( | int | i | ) | [inline] |
| double Vec3D::operator* | ( | const Vec3D & | vec | ) | const [inline] |
Dot product.
| Vec3D Vec3D::operator* | ( | double | x | ) | const [inline] |
Vector scaling.
| Vec3D& Vec3D::operator*= | ( | double | x | ) | [inline] |
Vector scaling.
| Vec3D Vec3D::operator- | ( | void | ) | const [inline] |
Unary minus.
| Vec3D& Vec3D::operator/= | ( | double | x | ) | [inline] |
Vector scaling with divisor.
| Vec3D& Vec3D::operator= | ( | const double & | x | ) | [inline] |
Assignment of every coordinate.
| bool Vec3D::operator== | ( | const Vec3D & | x | ) | [inline] |
Equality test.
| double& Vec3D::operator[] | ( | int | i | ) | [inline] |
| const double& Vec3D::operator[] | ( | int | i | ) | const [inline] |
| void Vec3D::save | ( | std::ostream & | s | ) | const [inline] |
| double Vec3D::ssqr | ( | ) | const [inline] |
Returns square of 2-norm of vector.
| double norm2 | ( | const Vec3D & | vec | ) | [friend] |
Second norm of vector.
| std::ostream& operator<< | ( | std::ostream & | os, |
| const Vec3D & | vec | ||
| ) | [friend] |
Outputting to stream.
1.7.4