/*------------------------------------------------------------------------------
 src/lib/dj/djVec3_.h
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

namespace dj {

template <class T>
Vec<3, T>::Vec()
{}

template <class T>
Vec<3, T>::Vec(const T & x, const T & y, const T & z)
{
  _Vec<3, T>::_v[0] = x;
  _Vec<3, T>::_v[1] = y;
  _Vec<3, T>::_v[2] = z;
}

template <class T>
Vec<3, T>::Vec(const T & in)
{
  _Vec<3, T>::_v[0] = _Vec<3, T>::_v[1] = _Vec<3, T>::_v[2] = in;
}

template <class T>
void Vec<3, T>::set(const T & x, const T & y, const T & z)
{
  _Vec<3, T>::_v[0] = x;
  _Vec<3, T>::_v[1] = y;
  _Vec<3, T>::_v[2] = z;
}

template <class T>
void Vec<3, T>::x(const T & in) { _Vec<3, T>::_v[0] = in; };
template <class T>
void Vec<3, T>::y(const T & in) { _Vec<3, T>::_v[1] = in; };
template <class T>
void Vec<3, T>::z(const T & in) { _Vec<3, T>::_v[2] = in; };

template <class T>
const T & Vec<3, T>::x() const { return _Vec<3, T>::_v[0]; }
template <class T>
const T & Vec<3, T>::y() const { return _Vec<3, T>::_v[1]; }
template <class T>
const T & Vec<3, T>::z() const { return _Vec<3, T>::_v[2]; }

}
