- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
Vector3.h
资源名称:虚拟地形建模.rar [点击查看]
上传用户:dfjhuyju
上传日期:2013-03-13
资源大小:11035k
文件大小:1k
源码类别:
OpenGL
开发平台:
Visual C++
- // Vector3.h: interface for the CVector3 class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_VECTOR3_H__86CEA3B2_E253_49A8_AC57_A7F485DB0640__INCLUDED_)
- #define AFX_VECTOR3_H__86CEA3B2_E253_49A8_AC57_A7F485DB0640__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CVector3
- {
- public:
- CVector3();
- virtual ~CVector3();
- CVector3(float X, float Y, float Z)
- {
- x = X; y = Y; z = Z;
- }
- CVector3 operator+(CVector3 vVector)
- {
- return CVector3(vVector.x + x, vVector.y + y, vVector.z + z);
- }
- CVector3 operator-(CVector3 vVector)
- {
- return CVector3(x - vVector.x, y - vVector.y, z - vVector.z);
- }
- CVector3 operator*(float num)
- {
- return CVector3(x * num, y * num, z * num);
- }
- CVector3 operator/(float num)
- {
- return CVector3(x / num, y / num, z / num);
- }
- float x, y, z;
- };
- CVector3 Cross(CVector3 vVector1, CVector3 vVector2);
- float Magnitude(CVector3 vNormal);
- CVector3 Normalize(CVector3 vVector);
- #endif // !defined(AFX_VECTOR3_H__86CEA3B2_E253_49A8_AC57_A7F485DB0640__INCLUDED_)