vector3 is a templatized class for 3-Dimensional vectors.
Similar in style to std::complex.
The most recent uses I have had for it are in ray tracing of scattered
light through an experimental setup, and in calculating the bending
parameters for a pipe of a certain shape.
More Advanced Features:
- Constructor and component access.
- Addition and subtraction of vectors.
- Multiplying and dividing vectors with scalers.
- Dot and Cross products of vectors.
- Length (norm) calculation an conversion to unit vectors.
- Stream I/O.
- Spherical coordinates
- Cylindrical coordinates
- Rotations (around principle axes and general axes)
- Reflection by a surface
- Refraction across an interface (Snell's law).