vec3 Class Reference
[3D vectors]
#include <vec3.h>
List of all members.
Detailed Description
Class representing a 3D cartesian vector.
Definition at line 44 of file vec3.h.
Constructor & Destructor Documentation
Default constructor. Does not initialize x, y, and z.
Definition at line 52 of file vec3.h.
vec3::vec3 |
( |
double |
xc, |
|
|
double |
yc, |
|
|
double |
zc | |
|
) |
| | [inline] |
Creates a vector with the coordinates xc, yc, and zc.
Definition at line 54 of file vec3.h.
Member Function Documentation
void vec3::set_z_phi |
( |
double |
z_, |
|
|
double |
phi | |
|
) |
| | [inline] |
Creates a unit vector from a z coordinate and an azimuthal angle.
Definition at line 58 of file vec3.h.
void vec3::Normalize |
( |
|
) |
[inline] |
Normalizes the vector to length 1.
Definition at line 68 of file vec3.h.
double vec3::Length |
( |
|
) |
const [inline] |
Returns the length of the vector.
Definition at line 76 of file vec3.h.
double vec3::SquaredLength |
( |
|
) |
const [inline] |
Returns the squared length of the vector.
Definition at line 80 of file vec3.h.
const vec3 vec3::operator- |
( |
|
) |
const [inline] |
Returns the vector with the signs of all coordinates flipped.
Definition at line 83 of file vec3.h.
void vec3::Flip |
( |
|
) |
[inline] |
Flips the signs of all coordinates.
Definition at line 86 of file vec3.h.
const vec3 vec3::operator- |
( |
const vec3 & |
vec |
) |
const [inline] |
Subtracts vec from the vector.
Definition at line 89 of file vec3.h.
const vec3 vec3::operator+ |
( |
const vec3 & |
vec |
) |
const [inline] |
Adds vec to the vector.
Definition at line 92 of file vec3.h.
const vec3 vec3::operator* |
( |
double |
fact |
) |
const [inline] |
Returns the vector scaled by fact.
Definition at line 95 of file vec3.h.
const vec3 vec3::operator/ |
( |
double |
fact |
) |
const [inline] |
Returns the vector scaled by 1/fact.
Definition at line 98 of file vec3.h.
vec3& vec3::operator*= |
( |
double |
fact |
) |
[inline] |
Scales the vector by fact.
Definition at line 101 of file vec3.h.
Member Data Documentation
x-coordinate
Definition at line 47 of file vec3.h.
y-coordinate
Definition at line 47 of file vec3.h.
z-coordinate
Definition at line 47 of file vec3.h.
The documentation for this class was generated from the following file: