VIPER REFERENCE MANUAL


NAME
iflXYZ - x,y,z triplet template class with aritmetic operations

HEADER FILE
#include <ifl/iflCoord.h>

PUBLIC METHOD SUMMARY

   Constructing
template<class T> iflXYZ (  );
template<class T> iflXYZ ( s);
template<class T> iflXYZ ( x, T y, T z);
template<class T> iflXYZ ( const iflXYZ& that);

   Initializing
iflXYZ& init ( X, T Y, T Z);

   Assignment operators
inline iflXYZ& operator= ( const iflXYZ& that);
inline iflXYZ& operator+= ( const iflXYZ& that);
inline iflXYZ& operator-= ( const iflXYZ& that);
inline iflXYZ& operator*= ( const iflXYZ& that);
inline iflXYZ& operator/= ( const iflXYZ& that);
inline iflXYZ& operator%= ( const iflXYZ& that);
inline iflXYZ& operator&= ( const iflXYZ& that);
inline iflXYZ& operator|= ( const iflXYZ& that);

   Comparison operators
inline int operator== ( const iflXYZ& that) const;
inline int operator!= ( const iflXYZ& that) const;
inline int operator<= ( const iflXYZ& that) const;
inline int operator>= ( const iflXYZ& that) const;
inline int operator< ( const iflXYZ& that) const;
inline int operator> ( const iflXYZ& that) const;

   Componentwise arithmetic operators
inline iflXYZ operator+ ( const iflXYZ& that) const;
inline iflXYZ operator- ( const iflXYZ& that) const;
inline iflXYZ operator* ( const iflXYZ& that) const;
inline iflXYZ operator/ ( const iflXYZ& that) const;
inline iflXYZ operator% ( const iflXYZ& that) const;
inline iflXYZ operator& ( const iflXYZ& that) const;
inline iflXYZ operator| ( const iflXYZ& that) const;

   Indexed member access
T& operator[] ( iflAxis axis);

PUBLIC MEMBER SUMMARY
T x, y, z;

CLASS DESCRIPTION
This is a simple template class to hold (x,y,z) triplets. It also defines a number of convenience operators.

METHOD DESCRIPTIONS

   iflXYZ()
template<class T> iflXYZ (  );
template<class T> iflXYZ ( s);
template<class T> iflXYZ ( x, T y, T z);
template<class T> iflXYZ ( const iflXYZ& that);

The first constructor creates an uninitialized object. The remaining constructors create an iflXYZ initialized from either a scalar value, s, (assigned to all members), a triplet of values, x, y and z (assigned to each corresponding member) or another iflXYZ object, that, of the same type (copied to the new object).

   Assignment operators
inline iflXYZ& operator= ( const iflXYZ& that);
inline iflXYZ& operator+= ( const iflXYZ& that);
inline iflXYZ& operator-= ( const iflXYZ& that);
inline iflXYZ& operator*= ( const iflXYZ& that);
inline iflXYZ& operator/= ( const iflXYZ& that);
inline iflXYZ& operator%= ( const iflXYZ& that);
inline iflXYZ& operator&= ( const iflXYZ& that);
inline iflXYZ& operator|= ( const iflXYZ& that);

These methods perform standard assignment operators between each member of this object and the object indicated by that.

   Comparison operators
inline int operator== ( const iflXYZ& that) const;
inline int operator!= ( const iflXYZ& that) const;
inline int operator<= ( const iflXYZ& that) const;
inline int operator>= ( const iflXYZ& that) const;
inline int operator< ( const iflXYZ& that) const;
inline int operator> ( const iflXYZ& that) const;

These method performs standard comparison operators between each member of this object and the object indicated by that.

   Componentwise arithmetic operators
inline iflXYZ operator+ ( const iflXYZ& that) const;
inline iflXYZ operator- ( const iflXYZ& that) const;
inline iflXYZ operator* ( const iflXYZ& that) const;
inline iflXYZ operator/ ( const iflXYZ& that) const;
inline iflXYZ operator% ( const iflXYZ& that) const;
inline iflXYZ operator& ( const iflXYZ& that) const;
inline iflXYZ operator| ( const iflXYZ& that) const;

These method performs standard aritmetic and bit operators between each member of this object and the object indicated by that.

   init()
iflXYZ& init ( X, T Y, T Z);

The iflXYZ object's x, y, z members are initialized from a triplet of values, X, Y and Z, respectively.

   operator[]()
T& operator[] ( iflAxis axis);

This method accesses the members of this object as if it were stored as a three element array with x at index 0 and z at index 2. These offsets are also encoded symbolically using the iflAxis enum as iflX, iflY and iflZ.

MEMBER DESCRIPTIONS

   x, y, z
T x, y, z;

The triplet of values of type T stored in an iflXYZ<T> object.