Math v0.2.0
float3x4 Struct Reference

Floating point 3x4 matrix structure. More...

#include <float.hpp>

Public Member Functions

constexpr float3x4 (float n=0.0f) noexcept
 Creates a new floating point 3x4 matrix structure.
constexpr float3x4 (float c0r0, float c1r0, float c2r0, float c0r1, float c1r1, float c2r1, float c0r2, float c1r2, float c2r2, float c0r3, float c1r3, float c2r3) noexcept
 Creates a new floating point 3x4 matrix structure.
constexpr float3x4 (float4 c0, float4 c1, float4 c2) noexcept
 Creates a new floating point 3x4 matrix structure.
constexpr operator float2x2 () const noexcept
 Returns matrix 2x2 part.
constexpr operator float3x3 () const noexcept
 Returns matrix 3x3 part.
float4operator[] (psize i) noexcept
 Returns matrix column by index.
float4 operator[] (psize i) const noexcept
 Returns matrix column by index.
constexpr float3x4 operator+ (float n) const noexcept
constexpr float3x4 operator- (float n) const noexcept
constexpr float3x4 operator* (float n) const noexcept
constexpr float3x4 operator/ (float n) const noexcept
float3x4operator+= (float n) noexcept
float3x4operator-= (float n) noexcept
float3x4operator*= (float n) noexcept
float3x4operator/= (float n) noexcept
constexpr float4 operator* (float3 v) const noexcept
 Calculates dot product between matrix and vector.
bool operator== (const float3x4 &m) const noexcept
 Returns true if matrices have the same values.
bool operator!= (const float3x4 &m) const noexcept
 Returns true if matrices have different values.

Public Attributes

float4 c0
float4 c1
float4 c2

Static Public Attributes

static const float3x4 zero = float3x4(0.0f)
static const float3x4 one = float3x4(1.0f)
static const float3x4 minusOne = float3x4(-1.0f)
static const float3x4 identity

Detailed Description

Floating point 3x4 matrix structure.

Commonly used for basic transformations: translation, scale, rotation, etc.

Constructor & Destructor Documentation

◆ float3x4() [1/3]

float3x4 ( float n = 0.0f)
inlineexplicitconstexprnoexcept

Creates a new floating point 3x4 matrix structure.

Parameters
ntarget value for all columns and rows

◆ float3x4() [2/3]

float3x4 ( float c0r0,
float c1r0,
float c2r0,
float c0r1,
float c1r1,
float c2r1,
float c0r2,
float c1r2,
float c2r2,
float c0r3,
float c1r3,
float c2r3 )
inlineconstexprnoexcept

Creates a new floating point 3x4 matrix structure.

See the float3x3.

◆ float3x4() [3/3]

float3x4 ( float4 c0,
float4 c1,
float4 c2 )
inlineconstexprnoexcept

Creates a new floating point 3x4 matrix structure.

Parameters
c0first matrix column value
c1second matrix column value
c2third matrix column value

Member Function Documentation

◆ operator[]() [1/2]

float4 & operator[] ( psize i)
inlinenoexcept

Returns matrix column by index.

Parameters
itarget column index

◆ operator[]() [2/2]

float4 operator[] ( psize i) const
inlinenoexcept

Returns matrix column by index.

Parameters
itarget column index

◆ operator*()

float4 operator* ( float3 v) const
inlineconstexprnoexcept

Calculates dot product between matrix and vector.

Parameters
vtarget vector to dot by

◆ operator==()

bool operator== ( const float3x4 & m) const
inlinenoexcept

Returns true if matrices have the same values.

Parameters
[in]manother matrix to compare with

◆ operator!=()

bool operator!= ( const float3x4 & m) const
inlinenoexcept

Returns true if matrices have different values.

Parameters
[in]manother matrix to compare with

Member Data Documentation

◆ c0

float4 c0

First matrix column.

◆ c1

float4 c1

Second matrix column.

◆ c2

float4 c2

Third matrix column.

◆ identity

const float3x4 identity
inlinestatic
Initial value:
1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 1.0f,
0.0f, 0.0f, 0.0f)
constexpr float3x4(float n=0.0f) noexcept
Creates a new floating point 3x4 matrix structure.
Definition float.hpp:379