#include "Vertex.hpp"
#include "Graphics.hpp"
#include <iomanip>
#ifdef _MSC_VER
  #include <windows.h>
  #define GLEW_STATIC
  #include <GL/glew.h>
#else
  #include <GL/gl.h>
#endif

Vertex::Vertex(
  const double x,
  const double y,
  const double z,
  const double r,
  const double g,
  const double b
) : Vector(
  x,
  y,
  z
), Color(
  r,
  g,
  b
) {
}

Vertex::Vertex(
  const Vector& v,
  const Color& c
) : Vector(v), Color(c) {
}

void Vertex::render() const {
  Color::render();
  glVertex3d(
    x,
    y,
    z
  );
}

Vertex& Vertex::operator = (const Vector& v) {
  Vector::operator = (v);
  return *this;
}

Vertex& Vertex::operator += (const Vector& v) {
  Vector::operator += (v);
  return *this;
}

Vertex& Vertex::operator -= (const Vector& v) {
  Vector::operator -= (v);
  return *this;
}

Vertex& Vertex::operator *= (const Matrix& m) {
  Vector::operator *= (m);
  return *this;
}

Vertex& Vertex::operator = (const Color& c) {
  Color::operator = (c);
  return *this;
}
