// Vector3.h: interface for the Vector3 class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VECTOR3_H__D394104C_457B_4104_829F_ED31C738C9CE__INCLUDED_)
#define AFX_VECTOR3_H__D394104C_457B_4104_829F_ED31C738C9CE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class Point3;

class Vector3
{
public:
	float x;
	float y;
	float z;
	float d;
	float len;

	Vector3();
	Vector3(float tx, float ty, float tz);
	Vector3(const Point3 p);
	virtual ~Vector3();
	void set(float tx, float ty, float tz);
	void set(const Vector3 vc);
	void set(const Point3 vc);
	Vector3 operator+(const Vector3 v);
	Vector3 operator-(const Vector3 v);
	Vector3 operator*(float f);
	Vector3 cross(const Vector3 b);
	float dot(const Vector3 b);
	void normalize();
	void flip();
	void mult(float* m);
	void print();
};

class Point3
{
public:
	Point3();
	Point3(float tx, float ty, float tz);
	Point3(float tx, float ty, float tz, float td);
	virtual ~Point3();
	void set(const Point3& pt);
	void set(float tx, float ty, float tz);
	void build4tuple(float v[]);
	float dot(Point3 p);
	float dot(Vector3 v);
	Point3 operator+(Vector3 v);
	Point3 operator+(float f);

	void times(float c);
	Vector3 operator-(Point3 p);
	void mult(float* m);
	void print();

	float x;
	float y;
	float z;
	float d;
};

#endif // !defined(AFX_VECTOR3_H__D394104C_457B_4104_829F_ED31C738C9CE__INCLUDED_)
