Boost logo

Boost :

From: Stefan Koch (maillist_at_[hidden])
Date: 2005-04-23 14:12:23


Any interest in a templatized class for 3-Dimensional vectors?
(Similar in style to std::complex or boost math/octonion and
math/quaternion.)

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.

Basic 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.

More Advanced Features:
    Spherical coordinates
    Cylindrical coordinates
    Rotations (around principle axes and general axes)
    Reflection by a surface
    Refraction across an interface (Snell's law).

Rotations are specified by the axis about which the rotation is to be
done, and the angle through which to rotate. There is no support for
general rotation matrices.

What do you think?

Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk