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.cpp File Reference
#include "CGFMath.h"

Functions

float DegreesToRadians (float degrees)
 
float RadiansToDegrees (float radians)
 
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)
 

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

float DegreesToRadians ( float  degrees)

Convert an angle from degrees to radians

Angle in Degrees

float RadiansToDegrees ( float  radians)

Convert an angle from radians to degrees

Angle in Radians