先添加一个普通类,
Vector3.h,
// Vector3.h: interface for the Vector3 class.
//
//#if !defined(AFX_VECTOR3_H__53D34D26_95FF_4377_BD54_57F4271918A4__INCLUDED_)
#define AFX_VECTOR3_H__53D34D26_95FF_4377_BD54_57F4271918A4__INCLUDED_#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000#include <cmath>class Vector3 {
public:float x, y, z;// 构造函数Vector3() : x(0.0f), y(0.0f), z(0.0f) {}Vector3(float x, float y, float z) : x(x), y(y), z(z) {}// 访问器float getX() const { return x; }float getY() const { return y; }float getZ() const { return z; }// 修改