//
// Created by trotfunky on 30/09/2019.
//

#ifndef TESTS_OPENGL_TYPES_H
#define TESTS_OPENGL_TYPES_H

#include <fstream>


template <typename T>
struct Vec2
{
    T x;
    T y;

    friend std::fstream& operator>>(std::fstream& stream, Vec2& vec2)
    {
        stream >> vec2.x >> vec2.y;
        return stream;
    }
};

template <typename T>
struct Vec3
{
    T x;
    T y;
    T z;

    friend std::fstream& operator>>(std::fstream& stream, Vec3& vec3)
    {
        stream >> vec3.x >> vec3.y >> vec3.z;
        return stream;
    }
};


// Define aliases for common types
typedef Vec2<int> Vec2i;
typedef Vec2<float> Vec2f;

typedef Vec3<int> Vec3i;
typedef Vec3<float> Vec3f;


#endif //TESTS_OPENGL_TYPES_H
