Added more structure, added abstraction to existing parts

This commit is contained in:
2016-05-11 12:37:18 +02:00
parent 9769b88156
commit 049fb28ffc
25 changed files with 508 additions and 413 deletions
+48
View File
@@ -0,0 +1,48 @@
#include "Vector.h"
Vec3f::Vec3f(float x, float y, float z)
{
this->x = x;
this->y = y;
this->z = z;
}
Vec3f::Vec3f()
{
this->x = 0;
this->y = 0;
this->z = 0;
}
Vec3f::Vec3f(Vec3f &other)
{
this->x = other.x;
this->y = other.y;
this->z = other.z;
}
float& Vec3f::operator [](int index)
{
return v[index];
}
Vec2f::Vec2f(float x, float y)
{
this->x = x;
this->y = y;
}
Vec2f::Vec2f()
{
this->x = 0;
this->y = 0;
}
Vec2f::Vec2f(Vec2f &other)
{
this->x = other.x;
this->y = other.y;
}
float& Vec2f::operator [](int index)
{
return v[index];
}