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
CGFMath.h
Go to the documentation of this file.
1 // Filename: CGFMath.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 "Vector2f.h"
10 #include "Vector3f.h"
11 #include <math.h>
12 #include "CGFInclude.h"
13 
14 using namespace CGF;
15 
16 //Defines
17 #define DEGREE_IN_RADIANS 0.0174532925f
18 #define PI 3.14159265359
19 
20 //Methods
21 CGF_API float DegreesToRadians(float degrees);
22 CGF_API float RadiansToDegrees(float degrees);
23 
24 XMMATRIX CreateTranslateMatrix(const Vector2f translation);
25 XMMATRIX CreateTranslateMatrix(const Vector3f translation);
26 
27 XMMATRIX CreateRotationXMatrix(const float angle);
28 XMMATRIX CreateRotationYMatrix(const float angle);
29 XMMATRIX CreateRotationZMatrix(const float angle);
30 
31 XMMATRIX Create2DScaleMatrix(const float scaleFactor);
32 XMMATRIX Create3DScaleMatrix(const float scaleFactor);