vec3_t< T > Class Template Reference
[3D vectors]
#include <vec3.h>
List of all members.
Detailed Description
template<typename T>
class vec3_t< T >
Class representing a 3D cartesian vector.
Definition at line 43 of file vec3.h.
Constructor & Destructor Documentation
Default constructor. Does not initialize x, y, and z.
Definition at line 51 of file vec3.h.
Creates a vector with the coordinates xc, yc, and zc.
Definition at line 53 of file vec3.h.
Member Function Documentation
template<typename T>
void vec3_t< T >::Set |
( |
T |
xc, |
|
|
T |
yc, |
|
|
T |
zc | |
|
) |
| | [inline] |
Sets the vector components to xc, yc, and zc.
Definition at line 59 of file vec3.h.
template<typename T>
void vec3_t< T >::set_z_phi |
( |
T |
z_, |
|
|
T |
phi | |
|
) |
| | [inline] |
Creates a unit vector from a z coordinate and an azimuthal angle.
Definition at line 62 of file vec3.h.
template<typename T>
void vec3_t< T >::Normalize |
( |
|
) |
[inline] |
Normalizes the vector to length 1.
Definition at line 72 of file vec3.h.
template<typename T>
T vec3_t< T >::Length |
( |
|
) |
const [inline] |
Returns the length of the vector.
Definition at line 87 of file vec3.h.
template<typename T>
T vec3_t< T >::SquaredLength |
( |
|
) |
const [inline] |
Returns the squared length of the vector.
Definition at line 91 of file vec3.h.
Returns the vector with the signs of all coordinates flipped.
Definition at line 94 of file vec3.h.
template<typename T>
void vec3_t< T >::Flip |
( |
|
) |
[inline] |
Flips the signs of all coordinates.
Definition at line 97 of file vec3.h.
Returns (*this + vec).
Definition at line 100 of file vec3.h.
Adds vec to *this.
Definition at line 103 of file vec3.h.
Returns (*this - vec).
Definition at line 106 of file vec3.h.
Subtracts vec from *this.
Definition at line 109 of file vec3.h.
template<typename T>
const vec3_t vec3_t< T >::operator* |
( |
T |
fact |
) |
const [inline] |
Returns the vector scaled by fact.
Definition at line 112 of file vec3.h.
template<typename T>
const vec3_t vec3_t< T >::operator/ |
( |
T |
fact |
) |
const [inline] |
Returns the vector scaled by 1/fact.
Definition at line 115 of file vec3.h.
Scales the vector by fact.
Definition at line 118 of file vec3.h.
Member Data Documentation
x-coordinate
Definition at line 46 of file vec3.h.
y-coordinate
Definition at line 46 of file vec3.h.
z-coordinate
Definition at line 46 of file vec3.h.
The documentation for this class was generated from the following file: