Click here to Skip to main content
15,891,423 members
Articles / Desktop Programming / MFC

State Pattern in C++ Applications

Rate me:
Please Sign up or sign in to vote.
4.68/5 (31 votes)
13 Sep 20014 min read 178.7K   2.6K   85  
Small game framework based on the state pattern
// 3dVector.h: interface for the C3dVector class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_3DVECTOR_H__CFA92936_8E36_11D4_87C2_00C04F73BBBB__INCLUDED_)
#define AFX_3DVECTOR_H__CFA92936_8E36_11D4_87C2_00C04F73BBBB__INCLUDED_

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

class C3dVector  
{
public:
	void Rotate (double alpha);
	void RotateZ(double alpha);
	void RotateY(double alpha);
	void RotateX(double alpha);
	POINT Get2dPos(int zoom, int dist, int width, int height);
	double m_X;
	double m_Y;
	double m_Z;

	C3dVector(double x, double y, double z);
	C3dVector();
	virtual ~C3dVector();

};

#endif // !defined(AFX_3DVECTOR_H__CFA92936_8E36_11D4_87C2_00C04F73BBBB__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions