00001
00002
00004
00005 #if !defined(AFX_VECTOR3D_H__F5482D1E_45D0_4FF2_8176_00B77C4862A1__INCLUDED_)
00006 #define AFX_VECTOR3D_H__F5482D1E_45D0_4FF2_8176_00B77C4862A1__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012
00013 #include "SinTable.h"
00014 #include "CosTable.h"
00015
00017 class CVector3D
00018 {
00019 public:
00020 CVector3D();
00022 CVector3D(float xComp, float yComp, float zComp);
00023 virtual ~CVector3D();
00024
00025 public:
00027 void Mult(float *matrix4D);
00029 static void Normals(CVector3D &unitVec, CVector3D *normals, int num);
00031 bool IsNullVector();
00033 void SetComp(float xComp,float yComp,float zComp);
00035 void Normals(CVector3D *normals, int num);
00037 void Normal(CVector3D &normal);
00039 void Rotate(int angle, CVector3D &axis);
00041 void Normalize();
00043 float Magnitude();
00045 void CrossProduct(CVector3D &source, CVector3D &dest);
00047 float DotProduct(CVector3D &vector3D);
00049 float m_XComp,m_YComp,m_ZComp;
00050
00051 private:
00052 static CSinTable m_SinTable;
00053 static CCosTable m_CosTable;
00055 static CVector3D m_HVec[3];
00056 };
00057
00058 #endif // !defined(AFX_VECTOR3D_H__F5482D1E_45D0_4FF2_8176_00B77C4862A1__INCLUDED_)