Overload  1.1
Game engine with editor
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OvMaths::FMatrix4 Struct Reference

#include <FMatrix4.h>

Public Member Functions

 FMatrix4 ()
 
 FMatrix4 (float p_element1, float p_element2, float p_element3, float p_element4, float p_element5, float p_element6, float p_element7, float p_element8, float p_element9, float p_element10, float p_element11, float p_element12, float p_element13, float p_element14, float p_element15, float p_element16)
 
 FMatrix4 (const FMatrix4 &p_other)
 
FMatrix4operator= (const FMatrix4 &p_other)
 
bool operator== (const FMatrix4 &p_other)
 
FMatrix4 operator+ (const FMatrix4 &p_other) const
 
FMatrix4operator+= (const FMatrix4 &p_other)
 
FMatrix4 operator- (float p_scalar) const
 
FMatrix4 operator- (const FMatrix4 &p_other) const
 
FMatrix4operator-= (const FMatrix4 &p_other)
 
FMatrix4 operator* (float p_scalar) const
 
FMatrix4operator*= (float p_scalar)
 
FVector4 operator* (const FVector4 &p_vector) const
 
FMatrix4 operator* (const FMatrix4 &p_other) const
 
FMatrix4operator*= (const FMatrix4 &p_other)
 
FMatrix4 operator/ (float p_scalar) const
 
FMatrix4operator/= (float p_scalar)
 
FMatrix4 operator/ (const FMatrix4 &p_other) const
 
FMatrix4operator/= (const FMatrix4 &p_other)
 
float & operator() (uint8_t p_row, uint8_t p_column)
 

Static Public Member Functions

static bool AreEquals (const FMatrix4 &p_left, const FMatrix4 &p_right)
 
static FMatrix4 Add (const FMatrix4 &p_left, float p_scalar)
 
static FMatrix4 Add (const FMatrix4 &p_left, const FMatrix4 &p_right)
 
static FMatrix4 Subtract (const FMatrix4 &p_left, float p_scalar)
 
static FMatrix4 Subtract (const FMatrix4 &p_left, const FMatrix4 &p_right)
 
static FMatrix4 Multiply (const FMatrix4 &p_left, float p_scalar)
 
static FVector4 Multiply (const FMatrix4 &p_matrix, const FVector4 &p_vector)
 
static FMatrix4 Multiply (const FMatrix4 &p_left, const FMatrix4 &p_right)
 
static FMatrix4 Divide (const FMatrix4 &p_left, float p_scalar)
 
static FMatrix4 Divide (const FMatrix4 &p_left, const FMatrix4 &p_right)
 
static bool IsIdentity (const FMatrix4 &p_matrix)
 
static float GetMinor (float p_minor0, float p_minor1, float p_minor2, float p_minor3, float p_minor4, float p_minor5, float p_minor6, float p_minor7, float p_minor8)
 
static float Determinant (const FMatrix4 &p_matrix)
 
static FMatrix4 Transpose (const FMatrix4 &p_matrix)
 
static FMatrix4 Inverse (const FMatrix4 &p_matrix)
 
static FMatrix4 Translation (const FVector3 &p_translation)
 
static FMatrix4 Translate (const FMatrix4 &p_matrix, const FVector3 &p_translation)
 
static FMatrix4 RotationOnAxisX (float p_rotation)
 
static FMatrix4 RotateOnAxisX (const FMatrix4 &p_matrix, float p_rotation)
 
static FMatrix4 RotationOnAxisY (float p_rotation)
 
static FMatrix4 RotateOnAxisY (const FMatrix4 &p_matrix, float p_rotation)
 
static FMatrix4 RotationOnAxisZ (float p_rotation)
 
static FMatrix4 RotateOnAxisZ (const FMatrix4 &p_matrix, float p_rotation)
 
static FMatrix4 RotationYXZ (float p_rotation)
 
static FMatrix4 RotateYXZ (const FMatrix4 &p_matrix, float p_rotation)
 
static FMatrix4 Scaling (const FVector3 &p_scale)
 
