Vector Vector::operator+(Vector rhs)
{
return Vector(_x + rhs.x, _y + rhs._y, _z + rhs._z);
}
I've done this for all the operators and also provided their +=/-= etc operators. Next up is Matrices which will give me the ability to transform a few test points into screen space, I hope!
With the vector class I also wrote a small test program to test every function to make sure it is working correctly. We also did a vector test during the tutorial which I think I did very well on.
No comments:
Post a Comment