|
GEL
2
GEL is a library for Geometry and Linear Algebra
|
The UnitVector stores a unit length vector as two angles. More...
#include <UnitVector.h>
Public Member Functions | |
| UnitVector (const Vec3f &v) | |
| Construct unitvector from normal vector. | |
| UnitVector () | |
| Construct default unit vector. | |
| float | t () const |
| Get theta angle. | |
| float | f () const |
| Get phi angle. | |
| operator Vec3f () const | |
| Reconstruct Vec3f from unit vector. | |
| bool | operator== (const UnitVector &u) const |
| Test for equality. | |
The UnitVector stores a unit length vector as two angles.
A vector stored as two (fix point) angles is much smaller than vector stored in the usual way. On a 32 bit architecture this class should take up four bytes. not too bad.
1.7.5.1