static FMatrix4 Scale (const FMatrix4 &p_matrix, const FVector3 &p_scale)
 
static FMatrix4 CreatePerspective (const float p_fov, const float p_aspectRatio, const float p_zNear, const float p_zFar)
 
static FMatrix4 CreateView (const float p_eyeX, const float p_eyeY, const float p_eyeZ, const float p_lookX, const float p_lookY, const float p_lookZ, const float p_upX, const float p_upY, const float p_upZ)
 
static FMatrix4 CreateFrustum (const float p_left, const float p_right, const float p_bottom, const float p_top, const float p_zNear, const float p_zFar)
 
static FVector4 GetRow (const FMatrix4 &p_matrix, uint8_t p_row)
 
static FVector4 GetColumn (const FMatrix4 &p_matrix, uint8_t p_column)
 

Public Attributes

float data [16]
 

Static Public Attributes

static const FMatrix4 Identity
 

Detailed Description

Mathematic representation of a 4x4 Matrix of floats

Constructor & Destructor Documentation

◆ FMatrix4() [1/3]

OvMaths::FMatrix4::FMatrix4 ( )

Default constructor

◆ FMatrix4() [2/3]

OvMaths::FMatrix4::FMatrix4 ( float  p_element1,
float  p_element2,
float  p_element3,
float  p_element4,
float  p_element5,
float  p_element6,
float  p_element7,
float  p_element8,
float  p_element9,
float  p_element10,
float  p_element11,
float  p_element12,
float  p_element13,
float  p_element14,
float  p_element15,
float  p_element16 
)

Constructor

Parameters
p_element1

◆ FMatrix4() [3/3]

OvMaths::FMatrix4::FMatrix4 ( const FMatrix4 p_other)

Copy constructor

Parameters
p_other

Member Function Documentation

