Added a constructor that will accept a pointer to a float array.

This commit is contained in:
Joshua Jones 2010-03-23 00:04:16 +00:00
parent bbc914109f
commit 4c7ddc0cba
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,10 @@ namespace cAudio
{
}
cVector3(float* vector) : x(vector[0]), y(vector[1]), z(vector[2])
{
}
cVector3 operator-() const { return cVector3(-x, -y, -z); }
cVector3& operator=(const cVector3& other) { x = other.x; y = other.y; z = other.z; return *this; }
cVector3 operator+(const cVector3& other) const { return cVector3(x + other.x, y + other.y, z + other.z); }