1. 4FIPS
  2. PHOTOS
  3. VIDEOS
  4. APPS
  5. CODE
  6. FORUMS
  7. ABOUT
/*
(c) 2013 +++ Filip Stoklas, aka FipS, http://www.4FipS.com +++
THIS CODE IS FREE - LICENSED UNDER THE MIT LICENSE
ARTICLE URL: http://forums.4fips.com/viewtopic.php?f=3&t=1068
*/

#ifndef FS_HEADER__vector3_h__GUARD
#define FS_HEADER__vector3_h__GUARD

template <typename T>
struct Vector3
{
    Vector3();
    Vector3(T x, T y, T z);
    //...

    T x, y, z;
};

template <typename T> T dot(const Vector3<T> &a, const Vector3<T> &b);
//...

// note that these types are explicitly instantiated in .cpp:
typedef Vector3<float> Vector3_f;
typedef Vector3<double> Vector3_d;

#endif // FS_HEADER__vector3_h__GUARD