GEL  2
GEL is a library for Geometry and Linear Algebra
Public Member Functions
CGLA::UnitVector Class Reference

The UnitVector stores a unit length vector as two angles. More...

#include <UnitVector.h>

List of all members.

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.

Detailed Description

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations