/********************************************************************
 * File: Orientation.h
 * Author: Keith Schwarz (htiek@cs.stanford.edu)
 *
 * A class representing an orientation in 3-space.  This is represented
 * by three vectors, the target vector (where the object is pointing),
 * the up vector (which direction is straight up), and the right vector
 * (which vector is to the right).  Because we use a left-handed coordinate
 * system, the right vector should satisfy r = u x t.  Moreover, the basis
 * should be orthonormal, meaning that
 *
 * ||r|| = ||u|| = ||t|| = 1
 * r.u = u.t = t.r = 0
 *
 * Orientations are immutable; once created, they cannot be modified.
 */
#ifndef Orientation_Included
#define Orientation_Included

#include "Matrix.h"

namespace Copper3D
{
	class Orientation
	{
	public:
		/* Creates the canonical orientation. */
		Orientation();

		/* Constructs an orientation out of the r, u, and t vectors. */
		Orientation(const Vector<3>& r, const Vector<3>& u, const Vector<3>& t);

		const Vector<3>& r() const;
		const Vector<3>& u() const;
		const Vector<3>& t() const;

	private:
		Vector<3> mR, mU, mT;
	};
}

#endif
