#include <Vec3f.h>
Public Member Functions | |
| H3D_API_EXCEPTION (Vec3fNormalizeError) | |
| Exception thrown when error while normalizing vector types. | |
| Vec3f () | |
| Default constructor. | |
| Vec3f (H3DFloat _x, H3DFloat _y, H3DFloat _z) | |
| Constructor. | |
| Vec3f (const Vec3d &v) | |
| Conversion from Vec3d. | |
| H3DFloat | dotProduct (const Vec3f &v) const |
| Returns the dot product between this Vec3f and v. | |
| Vec3f | crossProduct (const Vec3f &v) const |
| Returns the cross product between this Vec3f and v. | |
| void | normalize () |
| Normalize the vector to be of length 1. | |
| void | normalizeSafe () |
| Normalize the vector to be of length 1. | |
| H3DFloat | lengthSqr () |
| Returns the length squeared of the vector. | |
| H3DFloat | length () |
| Returns the length of the vector. | |
| H3DFloat & | operator[] (int i) |
| const H3DFloat & | operator[] (int i) const |
Public Attributes | |
| H3DFloat | x |
| The public values of the vector. | |
| H3DFloat | y |
| H3DFloat | z |
The values of the Vec3f are H3DFloat.
|
|
Returns the cross product between this Vec3f and v. The operator* operator can also be used to get the dot product between two vectors. |
|
|
Returns the dot product between this Vec3f and v. The operator* operator can also be used to get the dot product between two vectors. |
|
|
Normalize the vector to be of length 1.
|
|
|
Normalize the vector to be of length 1. If the vector is of zero length nothing will be done. |
1.4.5