/// Copyright (c) 2010 Ruben Penalva. All rights reserved.
/// Redistribution and use in source and binary forms, with or without modification, 
/// are permitted provided that the following conditions are met:
///    1. Redistributions of source code must retain the above copyright notice, this 
///    list of conditions and the following disclaimer.
///    2. Redistributions in binary form must reproduce the above copyright notice,
///    this list of conditions and the following disclaimer in the documentation and/or
///    other materials provided with the distribution.
///    3. The name of the author may not be used to endorse or promote products derived
///    from this software without specific prior written permission.
///
/// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
/// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
/// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 
/// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 
/// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
/// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
/// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#ifndef _VECTOR3_H_
#define _VECTOR3_H_

namespace TestFrameWork
{

class Vector3
{
public:
	Vector3(void);

	Vector3(float x, float y, float z);

	Vector3(const Vector3& vector);

	~Vector3(void);

	Vector3 Cross(const Vector3& v) const;

	float Dot(const Vector3& v) const;

	Vector3& Normalize(void);

	float Length(void) const;

	Vector3& operator=(const Vector3& vector);

	Vector3& operator+=(const Vector3& vector);

	Vector3& operator*=(const Vector3& vector);

	Vector3& operator/=(float constant);

	Vector3& operator*=(float constant);

	Vector3 operator-(void);

	float m_x;
	float m_y;
	float m_z;
};

Vector3 operator+(const Vector3& leftV, const Vector3& rightV);

Vector3 operator-(const Vector3& leftV, const Vector3& rightV);

Vector3 operator*(const Vector3& leftV, const Vector3& rightV);

Vector3 operator*(const Vector3& leftV, float k);

Vector3 operator*(float k, const Vector3& rightV);

Vector3 Interpolate(const Vector3& leftV, const Vector3& rightV, float k);

Vector3 Max(const Vector3& leftV, const Vector3& rightV);

Vector3 Truncate(const Vector3& leftV, const Vector3& rightV);

Vector3 Normalize(const Vector3& vector);

bool IsFinite(const Vector3& vector);

}

#endif