|
libt3d 2.6
|
A 3D vector. More...
#include <v3d.h>
Public Member Functions | |
| V3D (void) | |
| Vector constructor. | |
| V3D (double x, double y, double z) | |
| Vector constructor. | |
| double & | operator[] (unsigned int i) |
| Vector element accessor. | |
| double & | operator() (unsigned int i) |
| Vector element accessor. | |
| double & | operator[] (V3DVectorIndex i) |
| V3D | operator+ (const V3D &inV) const |
| Sum of two vectors or of a vector and a point. | |
| V3D | operator+= (const V3D &inV) |
| Sum of two vectors or of a vector and a point. | |
| V3D | operator- () const |
| the opposite vector. | |
| V3D | operator- (const V3D &inV) const |
| Substraction of two vectors or of a vector and a point. | |
| V3D | operator-= (const V3D &inV) |
| Substraction of two vectors or of a vector and a point. | |
| V3D | operator/ (const double d) const |
| Divide the vector by an double. | |
| V3D | operator/= (const double d) |
| Divide the vector by an double. | |
| V3D | operator* (const double d) const |
| Multiply the vector by a double. | |
| V3D | operator*= (const double d) |
| Multiply the vector by a double. | |
| double | operator* (const V3D &inV) const |
| dot product | |
| V3D | operator^ (const V3D &inV) const |
| Vector product. | |
| bool | operator== (const V3D &inV) const |
| Vector comparison. | |
| double | norm () const |
| Compute euclidian norm of a V3D. | |
| V3D & | normalize () |
| Normalize a V3D. | |
Public Attributes | |
| double | v [4] |
| Homogeneous coordinates. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const V3D &v3d) |
| Output a ASCII V3D description to a stream. | |
A 3D vector.
This structure manipulates vectors represented by homogeneous coordinates.
|
inline |
Vector constructor.
Initialize a vector to all 0.
|
inline |
Vector constructor.
Initialize a vector to x,y and z.
| [in] | x | X coordinate. |
| [in] | y | Y coordinate. |
| [in] | z | Z coordinate. |
|
inline |
Compute euclidian norm of a V3D.
| [in] | v3d | Input vector |
|
inline |
|
inline |
Vector element accessor.
| (in) | i Element number. |
|
inline |
Multiply the vector by a double.
| [in] | d | double to multiply |
|
inline |
dot product
| [in] | inV | Vector to multiply |
|
inline |
Multiply the vector by a double.
| [in] | d | double to multiply |
Sum of two vectors or of a vector and a point.
| [in] | inV | Vector to sum. |
Sum of two vectors or of a vector and a point.
| [in] | inV | Vector to sum. |
|
inline |
the opposite vector.
Substraction of two vectors or of a vector and a point.
| [in] | inV | Vector to substract. |
Substraction of two vectors or of a vector and a point.
| [in] | inV | Vector to substract. |
|
inline |
Divide the vector by an double.
| [in] | d | double to divide |
|
inline |
Divide the vector by an double.
| [in] | d | double to divide |
|
inline |
Vector comparison.
| [in] | inV | Vector to compare |
|
inline |
Vector element accessor.
| [in] | i | Element number. |
|
inline |
Vector product.
| [in] | inV | Vector to multiply |