◆ Add() [1/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::Add ( const FMatrix4 p_left,
const FMatrix4 p_right 
)
static

Element-wise addition

Parameters
p_left
p_right

◆ Add() [2/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::Add ( const FMatrix4 p_left,
float  p_scalar 
)
static

Element-wise addition

Parameters
p_left
p_scalar

◆ AreEquals()

bool OvMaths::FMatrix4::AreEquals ( const FMatrix4 p_left,
const FMatrix4 p_right 
)
static

Check if elements are equals

Parameters
p_left
p_right

◆ CreateFrustum()

OvMaths::FMatrix4 OvMaths::FMatrix4::CreateFrustum ( const float  p_left,
const float  p_right,
const float  p_bottom,
const float  p_top,
const float  p_zNear,
const float  p_zFar 
)
static

Return frustum matrix

Parameters
p_left
p_right
p_bottom
p_top
p_zNear
p_zFar

◆ CreatePerspective()

OvMaths::FMatrix4 OvMaths::FMatrix4::CreatePerspective ( const float  p_fov,
const float  p_aspectRatio,
const float  p_zNear,
const float  p_zFar 
)
static

Return perspective matrix

Parameters
p_fov
p_aspectRatio
p_zNear
p_zFar

◆ CreateView()

OvMaths::FMatrix4 OvMaths::FMatrix4::CreateView ( const float  p_eyeX,
const float  p_eyeY,
const float  p_eyeZ,
const float  p_lookX,
const float  p_lookY,
const float  p_lookZ,
const float  p_upX,
const float  p_upY,
const float  p_upZ 
)
static

Return view matrix

Parameters
p_eyeX
p_eyeY
p_eyeZ
p_lookX
p_lookY
p_lookZ
p_upX
p_upY
p_upZ

◆ Determinant()

float OvMaths::FMatrix4::Determinant ( const FMatrix4 p_matrix)
static

Compute matrix determinant

Parameters
p_matrix

◆ Divide() [1/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::Divide ( const FMatrix4 p_left,
const FMatrix4 p_right 
)
static

Matrix Division

Parameters
p_left
p_right

◆ Divide() [2/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::Divide ( const FMatrix4 p_left,
float  p_scalar 
)
static

Scalar Division

Parameters
p_left
p_scalar

◆ GetColumn()

OvMaths::FVector4 OvMaths::FMatrix4::GetColumn ( const FMatrix4 p_matrix,
uint8_t  p_column 
)
static

Get Column

Parameters
p_column

◆ GetMinor()

float OvMaths::FMatrix4::GetMinor ( float  p_minor0,
float  p_minor1,
float  p_minor2,
float  p_minor3,
float  p_minor4,
float  p_minor5,
float  p_minor6,
float  p_minor7,
float  p_minor8 
)
static

Return Minor of matrix

Parameters
p_minor0

◆ GetRow()

OvMaths::FVector4 OvMaths::FMatrix4::GetRow ( const FMatrix4 p_matrix,
uint8_t  p_row 
)
static

Get row

Parameters
p_row

◆ Inverse()

OvMaths::FMatrix4 OvMaths::FMatrix4::Inverse ( const FMatrix4 p_matrix)
static

Return inverse matrix

Parameters
p_matrix

◆ IsIdentity()

bool OvMaths::FMatrix4::IsIdentity ( const FMatrix4 p_matrix)
static

Compare to Identity matrix

Parameters
p_matrix

◆ Multiply() [1/3]

OvMaths::FMatrix4 OvMaths::FMatrix4::Multiply ( const FMatrix4 p_left,
const FMatrix4 p_right 
)
static

Matrix Product

Parameters
p_left
p_right

◆ Multiply() [2/3]

OvMaths::FMatrix4 OvMaths::FMatrix4::Multiply ( const FMatrix4 p_left,
float  p_scalar 
)
static

Scalar Product

Parameters
p_left
p_scalar

◆ Multiply() [3/3]

OvMaths::FVector4 OvMaths::FMatrix4::Multiply ( const FMatrix4 p_matrix,
const FVector4 p_vector 
)
static

Vector Product

Parameters
p_matrix
p_vector

◆ operator()()

float & OvMaths::FMatrix4::operator() ( uint8_t  p_row,
uint8_t  p_column 
)

Get element at index (row,column)

Parameters
p_row
p_column

◆ operator*() [1/3]

OvMaths::FMatrix4 OvMaths::FMatrix4::operator* ( const FMatrix4 p_other) const

Matrix Product

Parameters
p_other

◆ operator*() [2/3]

OvMaths::FVector4 OvMaths::FMatrix4::operator* ( const FVector4 p_vector) const

Vector Product

Parameters
p_vector

◆ operator*() [3/3]

OvMaths::FMatrix4 OvMaths::FMatrix4::operator* ( float  p_scalar) const

Scalar Product

Parameters
p_scalar

◆ operator*=() [1/2]

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator*= ( const FMatrix4 p_other)

Matrix Product

Parameters
p_other

◆ operator*=() [2/2]

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator*= ( float  p_scalar)

Scalar Product

Parameters
p_scalar

◆ operator+()

OvMaths::FMatrix4 OvMaths::FMatrix4::operator+ ( const FMatrix4 p_other) const

Element-wise addition

Parameters
p_other

◆ operator+=()

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator+= ( const FMatrix4 p_other)

Element-wise addition

Parameters
p_other

◆ operator-() [1/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::operator- ( const FMatrix4 p_other) const

Element-wise subtraction

Parameters
p_other

◆ operator-() [2/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::operator- ( float  p_scalar) const

Element-wise subtraction

Parameters
p_other

◆ operator-=()

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator-= ( const FMatrix4 p_other)

Element-wise subtraction

Parameters
p_other

◆ operator/() [1/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::operator/ ( const FMatrix4 p_other) const

Matrix Division

Parameters
p_other

◆ operator/() [2/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::operator/ ( float  p_scalar) const

Scalar Division

Parameters
p_scalar

◆ operator/=() [1/2]

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator/= ( const FMatrix4 p_other)

Matrix Division

Parameters
p_other

◆ operator/=() [2/2]

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator/= ( float  p_scalar)

Scalar Division

Parameters
p_scalar

◆ operator=()

OvMaths::FMatrix4 & OvMaths::FMatrix4::operator= ( const FMatrix4 p_other)

Copy assignment

Parameters
p_other

◆ operator==()

bool OvMaths::FMatrix4::operator== ( const FMatrix4 p_other)

Check if elements are equals

Parameters
p_other

◆ RotateOnAxisX()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotateOnAxisX ( const FMatrix4 p_matrix,
float  p_rotation 
)
static

Rotate Matrix in 3D on X axis

Parameters
p_matrix
p_rotation

◆ RotateOnAxisY()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotateOnAxisY ( const FMatrix4 p_matrix,
float  p_rotation 
)
static

Rotate Matrix in 3D on Y axis

Parameters
p_matrix
p_rotation

◆ RotateOnAxisZ()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotateOnAxisZ ( const FMatrix4 p_matrix,
float  p_rotation 
)
static

Rotate Matrix in 3D on Z axis

Parameters
p_matrix
p_rotation

◆ RotateYXZ()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotateYXZ ( const FMatrix4 p_matrix,
float  p_rotation 
)
static

Rotate Matrix in 3D on XYZ axis

Parameters
p_matrix
p_rotation

◆ RotationOnAxisX()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotationOnAxisX ( float  p_rotation)
static

Return 3D rotation matrix on X axis

Parameters
p_rotation

◆ RotationOnAxisY()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotationOnAxisY ( float  p_rotation)
static

Return 3D rotation matrix on Y axis

Parameters
p_rotation

◆ RotationOnAxisZ()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotationOnAxisZ ( float  p_rotation)
static

Return 3D rotation matrix on Z axis

Parameters
p_rotation

◆ RotationYXZ()

OvMaths::FMatrix4 OvMaths::FMatrix4::RotationYXZ ( float  p_rotation)
static

Return 3D rotation matrix on XYZ axis

Parameters
p_rotation

◆ Scale()

OvMaths::FMatrix4 OvMaths::FMatrix4::Scale ( const FMatrix4 p_matrix,
const FVector3 p_scale 
)
static

Scale matrix in 3D

Parameters
p_matrix
p_scale

◆ Scaling()

OvMaths::FMatrix4 OvMaths::FMatrix4::Scaling ( const FVector3 p_scale)
static

Return 3D scaling matrix

Parameters
p_scale

◆ Subtract() [1/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::Subtract ( const FMatrix4 p_left,
const FMatrix4 p_right 
)
static

Element-wise subtractions

Parameters
p_left
p_right

◆ Subtract() [2/2]

OvMaths::FMatrix4 OvMaths::FMatrix4::Subtract ( const FMatrix4 p_left,
float  p_scalar 
)
static

Element-wise subtraction

Parameters
p_left
p_scalar

◆ Translate()

OvMaths::FMatrix4 OvMaths::FMatrix4::Translate ( const FMatrix4 p_matrix,
const FVector3 p_translation 
)
static

Translate matrix in 3D

Parameters
p_matrix
p_translation

◆ Translation()

OvMaths::FMatrix4 OvMaths::FMatrix4::Translation ( const FVector3 p_translation)
static

Return 3D translation matrix

Parameters
p_translation

◆ Transpose()

OvMaths::FMatrix4 OvMaths::FMatrix4::Transpose ( const FMatrix4 p_matrix)
static

Return transposed matrix

Parameters
p_matrix

Member Data Documentation

◆ data

float OvMaths::FMatrix4::data[16]

◆ Identity

const OvMaths::FMatrix4 OvMaths::FMatrix4::Identity
static
Initial value:
= FMatrix4(1.f, 0.f, 0.f, 0.f,
0.f, 1.f, 0.f, 0.f,
0.f, 0.f, 1.f, 0.f,
0.f, 0.f, 0.f, 1.f)

@project: Overload

Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

The documentation for this struct was generated from the following files:
OvMaths::FMatrix4::FMatrix4
FMatrix4()
Definition: FMatrix4.cpp:20