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 File Reference
#include "Vector2f.h"
#include "Vector3f.h"
#include <math.h>
#include "CGFInclude.h"

Go to the source code of this file.

Macros

#define DEGREE_IN_RADIANS   0.0174532925f
 
#define PI   3.14159265359
 

Functions

CGF_API float DegreesToRadians (float degrees)
 
CGF_API float RadiansToDegrees (float degrees)
 
XMMATRIX CreateTranslateMatrix (const Vector2f translation)
 
XMMATRIX CreateTranslateMatrix (const Vector3f translation)
 
XMMATRIX CreateRotationXMatrix (const float angle)
 
XMMATRIX CreateRotationYMatrix (const float angle)
 
XMMATRIX CreateRotationZMatrix (const float angle)
 
XMMATRIX Create2DScaleMatrix (const float scaleFactor)
 
XMMATRIX Create3DScaleMatrix (const float scaleFactor)
 

Macro Definition Documentation

#define DEGREE_IN_RADIANS   0.0174532925f
#define PI   3.14159265359

Function Documentation

XMMATRIX Create2DScaleMatrix ( const float  scaleFactor)

Calculate a scale matrix for a 2D object

Amount to scale by

XMMATRIX Create3DScaleMatrix ( const float  scaleFactor)

Calculate a scale matrix for a 3D object

Amount to scale by

XMMATRIX CreateRotationXMatrix ( const float  angle)

Calculate a rotation matrix around the X axis

Angle to rotate in degrees

XMMATRIX CreateRotationYMatrix ( const float  angle)

Calculate a rotation matrix around the Y axis

Angle to rotate in degrees

XMMATRIX CreateRotationZMatrix ( const float  angle)

Calculate a rotation matrix around the Z axis

Angle to rotate in degrees

XMMATRIX CreateTranslateMatrix ( const Vector2f  translation)

Calculate a translation matrix

Translation in 2D form

XMMATRIX CreateTranslateMatrix ( const Vector3f  translation)

Calculate a translation matrix

Translation in 3D form

CGF_API float DegreesToRadians ( float  degrees)

Convert an angle from degrees to radians

Angle in Degrees

CGF_API float RadiansToDegrees ( float  radians)

Convert an angle from radians to degrees

Angle in Radians