HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Core::Mat4 Struct Reference

A 4x4 Matrix structure stored in Column-Major order (OpenGL Standard). More...

#include <src/core/Matrix.h>

Collaboration diagram for Core::Mat4:
Collaboration graph

Public Member Functions

constexpr Mat4 () noexcept
 Default constructor initializes to Identity Matrix.
 
Mat4 operator* (const Mat4 &other) const
 Matrix Multiplication.
 

Static Public Member Functions

static Mat4 Identity ()
 
static Mat4 Zero ()
 
static Mat4 Perspective (float fov, float aspect, float nearplane, float farplane)
 Creates a Perspective Projection Matrix (FOV Y).
 
static Mat4 LookAt (const Vec3 &eye, const Vec3 &tgt, const Vec3 &up)
 Creates a View Matrix using Eye, Target, and Up vectors.
 
static Mat4 Orthographic (float left, float right, float bottom, float top, float nearplane, float farplane)
 
static Mat4 Translation (const Vec3 &translation)
 
static Mat4 Scale (float scaleX, float scaleY, float scaleZ)
 

Public Attributes

float m_fElements [16]
 

Detailed Description

A 4x4 Matrix structure stored in Column-Major order (OpenGL Standard).

Index Layout: 0 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15

Constructor & Destructor Documentation

◆ Mat4()

constexpr Core::Mat4::Mat4 ( )
inlineconstexprnoexcept

Default constructor initializes to Identity Matrix.

Here is the caller graph for this function:

Member Function Documentation

◆ Identity()

static Mat4 Core::Mat4::Identity ( )
inlinestatic
Here is the call graph for this function:

◆ LookAt()

static Mat4 Core::Mat4::LookAt ( const Vec3 eye,
const Vec3 tgt,
const Vec3 up 
)
inlinestatic

Creates a View Matrix using Eye, Target, and Up vectors.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*()

Mat4 Core::Mat4::operator* ( const Mat4 other) const
inline

Matrix Multiplication.

Returns
New Matrix result = (*this) * other
Here is the call graph for this function:

◆ Orthographic()

static Mat4 Core::Mat4::Orthographic ( float  left,
float  right,
float  bottom,
float  top,
float  nearplane,
float  farplane 
)
inlinestatic
Here is the caller graph for this function:

◆ Perspective()

static Mat4 Core::Mat4::Perspective ( float  fov,
float  aspect,
float  nearplane,
float  farplane 
)
inlinestatic

Creates a Perspective Projection Matrix (FOV Y).

Parameters
fovField of View in degrees.
aspectAspect Ratio (Width / Height).
nearplaneDistance to near clipping plane.
farplaneDistance to far clipping plane.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Scale()

static Mat4 Core::Mat4::Scale ( float  scaleX,
float  scaleY,
float  scaleZ 
)
inlinestatic
Here is the caller graph for this function:

◆ Translation()

static Mat4 Core::Mat4::Translation ( const Vec3 translation)
inlinestatic
Here is the caller graph for this function:

◆ Zero()

static Mat4 Core::Mat4::Zero ( )
inlinestatic
Here is the caller graph for this function:

Member Data Documentation

◆ m_fElements

float Core::Mat4::m_fElements[16]

The documentation for this struct was generated from the following file: