C++ Game Framework  2013-06-04
CGF is a DirectX 11 game framework, built in C++ and DirectX 11. This is used to contain many to the DirectX functionality and wrap them into a framework to make game development easier.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Vector2f.h
Go to the documentation of this file.
1 // Filename: Vector2f.h
4 
5 //Preprocessor directive designed to cause the current source file to be included only once in a single compilation
6 #pragma once
7 
8 //Includes
9 #include <math.h>
10 #include "CGFInclude.h"
11 #include <DirectXMath.h>
12 
13 using namespace DirectX;
14 
15 namespace CGF
16 {
18  {
19  public:
20  Vector2f();
21  Vector2f(const Vector2f &copy);
22  Vector2f(float x, float y);
23  ~Vector2f();
24 
25  float Length();
26  void Normalize();
27 
28  XMFLOAT3 GetD3DXVector();
29 
30  Vector2f& operator=(const Vector2f &param);
31  Vector2f& operator+= (const Vector2f &param);
32  Vector2f& operator-= (const Vector2f &param);
33  Vector2f& operator*= (const float &param);
34  Vector2f& operator/= (const float &param);
35  const Vector2f operator+ (const Vector2f &param) const ;
36  const Vector2f operator- (const Vector2f &param)const ;
37  const Vector2f operator* (const float &param)const ;
38  const Vector2f operator/ (const float &param)const ;
39 
40  public:
41  float X;
42  float Y;
43  };
44 }